Пример #1
0
 public static int GetInfluenceByColumn(this Game game, GameReputationTileLocation column)
 {
     if (InfluenceByColumn.ContainsKey(column))
     {
         return(InfluenceByColumn[column]);
     }
     return(0);
 }
 public static int GetInfluenceByColumn(this Game game, GameReputationTileLocation column)
 {
     if(InfluenceByColumn.ContainsKey(column))
     {
         return InfluenceByColumn[column];
     }
     return 0;
 }
        public ReputationTileLocationViewModel(string userName, Player player, GameReputationTileLocation location)
        {
            IsPlayerBoardOfActivePlayer = player.Id == player.Game.CurrentPlayer.Id;
            IsActivePlayer = FormHelper.IsActivePlayer(userName, player.Game);
            IsValidActionState = player.Game.CurrentTurn.CurrentAction.State == GameActionState.Reputation;

            Player = player;
            State = GameActionState.ReputationToBoard;
            Location = location;
            Tile = player.Tiles.FirstOrDefault(t => t.Column == location);
            BonusClass = IconCss.BonusClass[IconCss.PlayerReputationLocationToBonus[location]];
        }
        public ReputationTileLocationViewModel(string userName, Player player, GameReputationTileLocation location)
        {
            IsPlayerBoardOfActivePlayer = player.Id == player.Game.CurrentPlayer.Id;
            IsActivePlayer     = FormHelper.IsActivePlayer(userName, player.Game);
            IsValidActionState = player.Game.CurrentTurn.CurrentAction.State == GameActionState.Reputation;

            Player     = player;
            State      = GameActionState.ReputationToBoard;
            Location   = location;
            Tile       = player.Tiles.FirstOrDefault(t => t.Column == location);
            BonusClass = IconCss.BonusClass[IconCss.PlayerReputationLocationToBonus[location]];
        }
Пример #5
0
 public static GameReputationTile GetReputationTileByLocation(this Game game, ArtType row, GameReputationTileLocation column)
 {
     return(game.ReputationTiles.Where(r => r.Column == column && r.Row == row).Single());
 }
 public static GameReputationTile GetReputationTileByLocation(this Game game, ArtType row, GameReputationTileLocation column)
 {
     return game.ReputationTiles.Where(r => r.Column == column && r.Row == row).Single();
 }