Campbell Ritchie wrote:Get the Game class running so you print “X's turn” followed by a pretty‑print of the board.
Don't know. I think those four methods should be public instance methods and not take the board/grid as a parameter. Yes, use the board field.Prasanna Raman wrote: . . . do I need the getBoard() method? . . . Can I remove geBoard(), make those 4 methods public but not static and use the board instance?
Thank you very much I've actually been very worried over the last few days and started to wonder if I will ever get the hang of this.Campbell Ritchie wrote:The fact that you made that suggestion makes me think you are getting to think object‑oriented. ()
Campbell Ritchie wrote:Get the Game class running so you print “X's turn” followed by a pretty‑print of the board.
Two Players, surely.Prasanna Raman wrote: . . . Shouldn't the Game class have Player as one of its attributes? . . .
Thank you! I'll work on the Player class then.Campbell Ritchie wrote:Player? Now. You somehow must ensure there are only two Player instances at any time. You can have Player X and Player O. Each Player can have a count of games played and won and lost.
Please read this.Prasanna Raman wrote:Not sure if you've been busy, but posting this in case you didn't receive notification.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |