Commits

Micha Kops committed 98eca26

Game reset in the model fixed.

  • Participants
  • Parent commits 4f3e294

Comments (0)

Files changed (3)

File src/main/java/com/hascode/jfx/game/BallGameController.java

 	}
 
 	private void initializeGame() {
-		for (ImageView r : model.getBoxes()) {
-			r.setVisible(true);
-		}
 		model.reset();
 	}
 

File src/main/java/com/hascode/jfx/game/GameModel.java

 		gameStopped.set(true);
 		getGameLost().set(false);
 		getGameWon().set(false);
+		setPaddleDragX(0.);
+		setPaddleTranslateX(0.);
 	}
 
 	public DoubleProperty getBallX() {
 		return movingDown;
 	}
 
-	public void setMovingDown(boolean movingDown) {
+	public void setMovingDown(final boolean movingDown) {
 		this.movingDown = movingDown;
 	}
 
 		return movingRight;
 	}
 
-	public void setMovingRight(boolean movingRight) {
+	public void setMovingRight(final boolean movingRight) {
 		this.movingRight = movingRight;
 	}
 
 		return movingSpeed;
 	}
 
-	public void setMovingSpeed(double movingSpeed) {
+	public void setMovingSpeed(final double movingSpeed) {
 		this.movingSpeed = movingSpeed;
 	}
 

File src/main/resources/stylesheet/style.css

 	-fx-effect: dropshadow(three-pass-box, rgba(0, 0, 0, 100), 1, 1, 4, 2 );
 }
 
-#borderTop,#paddle,#ball {
+#paddle,#ball {
 	-fx-effect: dropshadow(three-pass-box, #000000, 10.0,0.0,0.5,4.0);
-}
+}