- Source:
Methods
-
<static> initLogic(p_game_loop, p_models [, p_config])
-
Parameters:
Name Type Argument Description p_game_loopGameLoop the game loop p_modelsObject the models of the game Properties
Name Type Description startButtonModelCircle the startButton ballModelCircle the ball paddlesArray.<ModelPaddle> the two paddles scoresArray.<ModelScore> the two scores infoModelText a text field to display info p_configObject <optional>
the configuration of the game logic Properties
Name Type Argument Default Description winScorenumber <optional>
10 the score of the winner - Source:
-
<async, inner> ballLoss(p_player)
-
Parameters:
Name Type Description p_playerstring the position of the player who lost the ball: 'left'or'right'- Source:
-
<async, inner> startGame()
-
Starts the game. Should be called by a controller of a start button or the like.
- Source: