(state, neighbors)
| 114 | return count |
| 115 | |
| 116 | def 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 | |
| 123 | def game_logic(state, neighbors): |
| 124 | if state == ALIVE: |