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