diff options
author | Nils Schneider <nils.schneider@gmail.com> | 2011-11-06 21:14:53 +0100 |
---|---|---|
committer | Nils Schneider <nils.schneider@gmail.com> | 2011-11-06 21:14:53 +0100 |
commit | 6131f4d269ab49b56a80a1337678a77e040d5be0 (patch) | |
tree | cf9896b5ef736f01eb54be58abe1543548b82ef9 /Matrix_5x6 | |
parent | c85889e2d2c15e8166435b376bf36367a28ca844 (diff) | |
download | ledmatrix-6131f4d269ab49b56a80a1337678a77e040d5be0.tar ledmatrix-6131f4d269ab49b56a80a1337678a77e040d5be0.zip |
leicht veränderte schnecke, zufällige schneckenstartpunkte+ TODO
Diffstat (limited to 'Matrix_5x6')
-rw-r--r-- | Matrix_5x6/Charlie/Charlie.pde | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Matrix_5x6/Charlie/Charlie.pde b/Matrix_5x6/Charlie/Charlie.pde index d863a03..fa7f4a0 100644 --- a/Matrix_5x6/Charlie/Charlie.pde +++ b/Matrix_5x6/Charlie/Charlie.pde @@ -1,5 +1,11 @@ #include <Charlieplex.h> +/* TODO: + * Laufschrift + * Ameise + * Game of Life + */ + #define NUMBER_OF_PINS 6 byte pins[] = {2,3,4,5,6,7}; Charlieplex charlieplex = Charlieplex(pins,NUMBER_OF_PINS); @@ -118,10 +124,13 @@ void schnecke(int s) { break; } + int i; + i = 0; while (1) { + i++; if (scr[x][y]) break; - scr[x][y] = 20; + scr[x][y] = w?20:i+5; drawscr(2); fadescr_down(); @@ -139,7 +148,8 @@ void schnecke(int s) { case 3: y--; break; } } - int i = 20; + + i = 20; while(i--) { fadescr_down(); drawscr(2); @@ -149,8 +159,5 @@ void schnecke(int s) { void loop() { // zufall_fading_up(); // zufall_fading_down(); - schnecke(0); - schnecke(1); - schnecke(2); - schnecke(3); + schnecke(random(4)); } |