module RaylibPong

Overview

A game involving two paddles and one ball where the goal is to get the ball past the opponents paddle.

Defined in:

raylib_pong.cr

Constant Summary

VERSION = "0.1alpha"

Class Method Summary

Class Method Detail

def self.ball_hit_paddle?(paddle) #

Has the ball been hit by a paddle?


[View source]
def self.draw #

Draws the game.


[View source]
def self.paddle1 #

Player 1 paddle.


[View source]
def self.paddle2 #

Player 2~ paddle.


[View source]
def self.pause #

Pauses the game.


[View source]
def self.player1_score #

Player 1's score.


[View source]
def self.player2_score #

Player 2's score.


[View source]
def self.run #

Runs the game.


[View source]
def self.setup #

Sets up the player score procs in ball.


[View source]
def self.update #

Updates the game.


[View source]
def self.update_collision #

Updates the collision between paddles and ball.


[View source]