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

Function game_logic

example_code/item_072.py:116–121  ·  view source on GitHub ↗
(state, neighbors)

Source from the content-addressed store, hash-verified

114 return count
115
116def game_logic(state, neighbors):
117 # This version of the function is just to illustrate the point
118 # that I/O is possible, but for example code we'll simply run
119 # the normal game logic (below) so it's easier to understand.
120 # Do some blocking input/output in here:
121 data = my_socket.recv(100)
122
123def game_logic(state, neighbors):
124 if state == ALIVE:

Callers 1

step_cellFunction · 0.70

Calls 1

recvMethod · 0.80

Tested by

no test coverage detected