![]() |
CS 111- Introduction to Computer Science
Homework #13 |
1. Extend GomokuState with clone(): Extend class GomokuState.java according to this specification. This specification differs from the previous specification in that GomokuState is now cloneable with a deep clone/copy.
2. Testing GomokuState: Test your class using the provided GUI. Usage: java Gomoku [<grid size>]. Use the "u" key to "undo" moves.
3. Extend GomokuGame: Extend class GomokuGame.java according to this specification. Test input and a transcript with input is provided. For this extension the "undo" command will undo a previous move. If there was no previous move, print an appropriate error message. Use the Stack class and GomokuState.clone() for this implementation.
Note: There are often better, more memory-efficient means of implementing undo functionality. The purpose of this exercise is to provide experience with deep cloning/copying and the stack data structure.
