Esempio n. 1
0
    public void Day22_Should_Shuffle1(int[] cards)
    {
        var deck = new Day22.Deck(10);

        deck.Deal(7);
        deck.DealNew();
        deck.DealNew();

        Assert.True(deck.Cards.SequenceEqual(cards));
    }
Esempio n. 2
0
    public void Day22_Should_Deal_Into_New_Stack(int n, int[] cards)
    {
        var deck = new Day22.Deck(n);

        deck.DealNew();

        Assert.Equal(10, deck.Cards.Length);
        Assert.True(deck.Cards.SequenceEqual(cards));
    }
Esempio n. 3
0
    public void Day22_Should_Shuffle4(int[] cards)
    {
        var deck = new Day22.Deck(10);

        deck.DealNew();
        deck.Cut(-2);
        deck.Deal(7);
        deck.Cut(8);
        deck.Cut(-4);
        deck.Deal(7);
        deck.Cut(3);
        deck.Deal(9);
        deck.Deal(3);
        deck.Cut(-1);

        Assert.True(deck.Cards.SequenceEqual(cards));
    }