tictactoe
- From: "CPSCmajor" <bmerritt1987@xxxxxxxxx>
- Date: 29 Oct 2005 12:51:06 -0700
I have no idea where to even start on this...
Any suggestions?
In this problem, you will modify the TicTacToe class from the textbook.
Add a method flipVertical that flips the board position along the
vertical axis. For example, the position
x x o
o
x
is flipped to
o x x
o
x
This is not useful for playing the game, but it can be useful for
recognizing a winning strategy in a database of strategies.
Also supply a flipHorizontal method that would flip the original
position to
x
o
x x o
(Hint: If you are clever and understand how two-dimensional arrays are
implemented as "arrays of arrays", this method can be much simpler than
the vertical flip.)
What is your implementation of the flipVertical and flipHorizontal
methods?
.
- Follow-Ups:
- Re: tictactoe
- From: andreas kinell
- Re: tictactoe
- Prev by Date: Re: confused
- Next by Date: lost
- Previous by thread: Converting int to string
- Next by thread: Re: tictactoe
- Index(es):
Relevant Pages
|
|