A B C D E F G H I K L M N P R S T U W

A

addEvent(String) - Method in class GameplayLogManager
This Method appends the given event to the active log
attacked(StrategoPiece) - Method in class StrategoPiece
This Method is called when this piece attacks another

B

beginGame() - Method in class MenuHandler
This Method calls the method of the same name in the StrategoGame class
beginGame() - Method in class StrategoGame
This Method first checks if a game is in progress, if so it checks if the gameState of the BoardManager is in place mode, and that redUnitsToPlace, and blueUnitsToPlace are empty, if so then it changes the game phase to play and calls the playGame() method in BoardManager
BoardManager - Class in <Unnamed>
This class manages the display, and game-play for a stratego game
BoardManager() - Constructor for class BoardManager
 

C

calculateColumn(int) - Method in class BoardManager
This Method takes a X value and calculates the column it falls under
calculateRow(int) - Method in class BoardManager
This Method takes a Y value and calculates the Row it falls in
calculateX(int) - Method in class BoardManager
This Method takes a column and calculates its stating X value
calculateY(int) - Method in class BoardManager
This Method takes a column and calculates its stating Y value
canBlueMove() - Method in class BoardManager
This Method checks if any of Blue's units can move
canRedMove() - Method in class BoardManager
This Method checks if any of red's units can move
checkCheat() - Method in class GameplayLogManager
This Method checks if the most recent event was a cheat, and if so calls the appropriate cheat method(s)
createAccount() - Method in class MenuHandler
This Method prompts the user for an account name and attempts to insert it into the account log file, if it doesn't already exist.

D

deityMode() - Method in class BoardManager
This Method calls the deityMode Method on the selected unit
deityMode(int, int) - Method in class StrategoBoard
This Method sets the unit in the given square into deity mode
deityMode() - Method in class StrategoGame
This Method calls the method of the same name in the BoardManager class
deityMode() - Method in class StrategoPiece
This Method turns on deity Mode, making it beat anything it attacks apart from another unit with deity Mode active
drawBoard() - Method in class BoardManager
This Method redraws the game board

E

exit() - Method in class MenuHandler
This Method prompts the user asking if they want to end the game and if so it calls the method of the same name in the StrategoGame class
exit() - Method in class StrategoGame
This Method first checks if a game is in progress, if so it asks the user if they want to forfeit, running the player2Win() method if they respond with a yes, and does nothing otherwise, if no game is in progress or if the player quit it, this method then exits the program.

F

flagReveal() - Method in class BoardManager
This Method calls the flagReveal Method in the StrategoBoard class
flagReveal() - Method in class StrategoBoard
This Method sets both flags to not be hidden.

G

gameOver() - Method in class BoardManager
This Method checks which player (if any) won, and calls the appropriate method from the Stratego Game class
GameplayLogManager - Class in <Unnamed>
This class handles records of stratego games, in the form of a vector of strings
GameplayLogManager() - Constructor for class GameplayLogManager
 
getActiveLog() - Method in class GameplayLogManager
This Method returns a vector of strings containing every action performed by either player
getDisplayRank() - Method in class StrategoPiece
This Method returns a string containing the displayed rank of the unit
getGameState() - Method in class BoardManager
This Method returns the integer representation of the game state
getPiece(int, int) - Method in class StrategoBoard
This Method returns the piece at the given location
getSelectedPiece() - Method in class BoardManager
This Method returns the active StrategoPiece Object
getStrategoBoard() - Method in class BoardManager
This Method returns the active StrategoBoard Object

H

hideBlue() - Method in class BoardManager
This Method sets all of blues units to be hidden
hideRed() - Method in class BoardManager
This Method sets all of reds units to be hidden

I

isHidden() - Method in class StrategoPiece
This Method returns true if the unit is hidden from view, false otherwise
isOccupied(int, int) - Method in class StrategoBoard
This Method returns true if the given square is empty, else false

K

killUnit() - Method in class BoardManager
This Method destroys the selected unit as though it were destroyed in battle
killUnit() - Method in class StrategoGame
This Method calls the method of the same name in the BoardManager class

L

LayoutGUI() - Method in class StrategoGame
This Method lays out the main frame, positions the BoardManager, MenuHandler, and GameplayLogManager, and calls their GUI setup methods
layoutLog() - Method in class GameplayLogManager
This Method sets up the graphical representation of the gameplay log
layoutMenu() - Method in class MenuHandler
This Method lays out the menu graphically
loadLog(File) - Method in class GameplayLogManager
This Method sets the active log to the given file, throwing a FileNotFound exception if it is not found, or a IOException if it is improperly formatted
logIn() - Method in class MenuHandler
This Method prompts the user for an account name, then searches the account log file for the account, setting it as the active account if it is found returning a IOException if it is not found.
logOut() - Method in class MenuHandler
This Method sets the active account to null

M

MenuHandler - Class in <Unnamed>
This class handles the I/O and the rendering of the menu
MenuHandler() - Constructor for class MenuHandler
 
