Exemplo n.º 1
0
    public Game(string tilesConfig, string scheduleConfig, int numOfPlayers)
    {
        Width             = 8;
        Height            = 8;
        this.NumOfPlayers = numOfPlayers;
        this.Stations     = new Station[32];

        board = new Tile[Width, Height];
        TileRepository tileRepository = new TileRepository(tilesConfig);

        stack = new TilesStack(tileRepository);
        LoadScheduleConfig(scheduleConfig);
    }
Exemplo n.º 2
0
    public void ReturnToStackTest()
    {
        TilesStack ts = new TilesStack(new TileRepository(config));

        int i = 1000;

        while (i > 0)
        {
            Tile t = ts.Pop();
            Assert.NotNull(t);
            ts.ReturnToStack(t);
            Tile s = ts.Pop();
            Assert.NotNull(s);
            if (t != s)
            {
                return;
            }
        }

        Assert.Fail();
    }