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

Function otherCheckers

src/gamesbyexample/checkers.py:119–122  ·  view source on GitHub ↗

Return a string of the opponent's checkers.

(checker)

Source from the content-addressed store, hash-verified

117
118
119def otherCheckers(checker):
120 """Return a string of the opponent's checkers."""
121 return {'x': ('o', 'O'), 'X': ('o', 'O'),
122 'o': ('x', 'X'), 'O': ('x', 'X')}[checker]
123
124
125def getPossibleDstMoves(board, srcSpace):

Callers 2

mainFunction · 0.70
getPossibleDstMovesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected