put comment line for the getTurnNumber

This commit is contained in:
Jérôme BEDIER 2025-04-18 16:13:49 +02:00
parent 9d8785d375
commit 7bd9cebe29
1 changed files with 7 additions and 7 deletions

View File

@ -16,21 +16,21 @@ public class Board {
}
public int getWidth() {
width = 8; // 8 for the moment can be changed
width = 8; // setting the width at 8 for the moment can be changed
return width;
}
public int getHeight() {
height = 8; // 8 for the moment can be changed
height = 8; // setting the height at 8 for the moment can be changed
return height;
}
public int getTurnNumber() {
turn = 0;
for (int i = 0; i<=n; i++) {
turn += 1;
}
return turn;
turn = 0; // initializing turn at 0
for (int i = 0; i<=n; i++) { // starting the loop for the counter
turn += 1; // Add +1 to turn for the counter after each pawns moved
} // end of the loop
return turn; // return the value of the counter
}
public boolean isTurnWhite() {