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

Function test_makeMove

tests/test_checkers.py:96–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

makeMoveMethod · 0.80

Tested by

no test coverage detected