import javax.swing.JFrame;
/**
*
* @author Shagas
*/
public class ChessGame {
// Declaring objects of the pieces
// White
King kingWhite;
Queen queenWhite;
Knight l_knightWhite;
Bishop l_bishopWhite;
Rook l_rookWhite;
Knight r_knightWhite;
Bishop r_bishopWhite;
Rook r_rookWhite;
Pawn pawn1White;
Pawn pawn2White;
Pawn pawn3White;
Pawn pawn4White;
Pawn pawn5White;
Pawn pawn6White;
Pawn pawn7White;
Pawn pawn8White;
// Black
King kingBlack;
Queen queenBlack;
Knight l_knightBlack;
Bishop l_bishopBlack;
Rook l_rookBlack;
Knight r_knightBlack;
Bishop r_bishopBlack;
Rook r_rookBlack;
Pawn pawn1Black;
Pawn pawn2Black;
Pawn pawn3Black;
Pawn pawn4Black;
Pawn pawn5Black;
Pawn pawn6Black;
Pawn pawn7Black;
Pawn pawn8Black;
private int chosenSquareXCoordinate;
private int chosenSquareYCoordinate;
private String pieceBuffer; // chosen piece
public ChessPiece[][] currentBoard = {
{l_rookBlack,l_bishopBlack,l_knightBlack,queenBlack,kingBlack,r_knightBlack,r_bishopBlack,r_rookBlack},
{pawn1Black,pawn2Black,pawn3Black,pawn4Black,pawn5Black,pawn6Black,pawn7Black,pawn8Black,},
{null,null,null,null,null,null,null,null},
{null,null,null,null,null,null,null,null},
{null,null,null,null,null,null,null,null},
{null,null,null,null,null,null,null,null},
{l_rookWhite,l_bishopWhite,l_knightWhite,queenWhite,kingWhite,r_knightWhite,r_bishopWhite,r_rookWhite},
{pawn1White,pawn2White,pawn3White,pawn4White,pawn5White,pawn6White,pawn7White,pawn8White,},
};
// public GraphicalInterface ui;
public ChessGame()
{
// White
l_rookWhite = new Rook("WHITE", "ROOK" , 7 , 0);
l_bishopWhite = new Bishop("WHITE", "BISHOP" , 7 , 1);
l_knightWhite = new Knight("WHITE", "KNIGHT" , 7 , 2);
queenWhite = new Queen( "WHITE" , "QUEEN" , 7, 3 );
kingWhite = new King( "WHITE" , "KING" , 7 , 4 );
r_knightWhite = new Knight("WHITE", "KNIGHT" , 7 , 5);
r_bishopWhite = new Bishop("WHITE", "BISHOP" , 7 , 6);
r_rookWhite = new Rook ("WHITE", "ROOK" , 7 , 7);
pawn1White = new Pawn("WHITE", "PAWN" , 6 , 0);
pawn2White = new Pawn("WHITE", "PAWN" , 6 , 1);
pawn3White = new Pawn("WHITE", "PAWN" , 6 , 2);
pawn4White = new Pawn("WHITE", "PAWN" , 6 , 3);
pawn5White = new Pawn("WHITE", "PAWN" , 6 , 4);
pawn6White = new Pawn("WHITE", "PAWN" , 6 , 5);
pawn7White = new Pawn("WHITE", "PAWN" , 6 , 6);
pawn8White = new Pawn("WHITE", "PAWN" , 6 , 7);
// Black
l_rookBlack = new Rook("BLACK", "ROOK" , 0 , 0);
l_bishopBlack = new Bishop("BLACK", "BISHOP" , 0 , 1);
l_knightBlack = new Knight("BLACK", "KNIGHT" , 0 , 2);
queenBlack = new Queen( "BLACK" , "QUEEN" , 0, 3);
kingBlack = new King( "BLACK" , "KING" , 0 , 4);
r_knightBlack = new Knight("BLACK", "KNIGHT" , 0 , 5);
r_bishopBlack = new Bishop("BLACK", "BISHOP" , 0 , 6);
r_rookBlack = new Rook ("BLACK", "ROOK" , 0 , 7);
pawn1Black = new Pawn("BLACK", "PAWN" , 1 , 0);
pawn2Black = new Pawn("BLACK", "PAWN" , 1 , 1);
pawn3Black = new Pawn("BLACK", "PAWN" , 1 , 2);
pawn4Black = new Pawn("BLACK", "PAWN" , 1 , 3);
pawn5Black = new Pawn("BLACK", "PAWN" , 1 , 4);
pawn6Black = new Pawn("BLACK", "PAWN" , 1 , 5);
pawn7Black = new Pawn("BLACK", "PAWN" , 1 , 6);
pawn8Black = new Pawn("BLACK", "PAWN" , 1 , 7);
this.currentBoard = currentBoard;
}