public GameContext(ServerRouter sr, string rn) { serverRouter = sr; mjModel = new GameModel(); serverController = new GameController(sr, mjModel); roomName = rn; serverState = new AfterInitialiseState(serverController); }
public AfterStartKyokuState(GameState ss) { this.serverController = ss.serverController; }
public EndState(GameState ss) { this.serverController = ss.serverController; }
public AfterHoraState(GameState ss) { this.serverController = ss.serverController; }
public AfterReachAccceptState(GameState ss, BlockingCollection<MjsonMessageAll> getMsgList) { this.serverController = ss.serverController; this.prevMsgList = getMsgList; }
public AfterReachDahaiState(GameState ss) { this.serverController = ss.serverController; }
public AfterInitialiseState(GameState ss) { this.serverController = ss.serverController; }
public AfterTsumoState(GameState ss) { this.serverController = ss.serverController; }
//ここからメッセージを受け取った際の状態遷移関数 public void GetMessage(MjsonMessageAll msgobj) { serverState = serverState.GetMessage(msgobj); }
public void GetJoin(MjsonMessageAll msgobj) { serverController.Join(msgobj.name); serverState = serverState.GetMessage(msgobj); }