home *** CD-ROM | disk | FTP | other *** search
- /*
- * File: mod.l4r3.c
- * By: Dave Hiebeler
- * hiebeler@turing.cs.rpi.edu
- * August 1989
- *
- * Add up the neighbors and return the sum mod 4.
- */
-
-
- #include "nborhood.h"
-
- byte mod_rule();
-
-
- void
- init_function()
- {
- update_function = mod_rule;
- }
-
-
- byte
- mod_rule(nbors)
- lr3_nbors *nbors;
- {
- Get_lr3_nbors;
- return (lll+ll+l+c+r+rr+rrr)%4;
-
- }
-