Permalink
Browse files

Fixed a bug in the pong example

  • Loading branch information...
1 parent f3be2da commit e92a3120c767ea8e6c89f3e81c8258093e8c26e6 @LaurentGomila LaurentGomila committed Apr 6, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 examples/pong/Pong.cpp
View
@@ -104,6 +104,7 @@ int main()
{
// (re)start the game
isPlaying = true;
+ clock.restart();
// Reset the position of the paddles and ball
leftPaddle.setPosition(10 + paddleSize.x / 2, gameHeight / 2);
@@ -166,7 +167,7 @@ int main()
isPlaying = false;
pauseMessage.setString("You lost !\nPress space to restart or\nescape to exit");
}
- if (ball.getPosition().x + ballRadius > 800)
+ if (ball.getPosition().x + ballRadius > gameWidth)
{
isPlaying = false;
pauseMessage.setString("You won !\nPress space to restart or\nescape to exit");

0 comments on commit e92a312

Please sign in to comment.