예제 #1
0
 public Player(PlayerSeat seat, GameParameters gameParameters, Observer gameEvents)
 {
     GameParameters      = gameParameters;
     Seat                = seat;
     StartTurnMechanics  = new StartTurnMechanics(this);
     FinishTurnMechanics = new FinishTurnMechanics(this);
     GameEvents          = gameEvents;
 }
예제 #2
0
        //----------------------------------------------------------------------------------------------------------

        #region Initialization

        public TurnBasedFsm(IGameController handler, IGameData gameData, GameParameters gameParameters,
                            Observer gameEvents) :
            base(handler)
        {
            GameParameters = gameParameters;
            GameEvents     = gameEvents;
            Handler        = handler;
            GameData       = gameData;
            Initialize();
        }
예제 #3
0
        //----------------------------------------------------------------------------------------------------------

        #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;
        }
예제 #5
0
 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)
 {
 }
예제 #7
0
        //----------------------------------------------------------------------------------------------------------

        #region Constructor

        protected AiTurnState(TurnBasedFsm fsm, IGameData gameData, GameParameters gameParameters,
                              Observer gameEvents) :
            base(fsm, gameData, gameParameters, gameEvents)
        {
        }