mouseClicked(MouseEvent) - Method in class MouseHandler
This method checks the gameState of the BoardManager, selects a square and attempts to place a unit if it is a left click during the Place state, removes a unit if it is a right click during the Place state,selects a square and unit if it is in the Play state, and does nothing during any other state.
mouseDragged(MouseEvent) - Method in class MouseMotionHandler
This method checks the gameState of the BoardManager,and attempts to move a unit if it is in the Place state, attempts to move a unit according to the rules and ending the players turn if it is in the Play state, and does nothing during any other state
mouseEntered(MouseEvent) - Method in class MouseHandler
This method does nothing
mouseExited(MouseEvent) - Method in class MouseHandler
This method does nothing
MouseHandler - Class in <Unnamed>
This class handles most of the I/O with the mouse
MouseHandler() - Constructor for class MouseHandler
 
MouseMotionHandler - Class in <Unnamed>
This class handles most of the I/O with the mouse
MouseMotionHandler() - Constructor for class MouseMotionHandler
 
mouseMoved(MouseEvent) - Method in class MouseMotionHandler
This method does nothing
mousePressed(MouseEvent) - Method in class MouseHandler
This method does nothing
mouseReleased(MouseEvent) - Method in class MouseHandler
This method does nothing
moveSelectedPiece(int, int) - Method in class BoardManager
This Method checks if the selected piece could move to the given square

N

newGame() - Method in class BoardManager
This Method Starts a new game of Stratego, clearing out the board and switching to placement mode, resetting both UnitsToPlace vectors
newGame() - Method in class MenuHandler
This Method calls the method of the same name in the StrategoGame class
newGame() - Method in class StrategoGame
This Method first checks if a game is in progress, if so it asks the user if they want to forfeit, running the player2Win() method if they respond with a yes, and does nothing otherwise, if no game is in progress or if the player quit it, this method then calls the BoardManager newGame() method.
newLog() - Method in class GameplayLogManager
This Method empties the current log file.

P

paintComponent(Graphics) - Method in class BoardManager
This Method draws the grid lines on the background image
passTurn() - Method in class BoardManager
This Method switches players turns.
pathIsOccupied(int, int, int, int) - Method in class StrategoBoard
This Method returns true if a straight path from square 1 to square 2 is empty, else it returns false.
placePiece(int, int, StrategoPiece) - Method in class StrategoBoard
This Method places the given piece at the given location
placeUnitInSelectedSquare() - Method in class BoardManager
This Method prompts the user for which unit to place in the selected square placing and removing it from the UnitsToPlace Vector it if possible, notifying the user why not otherwise
player1Win() - Method in class MenuHandler
This Method increments player 1's wins, and player 2's losses
player1Win() - Method in class StrategoGame
This Method calls the method of the same name in the GameplayLogManager class
player2Win() - Method in class MenuHandler
This Method increments player 2's wins, and player 1's losses
player2Win() - Method in class StrategoGame
This Method calls the method of the same name in the GameplayLogManager class
playGame() - Method in class BoardManager
This Method starts the main Gameplay loop, waiting on input from the current player, and switching turns after.

R

removePiece(int, int) - Method in class StrategoBoard
This Method removes the piece from the given location
removeplaceUnitFromSelectedSquare() - Method in class BoardManager
This Method removes the unit from the selected square, returning it to the UnitsToPlace Vector
reset() - Method in class StrategoBoard
This Method empties out the entire board
resetSelecetedPiece() - Method in class BoardManager
This Method sets the selected piece to null and the former row and columns to -1
returnSelecetedPiece() - Method in class BoardManager
This Method return the selected piece from whence it came

S

saveLog() - Method in class GameplayLogManager
This Method prompts the user for a file name then saves the log into it
selectSquare(int, int) - Method in class BoardManager
This Method sets the square at the x and y coords as the selected square
setGameState(int) - Method in class BoardManager
This Method sets the game state
setSelectedPiece(StrategoPiece, int, int) - Method in class BoardManager
This Method makes the given piece the selected one, and saves its former row and column
showBlue() - Method in class BoardManager
This Method sets all of blues units to be visible
showRed() - Method in class BoardManager
This Method sets all of reds units to be visible
showReplay(File) - Method in class StrategoGame
This Method calls the loadLog(File) method in GameplayLogManager, passing the log file, it then repeats the actions of the log via appropriate method calls on the BoardManager
StrategoBoard - Class in <Unnamed>
This class manages data for a 10 by 10 board of stratego pieces
StrategoBoard() - Constructor for class StrategoBoard
 
StrategoGame - Class in <Unnamed>
This class handles the rendering of the other frames, the passing of methods between MenuHandler, BoardManager, and GameplayLogManager, in other words it is a middle-man
StrategoGame() - Constructor for class StrategoGame
 
StrategoPiece - Class in <Unnamed>
This class manages data for a single piece including; it's rank, what rank to display, rank-related information, which image to use, and what textual name to use for the piece
StrategoPiece(int) - Constructor for class StrategoPiece
This Constructor produces a Stratego Piece of the given rank

T

tie() - Method in class MenuHandler
This Method increments both player's ties.
tie() - Method in class StrategoGame
This Method calls the method of the same name in the GameplayLogManager class

U

updateSelectedPiece(int, int) - Method in class BoardManager
This Method redraws the selected Piece

W

watchReplay() - Method in class MenuHandler
This Method prompts the user for a replay file name,and calls the StrategoGame classes show replay file with that as an argument if it is found else, returning a FileNotFoundException if it is not found.

A B C D E F G H I K L M N P R S T U W