Commit fcc3e32a authored by Quentin DRUAULT-AUBIN's avatar Quentin DRUAULT-AUBIN Committed by Paul Jeannot
Browse files

[Table] Pass my player in parameter of placeMine

parent f22e5e0d
...@@ -233,6 +233,11 @@ public class InGameGUIController { ...@@ -233,6 +233,11 @@ public class InGameGUIController {
*/ */
private Player currentPlayer; private Player currentPlayer;
/**
* Me.
*/
private Player myPlayer;
/** /**
* True if playing review game * True if playing review game
...@@ -389,6 +394,8 @@ public class InGameGUIController { ...@@ -389,6 +394,8 @@ public class InGameGUIController {
updateStatsPannel(); updateStatsPannel();
// Get the current player. // Get the current player.
currentPlayer = facade.getFacadeData().getGame().getCurrentPlayer(); currentPlayer = facade.getFacadeData().getGame().getCurrentPlayer();
// Get my player.
myPlayer = facade.getFacadeData().getGame().getPlayer(facade.getFacadeData().getMyPublicUserProfile().getId());
} }
/** /**
...@@ -575,7 +582,7 @@ public class InGameGUIController { ...@@ -575,7 +582,7 @@ public class InGameGUIController {
// in a Mine returned with attack) // in a Mine returned with attack)
Pair<Integer, Ship> fireResult = facade.getFacadeData().attack(cellToAttack, true); Pair<Integer, Ship> fireResult = facade.getFacadeData().attack(cellToAttack, true);
placeMine(cellToAttack,currentPlayer); placeMine(cellToAttack, myPlayer);
// Update stats pannel // Update stats pannel
currentPlayerStats.turnPlayed((fireResult.getKey() == 1), (fireResult.getValue() != null)); currentPlayerStats.turnPlayed((fireResult.getKey() == 1), (fireResult.getValue() != null));
......
Supports Markdown
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