コード例 #1
0
ファイル: Residence.cs プロジェクト: mmaciejczuk/SanEscobar
        public override int CalculateEndGameBonus(PlayerBoard playerBoard)
        {
            if (Occupation.All(p => p != true))
            {
                return(0);
            }

            var plantationCount = playerBoard.IslandSpaces.Count(p => p != null);

            if (plantationCount > 9)
            {
                switch (plantationCount)
                {
                case 10:
                    return(5);

                case 11:
                    return(6);

                case 12:
                    return(7);

                default:
                    return(0);
                }
            }

            return(4);
        }
コード例 #2
0
ファイル: CityHall.cs プロジェクト: mmaciejczuk/SanEscobar
        public override int CalculateEndGameBonus(PlayerBoard playerBoard)
        {
            if (Occupation.All(p => p != true))
            {
                return(0);
            }

            return(playerBoard.CitySpaces.Count(p => p is SpecialBuildingTile || p is LargeBuildingTile));
        }
コード例 #3
0
        public override int CalculateEndGameBonus(PlayerBoard playerBoard)
        {
            if (Occupation.All(p => p != true))
            {
                return(0);
            }

            return(playerBoard.VictoryPoints % 4);
        }
コード例 #4
0
        public override int CalculateEndGameBonus(PlayerBoard playerBoard)
        {
            if (Occupation.All(p => p != true))
            {
                return(0);
            }

            var colonistsOnBuildingTilesCount = playerBoard.CitySpaces.Sum(p => p.Occupation.Count(c => c));
            var colonistsOnIslandTilesCount   = playerBoard.IslandSpaces.Count(p => p.Occupied);
            var totalColonistsCount           = colonistsOnIslandTilesCount + colonistsOnBuildingTilesCount +
                                                playerBoard.Colonists;

            return(totalColonistsCount % 3);
        }
コード例 #5
0
ファイル: GuildHall.cs プロジェクト: mmaciejczuk/SanEscobar
        public override int CalculateEndGameBonus(PlayerBoard playerBoard)
        {
            if (Occupation.All(p => p != true))
            {
                return(0);
            }

            var smallProductionBuildingBonus =
                playerBoard.CitySpaces.Count(p => p is SmallIndigoPlant || p is SmallSugarMill);
            var largeProductionBuildingBonus =
                playerBoard.CitySpaces.Count(
                    p => p is LargeIndigoPlant || p is LargeSugarMill || p is TobaccoStorage || p is CoffeeRoaster) * 2;

            return(smallProductionBuildingBonus + largeProductionBuildingBonus);
        }