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); }
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); } }); }
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(); }
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); } } } }