diff --git a/src/backend/Piece.java b/src/backend/Piece.java index 2f0ca19..e442fd8 100644 --- a/src/backend/Piece.java +++ b/src/backend/Piece.java @@ -4,10 +4,14 @@ public class Piece { private int x; private int y; + private char type; + private char color; - public Piece(int xP, int yP) { + public Piece(int xP, int yP, char type_P, char color_P) { x = xP; y = yP; + type = type_P; + color = color_P; } public int getX() { @@ -19,11 +23,16 @@ public class Piece { } public PieceType getType() { - return null; + return PieceType.fromSummary(type); } public boolean isWhite() { - return false; + if(color =='w') { + return true; + } + else { + return false; + } } }