|
|
@ -1,6 +1,4 @@ |
|
|
|
import java.sql.SQLOutput; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Iterator; |
|
|
|
|
|
|
|
public class Game { |
|
|
|
|
|
|
@ -53,17 +51,12 @@ public class Game { |
|
|
|
public int checkFieldClear(int posToCheck, Player p, Game g) { |
|
|
|
int mode; |
|
|
|
for (Player currentPlayer : g.players) { |
|
|
|
//System.out.println("Player"); |
|
|
|
if (currentPlayer.name.equals(p.name)) { |
|
|
|
System.out.println("TEST"); |
|
|
|
mode = 2; |
|
|
|
} else { |
|
|
|
System.out.println("TEST2"); |
|
|
|
mode = 1; |
|
|
|
} |
|
|
|
for (Figure f : currentPlayer.figures) { |
|
|
|
//System.out.println("Figure"); |
|
|
|
System.out.println(f.getPosition()); |
|
|
|
if (posToCheck == f.getPosition()) { |
|
|
|
return mode; |
|
|
|
} |
|
|
|