# 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
from .helpers import C, WHITE, BLACK, NONE
        from chess.models import Board
        from chess.models import tie_nomove
        board = self.get_board(config)
        board.who_moves = BLACK

        result = self.get_tie(board)
        self.assertFalse(result)

    def test_whitetie(self):
        config = '........' + \
                 '........' + \
                 '........' + \
                 '.....p..' + \
                 '.....P..' + \
                 '........' + \
                 '........' + \
                 '........' 
        board = self.get_board(config)

        result = self.get_tie(board)
        self.assertTrue(result)

    def test_blacktie(self):
        config = '........' + \
                 '........' + \
                 '........' + \
                 '.....p..' + \
                 '.....P..' + \
                 '........' + \
                 '........' + \
                 '........' 
        board = self.get_board(config)

# 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_tie_nomove.py
import unittest
from .helpers import C, WHITE, BLACK, NONE
        from chess.models import Board
        from chess.models import tie_nomove

        board = self.get_board(config)
        board.who_moves = BLACK

        result = self.get_tie(board)
        self.assertFalse(result)

    def test_whitetie(self):
        config = '........' + \
                 '........' + \
                 '........' + \
                 '.....p..' + \
                 '.....P..' + \
                 '........' + \
                 '........' + \
                 '........' 
        board = self.get_board(config)

        result = self.get_tie(board)
        self.assertTrue(result)

    def test_blacktie(self):
        config = '........' + \
                 '........' + \
                 '........' + \
                 '.....p..' + \
                 '.....P..' + \
                 '........' + \
                 '........' + \
                 '........' 
        board = self.get_board(config)

        board.who_moves = BLACK