a few comments in piece type

This commit is contained in:
eliot 2025-04-17 09:31:32 +02:00
parent 1361a2e675
commit 4bfe28830b
1 changed files with 9 additions and 0 deletions

View File

@ -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;