예제 #1
0
 private static void changeFirstPawnXposition(Player firstPlayer, Player secondPlayer, Player thirdPlayer, Player fourthPlayer, int y)
 {
     if (!firstPlayer.isPawnsSetted && !secondPlayer.isPawnsSetted && y != 0)
     {
         firstPlayer.firstPawnXposition--;
         secondPlayer.firstPawnXposition++;
     }
     else if (!thirdPlayer.isPawnsSetted && !fourthPlayer.isPawnsSetted && y >= 12 && y < 14)
     {
         thirdPlayer.firstPawnXposition++;
         fourthPlayer.firstPawnXposition--;
     }
 }
예제 #2
0
 private static void changeFirstPawnXposition(Player firstPlayer, Player secondPlayer, int y)
 {
     if (!firstPlayer.isPawnsSetted && y != 0)
     {
         firstPlayer.firstPawnXposition--;
     }
     else if (!secondPlayer.isPawnsSetted && y >= 11 && y < 14)
     {
         secondPlayer.firstPawnXposition--;
     }
 }
예제 #3
0
 private static void addPawn(Player firstPlayer, int y, int x)
 {
     Pawn pawn = new Pawn();
     pawn.setColor(firstPlayer.color);
     positions[x, y].setPawn(pawn);
     firstPlayer.quantityOfPawns--;
 }