a few comments in piece type
This commit is contained in:
parent
1361a2e675
commit
4bfe28830b
|
|
@ -10,6 +10,15 @@ public enum PieceType {
|
|||
return this.name().substring(0, 1);
|
||||
}
|
||||
|
||||
//TO USE IN OTHER FILES:
|
||||
//PieceType var = PieceType.Pawn;
|
||||
//if(var== PieceType.Rook) {
|
||||
//
|
||||
//}
|
||||
//PieceType[] values = PieceType.values();
|
||||
//int x = var.ordinal(); // x = position of var in values ( pawn=0 ; rook=1 ; knight=2 ; ...... )
|
||||
|
||||
|
||||
public static PieceType fromSummary(char c) {
|
||||
if(c=='P') {
|
||||
return PieceType.Pawn;
|
||||
|
|
|
|||
Loading…
Reference in New Issue