Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Returns a string representation of the board.
- public String toString()
- {
- int count;
- String display = " 1 2 3\n\n";
- for (count = 0; count < board.length; count++)
- {
- display = display + ' ' + (char) (count + 97) + " " +
- board[count][0] + " | " + board[count][1] + " |";
- if (board[count][2] != ' ')
- display = display + ' ' + board[count][2];
- if (count != (board.length - 1))
- display = display + "\n ---+---+---\n";
- else
- display = display + "\n";
- }
- return display;
- }
- }
Add Comment
Please, Sign In to add comment