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

[Data] Forward mine

parent 95cfb7aa
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;
......
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