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

Function prevCol

src/gamesbyexample/checkers.py:103–108  ·  view source on GitHub ↗

Return the column letter that comes before column. Returns '' if column 'A'.

(column)

Source from the content-addressed store, hash-verified

101
102
103def prevCol(column):
104 """Return the column letter that comes before column.
105
106 Returns '' if column 'A'."""
107 return {'': '', 'A': '', 'B': 'A', 'C': 'B', 'D': 'C',
108 'E': 'D', 'F': 'E', 'G': 'F', 'H': 'G'}[column]
109
110
111def nextCol(column):

Callers 2

getPossibleDstMovesFunction · 0.70
makeMoveFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected