Home My Page Projects Code Snippets Project Openings diderot
 Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/lamont/test/life2/life.diderot
 [diderot] / branches / lamont / test / life2 / life.diderot

Diff of /branches/lamont/test/life2/life.diderot

revision 3367, Mon Nov 2 13:05:52 2015 UTC revision 3368, Mon Nov 2 13:13:50 2015 UTC
# Line 27  Line 27
27           print(id, ": ", val, " @ [", pos[0], ",", pos[1], "]\n");           print(id, ": ", val, " @ [", pos[0], ",", pos[1], "]\n");
28        }        }
29        int nn = 0;        int nn = 0;
30          int totnn = 0;
31        foreach (cell c in sphere(rr)) {        foreach (cell c in sphere(rr)) {
32             totnn += 1;
33           nn += 1 if (c.val > 0.5) else 0;           nn += 1 if (c.val > 0.5) else 0;
34           if (iter == iterMax-1) {           if (iter == iterMax-1) {
35              print("     ", c.id, ": ", c.val, " @ [", c.pos[0], ",", c.pos[1], "]; nn --> ", nn, "\n");              print("     ", c.id, ": ", c.val, " @ [", c.pos[0], ",", c.pos[1], "]; nn --> ", nn, "\n");
36           }           }
37        }        }
38          if (pos[0] > 0.1 && pos[1] > 0.1 && pos[0] < sizeX-1.1 && pos[1] < sizeY-1.1) {
39             if (8 != totnn) {
40                print("   HEY HEY tot # neighbors ", totnn, " != 8 !!!!\n");
41             }
42          }
43        val = (1 if (3 == nn) else        val = (1 if (3 == nn) else
44               (val if (2 == nn) else               (val if (2 == nn) else
45                0));                0));

Legend:
 Removed from v.3367 changed lines Added in v.3368

 root@smlnj-gforge.cs.uchicago.edu ViewVC Help Powered by ViewVC 1.0.0