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
7bafd58b
Commit
7bafd58b
authored
Dec 16, 2017
by
Quentin DRUAULT-AUBIN
Committed by
Paul Jeannot
Dec 17, 2017
Browse files
[Data] Forward mine
parent
95cfb7aa
Changes
1
Show whitespace changes
Inline
Side-by-side
Battleship/src/main/java/com/utclo23/data/module/GameMediator.java
View file @
7bafd58b
package
com.utclo23.data.module
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.SerializationFeature
;
import
com.utclo23.com.ComFacade
;
import
com.utclo23.data.module.DataException
;
import
com.utclo23.data.configuration.Configuration
;
import
com.utclo23.data.facade.DataFacade
;
import
com.utclo23.data.structure.ComputerPlayer
;
...
...
@@ -17,9 +14,7 @@ import com.utclo23.data.structure.Message;
import
com.utclo23.data.structure.Mine
;
import
com.utclo23.data.structure.StatGame
;
import
com.utclo23.ihmtable.IIHMTableToData
;
import
java.io.File
;
import
java.io.IOException
;
import
java.rmi.server.UID
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
...
...
@@ -224,6 +219,9 @@ public class GameMediator {
pairReturn
=
this
.
currentGame
.
attack
(
player
,
coordinate
,
isTrueAttack
);
// Forward to other players.
dataFacade
.
getComfacade
().
notifyNewCoordinates
(
new
Mine
(
player
,
coordinate
),
currentGame
.
getRecipients
());
//save with caretaker
this
.
currentGame
.
getCaretaker
().
add
(
this
.
currentGame
.
saveStateToMemento
());
return
pairReturn
;
...
...
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