Skip to content

Instantly share code, notes, and snippets.

@jezinka
Created August 1, 2018 10:16
Show Gist options
  • Select an option

  • Save jezinka/4456528bc3940000e84b8ebf164291d2 to your computer and use it in GitHub Desktop.

Select an option

Save jezinka/4456528bc3940000e84b8ebf164291d2 to your computer and use it in GitHub Desktop.
step
void step() {
Board tmpBoard = new Board(this.board)
for (int x = 0; x < this.x; x++) {
for (int y = 0; y < this.y; y++) {
Cell cell = board[x][y]
Event event = getEvent(x, y, cell.state)
tmpBoard.board[x][y] = StateMachineDefinition.transition(event, cell)
}
}
this.board = tmpBoard.board
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment