# Path: tests/case_board.py
# class BoardTestCase(unittest.TestCase):
#     def setUp(self):
#         import chess
#         chess.config = {
#             "slot_0_ip": "",
#             "slot_0_port": 50100,
#             "slot_1_ip": "",
#             "slot_1_port": 50200,
#             "update_frequency": 10,
#             "max_move_time": 5.9,
#             "max_infractions": 5
#         }
# 
# 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 .case_board import BoardTestCase
from .helpers import C, WHITE, BLACK, NONE
        from chess.models import Board


def stub_win_position(board):
    piece = board[C('e5')]
    if piece is not None:
        if piece.repr == 'R':
            return WHITE
        elif piece.repr == 'p':
            return BLACK

    return 0

def stub_win_infraction(board):
    max_infractions = 10

    if board.black_infractions >= max_infractions:
        return WHITE


# Path: tests/case_board.py
# class BoardTestCase(unittest.TestCase):
#     def setUp(self):
#         import chess
#         chess.config = {
#             "slot_0_ip": "",
#             "slot_0_port": 50100,
#             "slot_1_ip": "",
#             "slot_1_port": 50200,
#             "update_frequency": 10,
#             "max_move_time": 5.9,
#             "max_infractions": 5
#         }
# 
# 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_board_win.py
import unittest
        import chess
from .case_board import BoardTestCase
from .helpers import C, WHITE, BLACK, NONE
        from chess.models import Board



def stub_win_position(board):
    piece = board[C('e5')]
    if piece is not None:
        if piece.repr == 'R':
            return WHITE
        elif piece.repr == 'p':
            return BLACK

    return 0

def stub_win_infraction(board):
    max_infractions = 10

    if board.black_infractions >= max_infractions:
        return WHITE


    if board.white_infractions >= max_infractions: