Nim Project
From Huben's Wiki
(→C-:) |
(→C-:) |
||
Line 16: | Line 16: | ||
* The main() should create an instance of Nim and display the stones using the toString() method without directly calling toString(). | * The main() should create an instance of Nim and display the stones using the toString() method without directly calling toString(). | ||
===C-:=== | ===C-:=== | ||
− | * Use a Scanner in a loop to input a row LETTER (either upper or lower case) and number of stones to remove. | + | * Use a Scanner in a loop to input a row LETTER (either upper or lower case) and number of stones to remove. (Page 26 of text.) |
* The loop should only exit when a valid move has been selected. | * The loop should only exit when a valid move has been selected. | ||
* Use Scanner.nextLine() instead of nextInt(): it is more robust. | * Use Scanner.nextLine() instead of nextInt(): it is more robust. |