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

Function prevCol

src/gamesbyexample/chancecheckers.py:107–112  ·  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

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

Callers 2

getPossibleDstMovesFunction · 0.70
makeMoveFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected