Exemplo n.º 1
0
    public RealEstateMarket(int p_nb_players)
    {
        m_availables_tiles = new List<TileInstance> ();
        m_tileStacks = new TileStacks (p_nb_players);

        for (int i = 0; i < MAX_TILES; i++) {
            m_availables_tiles.Add (m_tileStacks.PopNextTile ());
        }
    }
Exemplo n.º 2
0
    public RealEstateMarket(int p_nb_players)
    {
        m_availables_tiles = new List <TileInstance> ();
        m_tileStacks       = new TileStacks(p_nb_players);

        for (int i = 0; i < MAX_TILES; i++)
        {
            m_availables_tiles.Add(m_tileStacks.PopNextTile());
        }
    }
Exemplo n.º 3
0
    public TileInstance RemoveTile(int n)
    {
        if (n < 0 || n > m_availables_tiles.Count)
        {
            Debug.LogError("Trying to pick an unbound tile ! Value : " + n);
            return(null);
        }

        TileInstance tile = m_availables_tiles [n];

        m_availables_tiles.RemoveAt(n);
        // We may here add a null tile. This is a desired behavior.
        // A null tile is considered has a hole in the real estate market.
        m_availables_tiles.Insert(0, m_tileStacks.PopNextTile());

        Suburbia.Bus.FireEvent(new EventTileRemovedFromREM(m_availables_tiles[0], n));

        return(tile);
    }