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

Function getNewFloor

src/gamesbyexample/floorpainters.py:83–91  ·  view source on GitHub ↗

Return a dictionary to represent the color of the "floor". The keys are (x, y) integer tuples and the values are color strings such as 'red' or 'black'.

()

Source from the content-addressed store, hash-verified

81
82
83def getNewFloor():
84 """Return a dictionary to represent the color of the "floor". The
85 keys are (x, y) integer tuples and the values are color strings
86 such as 'red' or 'black'."""
87 floor = {}
88 for x in range(WIDTH):
89 for y in range(HEIGHT):
90 floor[(x, y)] = 'black'
91 return floor
92
93
94class Painter:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected