Exemple #1
0
        private void AreBothTreasuresGone(List <IslandTile> IslandBoard, string TreasureName, TreasureStatue TreasureStatue)
        {
            var tileThatHaveTheStatues = IslandBoard.Where(x => x.CanHaveStatue == TreasureStatue.ToString()).ToList();

            if (TileGone(tileThatHaveTheStatues.First()) && TileGone(tileThatHaveTheStatues.Last()))
            {
                goneTileNames.Add(TreasureName);
            }
        }
        private IslandTile CreateIslandTile(string tileName, PlayerColour startingTileForPlayer, bool helicopterSite, TreasureStatue TreasureStatue, bool HasStatue)
        {
            var islandTile = new IslandTile();

            islandTile.Id   = Guid.NewGuid();
            islandTile.Name = tileName;
            islandTile.StartingTileForPlayer = startingTileForPlayer.ToString();
            islandTile.SubmergedState        = TileState.Normal.ToString();
            islandTile.HelicopterSite        = helicopterSite;
            islandTile.PlayersOnTile         = new List <Player>();
            islandTile.CanHaveStatue         = TreasureStatue.ToString();
            islandTile.HasStatue             = HasStatue;
            return(islandTile);
        }