I'm making a chess game, rendered with OpenGL.
I'm not looking for somebody to tell me all of the answers, I would like to figure the code out on my own, but pointing me to the right concepts is what I really need. At this point, I'm not sure where to start. Here is what I've figured out:
An enumeration, TurnState
, with the following values:
playerOneTurn
playerTwoTurn
Stopped
An enumeration, GameState
, with the following values:
playerOneCheck
playerTwoCheck
playerOnecCheckMate
PlayerTwoCheckMate
InitializingGame
Tie
NormalPlay
An abstract class, Player
, and a subclass, Computer
.
A class, ChessGame
, with the following fields:
Player p1, p2
TurnState turnState
GameState gameState
A class, Move
, with the following fields:
*Piece
Location origin
Location destination
A class, Location
, with the following fields:
row
col
*ChessBoard
A class, ChessBoard
, with one method, isValid
, which takes a Move
and checks if the move is valid or not.
An abstract class, ChessPieces
, with the following methods:
GetValue() // returns an int value of the piece (for scoring)
GetPosition() // returns the current position of a piece
getIsSelected() // returns a boolean, true if selected, false if unselected
move() // moves the piece in a way dependent upon what piece
And the following subclasses:
Pawn
Rook
Queen
King
Knight