next up previous contents
Next: Body Count! Up: Procedures Previous: Solution

 

Optimised Life

CSHIFT was used to count the number of neighbouring live cells. You can optimise the code to do the count with only four CSHIFT operations instead of eight. This requires the use of a temporary array the same size as board. For each array element,

Go back to Notes gif


next up previous contents
Next: Body Count! Up: Procedures Previous: Solution

©University of Liverpool, 1997
Thu May 29 10:11:26 BST 1997
Not for commercial use.