public Dictionary<Intersection, Piece> GetAllPieces() { return new Dictionary<Intersection, Piece>(settlements); }
public int GetPlayerScore(int playerId) { int result = 0; if (playerId == LargestArmyId) { result += 2; } if (playerId == LongestRoadId) { result += 2; } // add 2 for each city and 1 for each settlement Board.GetAllPieces().Where(p => p.Value.Player == playerId).ForEach(p => result += p.Value.Token == Token.City ? 2 : 1); return(result); }