Exemple #1
0
        public void AllDontMatchDifferentType()
        {
            var pieces = new Piece[] {
                new Piece(PieceType.Get(1), 2),
                new Piece(PieceType.Get(0), 2),
                new Piece(PieceType.Get(0), 2)
            };

            Assert.IsFalse(Piece.AllMatch(pieces));
        }
Exemple #2
0
        public void AllMatch()
        {
            var pieces = new Piece[] {
                new Piece(PieceType.Get(0), 1),
                new Piece(PieceType.Get(0), 1),
                new Piece(PieceType.Get(0), 1)
            };

            Assert.IsTrue(Piece.AllMatch(pieces));
            pieces = new Piece[] {
                new Piece(PieceType.Get(0), 2),
                new Piece(PieceType.Get(0), 2),
                new Piece(PieceType.Get(0), 2)
            };
            Assert.IsTrue(Piece.AllMatch(pieces));
        }