MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / step_cell

Function step_cell

example_code/item_074.py:128–132  ·  view source on GitHub ↗
(y, x, get_cell, set_cell)

Source from the content-addressed store, hash-verified

126 return state
127
128def step_cell(y, x, get_cell, set_cell):
129 state = get_cell(y, x)
130 neighbors = count_neighbors(y, x, get_cell)
131 next_state = game_logic(state, neighbors)
132 set_cell(y, x, next_state)
133
134
135print("Example 2")

Callers

nothing calls this directly

Calls 2

count_neighborsFunction · 0.70
game_logicFunction · 0.70

Tested by

no test coverage detected