mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +00:00
getLegalMoves logic seems fixed //todo write better tests
This commit is contained in:
@@ -158,6 +158,7 @@ public final class Reversi extends TurnBasedGame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void skipMyTurn(){
|
public void skipMyTurn(){
|
||||||
|
IO.println("TURN " + getCurrentPlayer() + " SKIPPED");
|
||||||
nextTurn();
|
nextTurn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,7 +182,7 @@ public final class Reversi extends TurnBasedGame {
|
|||||||
|
|
||||||
public Game.Score getScore(){
|
public Game.Score getScore(){
|
||||||
int player1Score = 0, player2Score = 0;
|
int player1Score = 0, player2Score = 0;
|
||||||
for (int count = 0; count < 63; count++) {
|
for (int count = 0; count < rowSize * columnSize; count++) {
|
||||||
if (board[count] == 'W') {
|
if (board[count] == 'W') {
|
||||||
player1Score += 1;
|
player1Score += 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user