Commit 25479717 authored by dkonam's avatar dkonam

Data | fix users

parent b9ee3b43
......@@ -246,7 +246,7 @@ public class ComputerPlayer extends Player {
if (this.stackFocus.isEmpty()) {
//System.out.println("random method");
Random r = new Random();
if (r.nextInt(6) != 1) {
if (r.nextInt(7) != 1) {
do {
valid = true;
//choose a new location until empty
......
......@@ -339,11 +339,23 @@ public class InGameGUIController {
// Get my player.
myPlayer = facade.getFacadeData().getGame().getPlayer(facade.getFacadeData().getMyPublicUserProfile().getId());
for(Player p : facade.getFacadeData().getGame().getPlayers())
{
System.out.println(p);
}
// Spectator.
if (myPlayer == null) {
System.out.println("je suis spectator");
isSpectator = true;
mySpectator = facade.getFacadeData().getMyPublicUserProfile();
}
else
{
System.out.println("je suis player");
}
// Player not able to fire
readyToAttack = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment