# Search:

1. ## Thread: Ping Pong Table - Issues with Scores

Replies
14
Views
299

### Re: Ping Pong Table - Issues with Scores

And this is where the scores are manipulated...

// Step 5. Update the score if the ball is in the
// green area but is not moving
if (isBallOnTheTable()) {
if (ballX >...
2. ## Thread: Ping Pong Table - Issues with Scores

Replies
14
Views
299

### Re: Ping Pong Table - Issues with Scores

if (ballX > BALL_MAX_X) {

if (computerScore < WINNING_SCORE) {

computerScore = computerScore++;
table.setMessageText("Computer: " +...
3. ## Thread: Ping Pong Table - Issues with Scores

Replies
14
Views
299

### Re: Ping Pong Table - Issues with Scores

Like this?

if (ballX > BALL_MAX_X ){

if (computerScore<WINNING_SCORE){
4. ## Thread: Ping Pong Table - Issues with Scores

Replies
14
Views
299

### Re: Ping Pong Table - Issues with Scores

But this is my issue, I have tested that and I know that it reaches the value stored in "WINNING_SCORE" because it will always start furiously adding 1 every time it hits that number of points.
...
5. ## Thread: Ping Pong Table - Issues with Scores

Replies
14
Views
299

### Re: Ping Pong Table - Issues with Scores

Yeah, sorry I am not being clear. What I mean is that I want it to continue adding one to the score until it arrives at the winning score (eg. the score that will win the game)

So if the winning...
6. ## Thread: Ping Pong Table - Issues with Scores

Replies
14
Views
299

### Re: Ping Pong Table - Issues with Scores

It's the else if at the top of the code. It basically tries to find the co-ordinates of the ball in respect to the table. So when the ball arrives in a particular place on the table, that means the...