bukeelcin / Brick_Breaker

GROUP-A
0 stars 0 forks source link

Number of Lives #6

Open bukeelcin opened 10 years ago

bukeelcin commented 10 years ago

Number of lives can be less than 0, when you die frequently. Deniz, how are we going solve this because it does not make sense.

deniziskender commented 10 years ago

Firstly,it seems an error but it is not because we don't have gameOver() method yet. The only thing we are doing is that when the ball exits the frame, the numberoflives will decrease. In the next week, we are going to add gameOver() method and when the numberoflives become 0, the game will be over, then his parameter can't be less than zero anymore.

deniziskender commented 10 years ago

Here is my idea. Something like this. if (lives == 0) { move = false; or gameOver(); } if (lives == 0) { g.setColor(Color.WHITE); g.setFont(new Font("TimesRoman", Font.PLAIN, 20)); g.drawString("YOU LOSE!", 240, 300); }

deniziskender commented 10 years ago

I have solved this issue. In other words, I made game over part. I will update the code soon.