reset password
Author Message
lakerfan94
Posts: 143
Posted 20:17 Feb 24, 2014 |

Should we make the doMoves method in a way that also detects if both players input invalid values?

rabbott
Posts: 1649
Posted 20:43 Feb 24, 2014 |
How about ending the game and declaring it a tie.
Eric Liao
Posts: 158
Posted 10:08 Feb 25, 2014 |

Correct, you the doMoves method will return a String representing whether the move is valid or invalid.

 

So for example, if user1 enter a bid that is not valid (such as zero, negative or greater than his/her money), then you will return "P1-Invalid" to show that player 1 just enters an invalid move.

Eric Liao
Posts: 158
Posted 10:50 Feb 25, 2014 |

Sorry, I didn't realize the case was for both player that enters invalid moves.

If both player inputs invalid, return "Tie-Invalid" to indicate they tie.

I will add this to the skeleton code now. Thanks for the reminder.