adding comments to board file (it's not whatsapp here eyo)
This commit is contained in:
parent
ee1110d909
commit
672f73b429
|
|
@ -30,10 +30,15 @@ public class Board {
|
|||
}
|
||||
|
||||
public boolean isTurnWhite() {
|
||||
|
||||
//Divide by 2 and check if rest = 0
|
||||
if (getTurnNumber()%2==0) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
else{
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -44,7 +49,7 @@ public class Board {
|
|||
|
||||
public void populateBoard() {
|
||||
|
||||
//Black pieces populating
|
||||
//Black pieces populating (x,y,type,color)
|
||||
Board[1][1] = new Piece(1,1,'R','B');
|
||||
Board[2][1] = new Piece(2,1,'N','B');
|
||||
Board[3][1] = new Piece(3,1,'B','B');
|
||||
|
|
@ -55,10 +60,10 @@ public class Board {
|
|||
Board[9][1] = new Piece(8,1,'R','B');
|
||||
|
||||
for (int x = 1; x < 8; x++) {
|
||||
Board[x][2] = new Piece(x,2,'P','B');
|
||||
Board[x][2] = new Piece(x,2,'P','B'); //8 Pawns on second line
|
||||
}
|
||||
|
||||
//White pieces populating
|
||||
//White pieces populating (x,y,type,color)
|
||||
Board[1][8] = new Piece(1,8,'R','W');
|
||||
Board[2][8] = new Piece(2,8,'N','W');
|
||||
Board[3][8] = new Piece(3,8,'B','W');
|
||||
|
|
@ -69,10 +74,12 @@ public class Board {
|
|||
Board[9][8] = new Piece(8,8,'R','W');
|
||||
|
||||
for (int x = 1; x < 8; x++) {
|
||||
Board[x][7] = new Piece(x,7,'P','W');
|
||||
Board[x][7] = new Piece(x,7,'P','W'); //8 Pawns on second line
|
||||
}
|
||||
}
|
||||
/*coucou noa !! */
|
||||
/*coucou noa !!
|
||||
*
|
||||
* eh vous croyez que c'est whatsapp ici ?*/
|
||||
public void cleanBoard() {
|
||||
//TODO
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue