예제 #1
0
파일: tests.py 프로젝트: M0r13n/chess
    def run(self):
        from chess import Board, Move

        b = Board("rnbqkbnr/ppp1pppp/8/1B1p4/4P3/8/PPPP1PPP/RNBQK1NR b KQkq - 1 2")
        assert b.stalemate()
        assert not b.checkmate()

        b = Board("rnb1kbnr/pppp1ppp/4p3/8/6Pq/5P2/PPPPP2P/RNBQKBNR w KQkq - 1 3")
        assert b.stalemate()
        assert b.checkmate()
예제 #2
0
파일: tests.py 프로젝트: M0r13n/chess
    def run(self):
        from chess import Board, Move

        b = Board()
        b.make_move(Move.from_uci("f2f3"))
        b.make_move(Move.from_uci("e7e6"))

        b.make_move(Move.from_uci("g2g4"))
        b.make_move(Move.from_uci("d8h4"))

        assert (b.checkmate())