public Player(PlayerSeat seat, GameParameters gameParameters, Observer gameEvents) { GameParameters = gameParameters; Seat = seat; StartTurnMechanics = new StartTurnMechanics(this); FinishTurnMechanics = new FinishTurnMechanics(this); GameEvents = gameEvents; }
//---------------------------------------------------------------------------------------------------------- #region Initialization public TurnBasedFsm(IGameController handler, IGameData gameData, GameParameters gameParameters, Observer gameEvents) : base(handler) { GameParameters = gameParameters; GameEvents = gameEvents; Handler = handler; GameData = gameData; Initialize(); }
//---------------------------------------------------------------------------------------------------------- #region Constructor protected TurnState(TurnBasedFsm fsm, IGameData gameData, GameParameters gameParameters, Observer gameEvents) : base(fsm, gameData, gameParameters, gameEvents) { var game = GameData.RuntimeGame; //get player according to the seat Player = game.TurnLogic.GetPlayer(Seat); //register turn state Fsm.RegisterPlayerState(Player, this); }
//---------------------------------------------------------------------------------------------------------- #region Constructor protected BaseBattleState(TurnBasedFsm fsm, IGameData gameData, GameParameters gameParameters, Observer gameEvents) { Fsm = fsm; GameData = gameData; GameParameters = gameParameters; GameEvents = gameEvents; //Subscribe game events GameEvents.AddListener(this); IsInitialized = true; }
public EndBattleState(TurnBasedFsm fsm, IGameData gameData, GameParameters gameParameters, Observer gameEvents) : base(fsm, gameData, gameParameters, gameEvents) { }
public BottomPlayerState(TurnBasedFsm fsm, IGameData gameData, GameParameters gameParameters, Observer gameEvents) : base(fsm, gameData, gameParameters, gameEvents) { }
//---------------------------------------------------------------------------------------------------------- #region Constructor protected AiTurnState(TurnBasedFsm fsm, IGameData gameData, GameParameters gameParameters, Observer gameEvents) : base(fsm, gameData, gameParameters, gameEvents) { }