Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- AbsGameBoard - Class in cpsc2150.extendedConnectX.models
-
Class that implements the IGameBoard interface and contains an overridden implementation of
Object.toString(). - AbsGameBoard() - Constructor for class cpsc2150.extendedConnectX.models.AbsGameBoard
- actionPerformed(ActionEvent) - Method in class cpsc2150.extendedConnectX.views.ConnectXView
-
This is the callback method that gets called as part of the observer pattern.
- actionPerformed(ActionEvent) - Method in class cpsc2150.extendedConnectX.views.SetupView
-
This is the callback method that gets called as part of the observer pattern.
B
- BoardPosition - Class in cpsc2150.extendedConnectX.models
-
Keep track of an individual cell for a board.
- BoardPosition(int, int) - Constructor for class cpsc2150.extendedConnectX.models.BoardPosition
-
Constructor for BoardPosition that takes integers for row and column.
C
- checkDiagWin(BoardPosition, char) - Method in interface cpsc2150.extendedConnectX.models.IGameBoard
-
This function checks to see if the last token placed (which was placed in position pos by player p) resulted in 5 in a row diagonally.
- checkForWin(int) - Method in interface cpsc2150.extendedConnectX.models.IGameBoard
-
This function will check to see if the last token placed in column c resulted in the player winning the game.
- checkHorizWin(BoardPosition, char) - Method in interface cpsc2150.extendedConnectX.models.IGameBoard
-
This function checks to see if the last token placed (which was placed in position pos by player p) resulted in 5 in a row horizontally.
- checkIfFree(int) - Method in interface cpsc2150.extendedConnectX.models.IGameBoard
-
Function that returns true if the column can accept another token; false otherwise.
- checkTie() - Method in interface cpsc2150.extendedConnectX.models.IGameBoard
-
This function will check to see if the game has resulted in a tie.
- checkVertWin(BoardPosition, char) - Method in interface cpsc2150.extendedConnectX.models.IGameBoard
-
This function checks to see if the last token placed (which was placed in position pos by player p) resulted in 5 in a row vertically.
- closeScreen() - Method in class cpsc2150.extendedConnectX.views.SetupView
-
This method closes the screen by disposing it.
- ConnectXApp - Class in cpsc2150.extendedConnectX
-
This class is the entry point of our program and just loads the set up screen and controller
- ConnectXApp() - Constructor for class cpsc2150.extendedConnectX.ConnectXApp
- ConnectXController - Class in cpsc2150.extendedConnectX.controllers
-
The controller class will handle communication between our View and our Model (
IGameBoard) - ConnectXController(IGameBoard, ConnectXView, int) - Constructor for class cpsc2150.extendedConnectX.controllers.ConnectXController
-
This creates a controller for running the Extended ConnectX game
- ConnectXView - Class in cpsc2150.extendedConnectX.views
-
This class is the view of our Extended Connect X our view has a message area, and a list of buttons the buttons will be arranged in a
ROWS_IN_BUTTON_PANEL x COLUMNS_IN_BUTTON_PANELGrid Players will use another set of buttons above the grid to select the column to place in All events will be passed to the controller - ConnectXView(int, int) - Constructor for class cpsc2150.extendedConnectX.views.ConnectXView
-
This creates a screen for playing the game.
- cpsc2150.extendedConnectX - package cpsc2150.extendedConnectX
- cpsc2150.extendedConnectX.controllers - package cpsc2150.extendedConnectX.controllers
- cpsc2150.extendedConnectX.models - package cpsc2150.extendedConnectX.models
- cpsc2150.extendedConnectX.views - package cpsc2150.extendedConnectX.views
D
- displayError(String) - Method in class cpsc2150.extendedConnectX.views.SetupView
-
This method displays an error message on the screen.
E
- equals(Object) - Method in class cpsc2150.extendedConnectX.models.BoardPosition
-
Overloaded equals method for BoardPosition.
G
- GameBoard - Class in cpsc2150.extendedConnectX.models
-
Class that represents an entire game board for the ExtendedConnectX game using an array.
- GameBoard(int, int, int) - Constructor for class cpsc2150.extendedConnectX.models.GameBoard
-
Constructor for GameBoard that takes parameters for the number of rows, the number of columns, and the number needed to win, and initializes all indexes of board to ' '.
- GameBoardMem - Class in cpsc2150.extendedConnectX.models
-
Class that represents an entire game board for the ExtendedConnectX game using a more memory-efficient map instead of an array.
- GameBoardMem(int, int, int) - Constructor for class cpsc2150.extendedConnectX.models.GameBoardMem
-
Constructor for GameBoardMem that takes parameters for the number of rows, the number of columns, and the number needed to win, and initializes a HashMap for the game board.
- getColumn() - Method in class cpsc2150.extendedConnectX.models.BoardPosition
-
This function returns the value of the column number.
- getNumColumns() - Method in class cpsc2150.extendedConnectX.models.GameBoard
- getNumColumns() - Method in class cpsc2150.extendedConnectX.models.GameBoardMem
- getNumColumns() - Method in interface cpsc2150.extendedConnectX.models.IGameBoard
-
Returns the number of columns in the GameBoard.
- getNumRows() - Method in class cpsc2150.extendedConnectX.models.GameBoard
- getNumRows() - Method in class cpsc2150.extendedConnectX.models.GameBoardMem
- getNumRows() - Method in interface cpsc2150.extendedConnectX.models.IGameBoard
-
Returns the number of rows in the GameBoard.
- getNumToWin() - Method in class cpsc2150.extendedConnectX.models.GameBoard
- getNumToWin() - Method in class cpsc2150.extendedConnectX.models.GameBoardMem
- getNumToWin() - Method in interface cpsc2150.extendedConnectX.models.IGameBoard
-
Returns the number of tokens in a row needed to win the game.
- getRow() - Method in class cpsc2150.extendedConnectX.models.BoardPosition
-
This function returns the value of the row number.
I
- IGameBoard - Interface in cpsc2150.extendedConnectX.models
-
Interface that contains methods for implementing an entire game board for the ExtendedConnectX game.
- isPlayerAtPos(BoardPosition, char) - Method in class cpsc2150.extendedConnectX.models.GameBoardMem
-
This function returns true if the player is at pos; otherwise, it returns false.
- isPlayerAtPos(BoardPosition, char) - Method in interface cpsc2150.extendedConnectX.models.IGameBoard
-
This function returns true if the player is at pos; otherwise, it returns false.
M
- main(String[]) - Static method in class cpsc2150.extendedConnectX.ConnectXApp
-
This method is the main entry point into the program.
- MAX_COLUMNS - Static variable in interface cpsc2150.extendedConnectX.models.IGameBoard
- MAX_NUM_TO_WIN - Static variable in interface cpsc2150.extendedConnectX.models.IGameBoard
- MAX_PLAYERS - Static variable in class cpsc2150.extendedConnectX.controllers.ConnectXController
-
Constant for the maximum number of players.
- MAX_ROWS - Static variable in interface cpsc2150.extendedConnectX.models.IGameBoard
- MIN_COLUMNS - Static variable in interface cpsc2150.extendedConnectX.models.IGameBoard
- MIN_NUM_TO_WIN - Static variable in interface cpsc2150.extendedConnectX.models.IGameBoard
- MIN_ROWS - Static variable in interface cpsc2150.extendedConnectX.models.IGameBoard
P
- placeToken(char, int) - Method in class cpsc2150.extendedConnectX.models.GameBoard
- placeToken(char, int) - Method in class cpsc2150.extendedConnectX.models.GameBoardMem
- placeToken(char, int) - Method in interface cpsc2150.extendedConnectX.models.IGameBoard
-
Function that places the character p in column c.
- processButtonClick(int) - Method in class cpsc2150.extendedConnectX.controllers.ConnectXController
-
This processes a button click from the view.
- processButtonClick(int, int, int, int) - Method in class cpsc2150.extendedConnectX.controllers.SetupController
-
This processes the submit button click.
R
- registerObserver(ConnectXController) - Method in class cpsc2150.extendedConnectX.views.ConnectXView
-
This method registers argument as observer/listener of this; this must be done first, before any other methods of this class are called.
- registerObserver(SetupController) - Method in class cpsc2150.extendedConnectX.views.SetupView
-
This method registers argument as observer/listener of this; this must be done first, before any other methods of this class are called.
S
- setMarker(int, int, char) - Method in class cpsc2150.extendedConnectX.views.ConnectXView
-
This method displays a player token on the screen.
- setMessage(String) - Method in class cpsc2150.extendedConnectX.views.ConnectXView
-
This method displays a message on the screen.
- SetupController - Class in cpsc2150.extendedConnectX.controllers
-
This class is the controller for our setup screen.
- SetupController(SetupView) - Constructor for class cpsc2150.extendedConnectX.controllers.SetupController
-
This creates a new setup controller.
- SetupView - Class in cpsc2150.extendedConnectX.views
-
This class contains the code to create and layout the GUI for the setup screen.
- SetupView() - Constructor for class cpsc2150.extendedConnectX.views.SetupView
-
This creates a screen for setting up a new game.
T
- toString() - Method in class cpsc2150.extendedConnectX.models.AbsGameBoard
-
Overloaded toString method for GameBoard.
- toString() - Method in class cpsc2150.extendedConnectX.models.BoardPosition
-
Overloaded toString method for BoardPosition.
W
- whatsAtPos(BoardPosition) - Method in class cpsc2150.extendedConnectX.models.GameBoard
- whatsAtPos(BoardPosition) - Method in class cpsc2150.extendedConnectX.models.GameBoardMem
- whatsAtPos(BoardPosition) - Method in interface cpsc2150.extendedConnectX.models.IGameBoard
-
Function that returns what is in the GameBoard at position pos.
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form