trying things, kind of doesnt work but still progress
This commit is contained in:
parent
3164fcde7c
commit
817cf0511c
|
|
@ -183,13 +183,18 @@ public class Board {
|
|||
/* The following methods require more work ! */
|
||||
|
||||
public boolean isHighlighted(int x, int y) {
|
||||
boolean isAPieceHere = false ;
|
||||
if(selectX == x+1 && selectY == y+1) {
|
||||
isAPieceHere = true;
|
||||
boolean isAPieceHere = false ; // final return boolean value
|
||||
PieceType type = null; // type of piece variable that we will get trough a loop, this will determine the pattern of colors
|
||||
boolean color = true; // color of the piece for pawns that can only go in -y for black and +Y for white
|
||||
for(int i = 0; i < 3;i++)
|
||||
if(selectX == x && selectY == i) {
|
||||
isAPieceHere = true;
|
||||
}
|
||||
return isAPieceHere;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void undoLastMove() {
|
||||
//TODO
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue