# Path: betago/gtp/board.py
# def coords_to_gtp_position(coords):
#     """Convert (row, col) tuple to GTP board locations.
# 
#     Example:
#     >>> coords_to_gtp_position((0, 0))
#     'A1'
#     """
#     row, col = coords
#     # coords are zero-indexed, GTP is 1-indexed.
#     return COLS[col] + str(row + 1)
# 
# def gtp_position_to_coords(gtp_position):
#     """Convert a GTP board location to a (row, col) tuple.
# 
#     Example:
#     >>> gtp_position_to_coords('A1')
#     (0, 0)
#     """
#     col_str, row_str = gtp_position[0], gtp_position[1:]
#     return (int(row_str) - 1, COLS.find(col_str))


import unittest
from betago.gtp.board import coords_to_gtp_position, gtp_position_to_coords



class GTPCoordinateTest(unittest.TestCase):
    def test_coords_to_gtp_position(self):
        self.assertEqual('A1', coords_to_gtp_position((0, 0)))
        self.assertEqual('J3', coords_to_gtp_position((2, 8)))
        self.assertEqual('B15', coords_to_gtp_position((14, 1)))

    def test_gtp_position_to_coords(self):
        self.assertEqual((0, 0), gtp_position_to_coords('A1'))

# Path: betago/gtp/board.py
# def coords_to_gtp_position(coords):
#     """Convert (row, col) tuple to GTP board locations.
# 
#     Example:
#     >>> coords_to_gtp_position((0, 0))
#     'A1'
#     """
#     row, col = coords
#     # coords are zero-indexed, GTP is 1-indexed.
#     return COLS[col] + str(row + 1)
# 
# def gtp_position_to_coords(gtp_position):
#     """Convert a GTP board location to a (row, col) tuple.
# 
#     Example:
#     >>> gtp_position_to_coords('A1')
#     (0, 0)
#     """
#     col_str, row_str = gtp_position[0], gtp_position[1:]
#     return (int(row_str) - 1, COLS.find(col_str))


# Path: tests/gtp/board_test.py
import unittest
from betago.gtp.board import coords_to_gtp_position, gtp_position_to_coords




class GTPCoordinateTest(unittest.TestCase):
    def test_coords_to_gtp_position(self):
        self.assertEqual('A1', coords_to_gtp_position((0, 0)))
        self.assertEqual('J3', coords_to_gtp_position((2, 8)))
        self.assertEqual('B15', coords_to_gtp_position((14, 1)))

    def test_gtp_position_to_coords(self):
        self.assertEqual((0, 0), gtp_position_to_coords('A1'))

        self.assertEqual((2, 8), gtp_position_to_coords('J3'))