Does anyone have an idea how i could write a program that play this game against the computer and using java? Please i need help..


1 | private int bestOf = 5 ; // as an example |
1 2 3 4 | // with these instance fields to score wins private int humanWins, computerWins; // the check would be as follows if (humanWins > bestOf/ 2 || computerWins > bestOf/ 2 ) Greenfoot.stop(); // example ending |