public PlayerInSessionModel(PositionModel pos, PlayerModel player, MapTileModel[,] map)
     : this()
 {
     this.NextPosition = new PositionModel(pos.Column, pos.Row);
     this.CurrentPosition = new PositionModel(pos.Column, pos.Row);
     this.Player = player;
     this.PrivateMap = CloneMap(map);
 }
Esempio n. 2
0
 public RoomModel(PlayerModel admin, string roomName)
 {
     WhenCreated = DateTime.Now;
     Players = new List<PlayerModel>();
     Name = roomName;
     Admin = admin;
     Admin.seatNumber = 1;
     Players.Add(admin);
 }
Esempio n. 3
0
        public bool AddPlayer(PlayerModel player)
        {
            if (!this.IsFull)
            {
                this.Players.Add(player);
                return true;
            }

            return false;
        }
Esempio n. 4
0
 public void RemovePlayer(PlayerModel player)
 {
     this.Players.Remove(player);
 }
Esempio n. 5
0
        public void ServerBroadcastAddPlayerToPlayerCollection(PlayerModel player)
        {
            PlayerManagerModel.Instance.AddPlayer(player);

            Clients.All.clientReceiveAddPlayerToPlayerCollection(PlayerManagerModel.Instance.PlayerCollection.Count, GetOnlinePlayerNames());
        }
Esempio n. 6
0
 private void RemovePlayerFromPlayerCollection(PlayerModel player)
 {
     PlayerManagerModel.Instance.PlayerCollection.Remove(player);
 }
Esempio n. 7
0
 public void AddPlayer(PlayerModel player)
 {
     PlayerCollection.Add(player);
 }