Campbell Ritchie wrote:What about a record wins method in Player?
No, I didn't.Prasanna Raman wrote: . . . you said calling a method from a catch block is poor design because it might result in the program running out of memory . . .
Yes, that looks good, except for two tiny things.Prasanna Raman wrote: . . . Does this look OK?
Campbell Ritchie wrote:I suggest you set a maximum size for the board, unless you want to play on a 97×97 board.
Campbell Ritchie wrote:You realise you can enhance the utility class to return a number in a particular range?
You can simplify that method. I think you have put that class in the wrong package.Prasanna Raman wrote: . . .. . .
There is something untidy about the way you have set up the board.Prasanna Raman wrote: . . .
Thank youCampbell Ritchie wrote:Looking better
Campbell Ritchie wrote:You can simplify that method. I think you have put that class in the wrong package.
Campbell Ritchie wrote:There is something untidy about the way you have set up the board.
Campbell Ritchie wrote:Pleased to see you have got a while for continuing the game (
), but you can simplify its condition a lot.
Campbell Ritchie wrote:I do not like the regular expression for verifying the entry. If you are going to verify the entry with a regular expression, do so before you try splitting it.
Sorry, I don't understand what you're referring to hereCampbell Ritchie wrote:There is something untidy about the way you have set up the board.
Campbell Ritchie wrote:You can get rid of the initial assignment. If the line entered contains “real” input, there is no need to enter the loop. I posted what I thought was a simpler version about a week ago.
Don't get me started about those stupid light bulbs. |