示例#1
0
        private void ScoreTeamPoints(DayOfWeek day)
        {
            int net_score = 0;

            net_score += 1 * (PublicBoard.HasMajority(day) ? 1 : -1);
            if (PublicBoard.HasMajority(day))
            {
                MajorityCount++;
            }
            PublicBoard.AddTeamScore(net_score);
        }
示例#2
0
        private void ScoreVPs(DayOfWeek day)
        {
            foreach (Restaurant restaurant in Extensions.Restaurants)
            {
                foreach (PlayerBase player in PublicBoard.Restaurants[restaurant].Visitors[day])
                {
                    foreach (FoodType food in PublicBoard.FavoriteFood[player])
                    {
                        if (PublicBoard.Restaurants[restaurant].Menu.Contains(food))
                        {
                            PublicBoard.AddVictoryPointsToPlayer(1, player, VictoryPointsSource.Food);
                        }
                    }
                }
            }

            Players.ActionForCharacter(Character.HR, player =>
            {
                if (PublicBoard.IsPlayerInMajority(day, player))
                {
                    if (player.ShouldSwitchCashForVPAndTP(PublicBoard, -1, 1, 0))
                    {
                        PublicBoard.AddCashToPlayer(-1, player);
                        PublicBoard.AddVictoryPointsToPlayer(1, player, VictoryPointsSource.Character);
                    }
                }
            });
            Players.ActionForCharacter(Character.Marketing, player =>
            {
                if (!PublicBoard.IsPlayerInMajority(day, player))
                {
                    if (player.ShouldSwitchCashForVPAndTP(PublicBoard, -3, 2, 1))
                    {
                        PublicBoard.AddCashToPlayer(-3, player);
                        PublicBoard.AddVictoryPointsToPlayer(2, player, VictoryPointsSource.Character);
                        PublicBoard.AddTeamScore(1);
                    }
                }
            });
            Players.ActionForCharacter(Character.Programmer, player =>
            {
                if (!PublicBoard.IsPlayerInMajority(day, player) && !PublicBoard.IsPlayerAlone(day, player))
                {
                    PublicBoard.AddVictoryPointsToPlayer(3, player, VictoryPointsSource.Character);
                }
            });
            Players.ActionForCharacter(Character.Environment, player =>
            {
                if (PublicBoard.VisitedPlaces[player][day].Menu.Contains(FoodType.Vegetarian))
                {
                    PublicBoard.AddVictoryPointsToPlayer(2, player, VictoryPointsSource.Character);
                }
            });
        }
示例#3
0
 private void ScoreTeamBonus()
 {
     if (PublicBoard.CurrentTeamBonus.HasCompletedTeamBonus(this.PublicBoard))
     {
         PublicBoard.AddTeamScore(2);
         PublicBoard.TeamBonusDoneCount++;
         Players.ActionForCharacter(Character.HR, (player) => PublicBoard.AddVictoryPointsToPlayer(2, player, VictoryPointsSource.Character));
     }
     else
     {
         PublicBoard.AddTeamScore(-2);
     }
     PublicBoard.ClearUndesiredRestaurants();
 }
示例#4
0
 private void ScoreDailyModifiers(DayOfWeek day)
 {
     foreach (Restaurant restaurant in Extensions.Restaurants)
     {
         if (PublicBoard.RestaurantHasModifierForThisDay <OneTeamPointIfMajority>(restaurant, day) && PublicBoard.HasMajority(day))
         {
             PublicBoard.AddTeamScore(1);
         }
         if (PublicBoard.RestaurantHasModifierForThisDay <OneVictoryPointBonus>(restaurant, day))
         {
             foreach (PlayerBase player in PublicBoard.Restaurants[restaurant].Visitors[day])
             {
                 PublicBoard.AddVictoryPointsToPlayer(1, player, VictoryPointsSource.DailyModifier);
             }
         }
     }
 }