home *** CD-ROM | disk | FTP | other *** search
- /*
- * File: mod.v4.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)
- vonn_nbors *nbors;
- {
- int sum;
-
- Get_vonn_nbors;
- sum = t + c + b + l + r;
- return (sum%4);
- }
-