Пример #1
0
    public void TestGameStateNotEqual1()
    {
        List <Player> players = new List <Player>();

        players.Add(RM.RandomPlayer(23, 123));
        players.Add(RM.RandomPlayer(24, 92));
        List <ProjectCard> pc = new List <ProjectCard>();

        pc.Add(new ProjectCard(RM.RandomCard(), CardDice.I));
        pc.Add(new ProjectCard(RM.RandomCard(), CardDice.II));
        pc.Add(new ProjectCard(RM.RandomCard(), CardDice.III));
        pc.Add(new ProjectCard(RM.RandomCard(), CardDice.IV));

        GameState gs1 = RM.RandomGameState(players, pc, RM.RandomBonusList(20));

        GameState gs2 = gs1.Stringify().ParseToGameState();

        if (gs2.CurrentRound == Round.A)
        {
            gs2.CurrentRound = Round.B;
        }
        else
        {
            gs2.CurrentRound = Round.A;
        }

        Assert.IsFalse(gs1.IsEqualTo(gs2));
    }
Пример #2
0
    public void TestGameStateEqual4()
    {
        List <Player>      players = new List <Player>();
        List <ProjectCard> pc      = new List <ProjectCard>();

        GameState gs1 = RM.RandomGameState(players, pc, RM.RandomBonusList(20));

        GameState gs2 = gs1.Stringify().ParseToGameState();

        Assert.IsTrue(gs1.IsEqualTo(gs2));
    }
Пример #3
0
    public void TestGameStateEqual1()
    {
        List <Player> players = new List <Player>();

        players.Add(RM.RandomPlayer(23, 123));
        players.Add(RM.RandomPlayer(24, 92));
        List <ProjectCard> pc = new List <ProjectCard>();

        pc.Add(new ProjectCard(RM.RandomCard(), CardDice.I));
        pc.Add(new ProjectCard(RM.RandomCard(), CardDice.II));
        pc.Add(new ProjectCard(RM.RandomCard(), CardDice.III));
        pc.Add(new ProjectCard(RM.RandomCard(), CardDice.IV));

        GameState gs1 = RM.RandomGameState(players, pc, RM.RandomBonusList(20));

        GameState gs2 = gs1.Stringify().ParseToGameState();

        Assert.IsTrue(gs1.IsEqualTo(gs2));
    }