# Path: tests/helpers.py
# def C(pos):
#     row = int(pos[1]) - 1
#     col = POS[pos[0]]
#     return row, col
# 
# WHITE = 1
# 
# BLACK = -1
# 
# NONE = 0


import unittest
        import chess
from .helpers import C, WHITE, BLACK, NONE
        from chess.models import Board
        from chess.models import win_maxinfractions
            "slot_0_port": 50100,
            "slot_1_ip": "",
            "slot_1_port": 50200,
            "update_frequency": 10,
            "max_move_time": 5.9,
            "max_infractions": 10
        }

    def get_board(self, *args, **kwargs):
        return Board(*args, **kwargs)

    def get_win(self, *args, **kwargs):
        return win_maxinfractions(*args, **kwargs)

    def test_nowin(self):
        config = 'r......r' + \
                 'pppppppp' + \
                 '........' + \
                 '........' + \
                 '........' + \
                 '........' + \
                 'PPPPPPPP' + \
                 'R......R' 
        board = self.get_board(config)
        board.white_infractions = 9
        board.black_infractions = 9

        result = self.get_win(board)
        self.assertEqual(result, NONE)
        

# Path: tests/helpers.py
# def C(pos):
#     row = int(pos[1]) - 1
#     col = POS[pos[0]]
#     return row, col
# 
# WHITE = 1
# 
# BLACK = -1
# 
# NONE = 0


# Path: tests/test_win_maxinfractions.py
import unittest
        import chess
from .helpers import C, WHITE, BLACK, NONE
        from chess.models import Board
        from chess.models import win_maxinfractions

            "slot_0_port": 50100,
            "slot_1_ip": "",
            "slot_1_port": 50200,
            "update_frequency": 10,
            "max_move_time": 5.9,
            "max_infractions": 10
        }

    def get_board(self, *args, **kwargs):
        return Board(*args, **kwargs)

    def get_win(self, *args, **kwargs):
        return win_maxinfractions(*args, **kwargs)

    def test_nowin(self):
        config = 'r......r' + \
                 'pppppppp' + \
                 '........' + \
                 '........' + \
                 '........' + \
                 '........' + \
                 'PPPPPPPP' + \
                 'R......R' 
        board = self.get_board(config)
        board.white_infractions = 9
        board.black_infractions = 9

        result = self.get_win(board)
        self.assertEqual(result, NONE)
        

    def test_whitewin(self):