MCPcopy Create free account
hub / github.com/asweigart/PythonStdioGames / test_makeMove

Function test_makeMove

tests/test_chancecheckers.py:95–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93
94
95def test_makeMove():
96 board = chancecheckers.getNewBoard()
97 board = chancecheckers.makeMove(board, 'B3', 'A4')
98 assert board['B3'] == chancecheckers.EMPTY
99 assert board['A4'] == 'x'
100
101 board = chancecheckers.getNewBoard()
102 board['B3'] = chancecheckers.EMPTY
103 board['D5'] = 'x'
104 board = chancecheckers.makeMove(board, 'E6', 'C4')
105 assert board['E6'] == chancecheckers.EMPTY
106 assert board['C4'] == 'o'
107 assert board['D5'] == chancecheckers.EMPTY
108
109
110def test_hasLost():

Callers

nothing calls this directly

Calls 1

makeMoveMethod · 0.80

Tested by

no test coverage detected