예제 #1
0
 public void BuildPlantation(Plantation plantation)
 {
     if (CanBuildIslandObject())
     {
         _plantations.Add(plantation);
     }
 }
예제 #2
0
        public static List<PlayerStatus> GeneratePlayers(MainBoardController mainBoardController, int playersCount, string[] names)
        {
            var result = new List<PlayerStatus>();
            for (int i = 0; i < playersCount; i++)
            {
                var player = new PlayerStatus(i, names[i]);
                var doubloons = Constants.DoubloonsByPlayers[playersCount];
                player.ReceiveDoubloons(mainBoardController.TakeDoubloons(doubloons));
                var plantation =
                    new Plantation(Constants.PlantationsByPlayersOrder[new Tuple<int, int>(i + 1, playersCount)]);
                player.Board.BuildPlantation(plantation);

                result.Add(player);
            }

            return result;
        }