Parallel Implementation
In this stage, you are required to write code to evolve Game of Life using multiple worker goroutines on a single machine.
The following pages are some suggested steps to help you get started, you are not required to follow them.
Your implementation will be marked against the success criteria outlined here.
Step 3
The lab sheets included the use of a timer.
Now using a ticker, report the number of cells that are still alive every 2 seconds.
To report the count use the AliveCellsCount
event.
Test
To test your implementation, type the following in the terminal.
go test -v -run TestAlive
Troubleshooting
You can check what the correct number of alive cells is by looking at the .csv
files in the check/alive/
folder.
You might find that you are reporting the count for the turn before or turn after. If this happens the CompletedTurns
might be what is wrong, not the count