Ejemplo n.º 1
0
        public void changeState(IRoomState state)
        {
            lock (_roomState)
            {
                _roomState = state;
            }

            OnChanged(new RoomChangedEventArgs(this));
        }
Ejemplo n.º 2
0
        public Room(int?playersMaxCount = null)
        {
            PlayersMaxCount = playersMaxCount;
            if (isPublic() && playersMaxCount < PlayersMinCount)
            {
                throw new Exception("");
            }

            Guid               = Guid.NewGuid();
            Players            = new List <User>();
            MakedMovePlayerIds = new List <int>();

            _roomState = new WaitingPlayersState(this);
        }
Ejemplo n.º 3
0
 public void change_state(ROOM_STATE_TYPE state)
 {
     this.current_room_state = this.room_states[state];
 }