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,


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

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 14:10:26 GMT 1996