B D G H M N P R S T U V

B

bestMove(Player, SimpleNIM) - Method in class NIMStrategy
 

D

display() - Method in class SimpleNIMGUI
Display frame
displayMessage(String) - Method in class SimpleNIM
Displays a message
displayMessage(String) - Method in class SimpleNIMGUI
Display message on messsage bar

G

game - Variable in class Player
 
gameOver(Player) - Method in class SimpleNIM
Game Over?
getCurrentPlayer() - Method in class SimpleNIM
Returns the current player
getNext() - Method in class Player
Get the opponent
getSticksLeft() - Method in class SimpleNIM
Returns the number of sticks left in the pile

H

HumanPlayer - Class in <Unnamed>
Represents a human Player.
HumanPlayer(SimpleNIM) - Constructor for class HumanPlayer
Constructor

M

MachinePlayer - Class in <Unnamed>
Represents a computer Player.
MachinePlayer(SimpleNIM) - Constructor for class MachinePlayer
 
main(String[]) - Static method in class SimpleNIMGUI
Main entry point
makeMove() - Method in class HumanPlayer
Make a move
makeMove() - Method in class MachinePlayer
Make a move
makeMove() - Method in class Player
Has the player make a move
messageBar - Variable in class SimpleNIMGUI
 

N

NIMStrategy - Class in <Unnamed>
 
NIMStrategy() - Constructor for class NIMStrategy
 

P

pickSticks(int) - Method in class HumanPlayer
Pick a specified number of sticks
pickSticks(int) - Method in class MachinePlayer
Pick the sticks and notify all
pickSticks(int) - Method in class Player
Pick up the specified number of sticks
pickSticks(int, Player) - Method in class SimpleNIM
Pick up Sticks
pickSticks(int, Player) - Method in class SimpleNIMGUI
Pick up Sticks
Player - Class in <Unnamed>
Superclass for a SimpleNIM game player
Player(SimpleNIM) - Constructor for class Player
Constructor

R

reset() - Method in class SimpleNIMGUI
Resets the frame
run() - Method in class Player
Runs the thread for the player

S

setCurrentPlayer(Player) - Method in class SimpleNIM
Sets the current player
setNext(Player) - Method in class Player
Sets the opponent
setPickSticks(int) - Method in class Player
Sets the number of sticks picked
setWhoGoFirst(String) - Method in class SimpleNIM
Set which player will go first
SimpleNIM - Class in <Unnamed>
The simple NIM game.
SimpleNIM(SimpleNIMGUI) - Constructor for class SimpleNIM
The constructor.
SimpleNIMGUI - Class in <Unnamed>
The simple NIM game GUI.
SimpleNIMGUI() - Constructor for class SimpleNIMGUI
The constructor
start() - Method in class SimpleNIM
Starts the game

T

turn() - Method in class Player
Has this player take their turn

U

updateSticksLeft(int) - Method in class SimpleNIM
Updates the number of sticks left in the pile.

V

validMove(int) - Method in class SimpleNIM
Valid move?

B D G H M N P R S T U V