MCPcopy Index your code
hub / github.com/bslatkin/effectivepython / step_cell

Function step_cell

example_code/item_075.py:111–115  ·  view source on GitHub ↗
(y, x, get_cell, set_cell)

Source from the content-addressed store, hash-verified

109
110print("Example 2")
111async def step_cell(y, x, get_cell, set_cell):
112 state = get_cell(y, x)
113 neighbors = count_neighbors(y, x, get_cell)
114 next_state = await game_logic(state, neighbors)
115 set_cell(y, x, next_state)
116
117
118print("Example 3")

Callers 1

simulateFunction · 0.70

Calls 2

count_neighborsFunction · 0.70
game_logicFunction · 0.70

Tested by

no test coverage detected