Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Quentin DRUAULT-AUBIN
lo23-project
Commits
85b8b2ab
Commit
85b8b2ab
authored
Dec 12, 2017
by
Paul Jeannot
Committed by
Quentin DRUAULT-AUBIN
Dec 15, 2017
Browse files
[Stats Pannel] Integration of the stat pannel when J1 or J2 plays
parent
1c05ca75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Battleship/src/main/java/com/utclo23/ihmtable/controller/InGameGUIController.java
View file @
85b8b2ab
...
...
@@ -544,9 +544,13 @@ public class InGameGUIController {
// (the better would be for data to have the boolean information
// in a Mine returned with attack)
facade
.
getFacadeData
().
attack
(
cellToAttack
,
true
);
Pair
<
Integer
,
Ship
>
fireResult
=
facade
.
getFacadeData
().
attack
(
cellToAttack
,
true
);
placeMine
(
cellToAttack
,
currentPlayer
);
// Update stats pannel
currentPlayerStats
.
turnPlayed
((
fireResult
.
getKey
()
==
1
),
(
fireResult
.
getValue
()
!=
null
));
updateStatsPannel
();
// Reinitialize chrono for the next turn.
chronoTimeInit
();
// End of my turn.
...
...
@@ -1129,6 +1133,10 @@ public class InGameGUIController {
// Change the CSS class of the cells.
destroyShip
(
destroyedShip
,
playerGrid
);
}
// Update stats pannel
opponentStats
.
turnPlayed
(
touched
,
(
destroyedShip
!=
null
));
updateStatsPannel
();
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment