gregori a révisé ce gist 1 month ago. Aller à la révision
1 file changed, 14 insertions, 14 deletions
gistfile1.txt
| @@ -3,25 +3,25 @@ | |||
| 3 | 3 | |:rewind: yes? :playfield: ___ | :behind: ___ | |
| 4 | 4 | :: increment playfield size | |
| 5 | 5 | ||
| 6 | - | | :comment: if theres a dot in front of pac eat it | | |
| 7 | - | | :rewind: yes? :playfield: (pacman dot) | | |
| 6 | + | |:comment: if theres a dot in front of pac eat it | | |
| 7 | + | |:rewind: yes? :playfield: (pacman dot) | | |
| 8 | 8 | :behind: ___ | |
| 9 | 9 | :: increment playfield size | |
| 10 | 10 | :playfield: pacman | |
| 11 | 11 | ||
| 12 | - | | :comment: if theres a ghost in front of pac eat it | | |
| 13 | - | | :rewind: yes? :playfield: (pacman ghost) | | |
| 12 | + | |:comment: if theres a ghost in front of pac eat it | | |
| 13 | + | |:rewind: yes? :playfield: (pacman ghost) | | |
| 14 | 14 | :behind: ___ | |
| 15 | 15 | :: increment playfield size | |
| 16 | 16 | :playfield: pacman | |
| 17 | 17 | ||
| 18 | - | | :comment: if pac hits a wall set the done flag | | |
| 18 | + | |:comment: if pac hits a wall set the done flag | | |
| 19 | 19 | |:rewind: yes? :playfield: (pacman wall) | :status: done | |
| 20 | 20 | :ahead: (wall pacman) | |
| 21 | 21 | :: increment playfield size | |
| 22 | 22 | :: increment playfield size | |
| 23 | 23 | ||
| 24 | - | | :comment: otherwise move everything to the tracking tapes | | |
| 24 | + | |:comment: otherwise move everything to the tracking tapes | | |
| 25 | 25 | |:rewind: yes? :playfield: pacman | :ahead: pacman | |
| 26 | 26 | :: increment playfield size | |
| 27 | 27 | |:rewind: yes? :playfield: dot | :ahead: dot | |
| @@ -31,24 +31,24 @@ | |||
| 31 | 31 | |:rewind: yes :playfield: wall | :ahead: wall | |
| 32 | 32 | :: increment playfield size | |
| 33 | 33 | ||
| 34 | - | | :comment: use RPN for counting | | |
| 34 | + | |:comment: use RPN for counting | | |
| 35 | 35 | |:: increment playfield size :@rpn data: $id | | |
| 36 | 36 | :playfield size: $id | |
| 37 | 37 | |:: increment playfield size? :playfield size: $id | | |
| 38 | 38 | :@rpn: ($id 1 +) | |
| 39 | 39 | ||
| 40 | - | | :comment: make a note of how long the playfield was | | |
| 40 | + | |:comment: make a note of how long the playfield was | | |
| 41 | 41 | |:: :ahead: wall? :playfield size: $limit | | |
| 42 | 42 | :layout: ahead | |
| 43 | 43 | :full run: $limit | |
| 44 | 44 | ||
| 45 | - | | :comment: restore the playfield from the tapes | | |
| 46 | - | | :layout: ahead :ahead: pacman | :playfield: pacman | |
| 45 | + | |:comment: restore the playfield from the tapes | | |
| 46 | + | |:layout: ahead :ahead: pacman | :playfield: pacman | |
| 47 | 47 | :layout: behind | |
| 48 | 48 | :: decrement playfield size | |
| 49 | - | | :layout: ahead? :ahead: $a | :playfield: $a | |
| 49 | + | |:layout: ahead? :ahead: $a | :playfield: $a | |
| 50 | 50 | :: decrement playfield size | |
| 51 | - | | :layout: behind? :behind: $b | :playfield: $b | |
| 51 | + | |:layout: behind? :behind: $b | :playfield: $b | |
| 52 | 52 | :: decrement playfield size | |
| 53 | 53 | ||
| 54 | 54 | |:full run: $x |:playfield size: $x | |
| @@ -58,8 +58,8 @@ | |||
| 58 | 58 | :@rpn: ($id 1 -) | |
| 59 | 59 | ||
| 60 | 60 | |:comment: check if the frame is done and if the run is done | | |
| 61 | - | | :playfield size: 0? :layout: $x :status: done | :rewind: no | |
| 62 | - | | :playfield size: 0? :layout: $x | :rewind: yes | |
| 61 | + | |:playfield size: 0? :layout: $x :status: done | :rewind: no | |
| 62 | + | |:playfield size: 0? :layout: $x | :rewind: yes | |
| 63 | 63 | ||
| 64 | 64 | || :playfield: (___ ___ pacman dot dot dot ghost dot wall) | |
| 65 | 65 | || :playfield size: 0 | |
gregori a révisé ce gist 1 month ago. Aller à la révision
1 file changed, 11 insertions, 5 deletions
gistfile1.txt
| @@ -3,23 +3,25 @@ | |||
| 3 | 3 | |:rewind: yes? :playfield: ___ | :behind: ___ | |
| 4 | 4 | :: increment playfield size | |
| 5 | 5 | ||
| 6 | + | | :comment: if theres a dot in front of pac eat it | | |
| 6 | 7 | | :rewind: yes? :playfield: (pacman dot) | | |
| 7 | 8 | :behind: ___ | |
| 8 | 9 | :: increment playfield size | |
| 9 | - | :ahead: pacman | |
| 10 | - | :: increment playfield size | |
| 10 | + | :playfield: pacman | |
| 11 | 11 | ||
| 12 | + | | :comment: if theres a ghost in front of pac eat it | | |
| 12 | 13 | | :rewind: yes? :playfield: (pacman ghost) | | |
| 13 | 14 | :behind: ___ | |
| 14 | 15 | :: increment playfield size | |
| 15 | - | :ahead: pacman | |
| 16 | - | :: increment playfield size | |
| 16 | + | :playfield: pacman | |
| 17 | 17 | ||
| 18 | + | | :comment: if pac hits a wall set the done flag | | |
| 18 | 19 | |:rewind: yes? :playfield: (pacman wall) | :status: done | |
| 19 | 20 | :ahead: (wall pacman) | |
| 20 | 21 | :: increment playfield size | |
| 21 | 22 | :: increment playfield size | |
| 22 | 23 | ||
| 24 | + | | :comment: otherwise move everything to the tracking tapes | | |
| 23 | 25 | |:rewind: yes? :playfield: pacman | :ahead: pacman | |
| 24 | 26 | :: increment playfield size | |
| 25 | 27 | |:rewind: yes? :playfield: dot | :ahead: dot | |
| @@ -29,15 +31,18 @@ | |||
| 29 | 31 | |:rewind: yes :playfield: wall | :ahead: wall | |
| 30 | 32 | :: increment playfield size | |
| 31 | 33 | ||
| 34 | + | | :comment: use RPN for counting | | |
| 32 | 35 | |:: increment playfield size :@rpn data: $id | | |
| 33 | 36 | :playfield size: $id | |
| 34 | 37 | |:: increment playfield size? :playfield size: $id | | |
| 35 | 38 | :@rpn: ($id 1 +) | |
| 36 | 39 | ||
| 40 | + | | :comment: make a note of how long the playfield was | | |
| 37 | 41 | |:: :ahead: wall? :playfield size: $limit | | |
| 38 | 42 | :layout: ahead | |
| 39 | 43 | :full run: $limit | |
| 40 | 44 | ||
| 45 | + | | :comment: restore the playfield from the tapes | | |
| 41 | 46 | | :layout: ahead :ahead: pacman | :playfield: pacman | |
| 42 | 47 | :layout: behind | |
| 43 | 48 | :: decrement playfield size | |
| @@ -52,9 +57,10 @@ | |||
| 52 | 57 | |:: decrement playfield size? :playfield size: $id | | |
| 53 | 58 | :@rpn: ($id 1 -) | |
| 54 | 59 | ||
| 60 | + | |:comment: check if the frame is done and if the run is done | | |
| 55 | 61 | | :playfield size: 0? :layout: $x :status: done | :rewind: no | |
| 56 | 62 | | :playfield size: 0? :layout: $x | :rewind: yes | |
| 57 | 63 | ||
| 58 | - | || :playfield: (___ ___ pacman dot dot dot dot dot wall) | |
| 64 | + | || :playfield: (___ ___ pacman dot dot dot ghost dot wall) | |
| 59 | 65 | || :playfield size: 0 | |
| 60 | 66 | || :rewind: yes | |
gregori a révisé ce gist 1 month ago. Aller à la révision
1 file changed, 10 insertions, 4 deletions
gistfile1.txt
| @@ -1,10 +1,16 @@ | |||
| 1 | 1 | ||:@include: lib/rpn.nv | |
| 2 | 2 | ||
| 3 | - | |:rewind: yes? :playfield: _ | :behind: _ | |
| 3 | + | |:rewind: yes? :playfield: ___ | :behind: ___ | |
| 4 | 4 | :: increment playfield size | |
| 5 | 5 | ||
| 6 | 6 | | :rewind: yes? :playfield: (pacman dot) | | |
| 7 | - | :behind: _ | |
| 7 | + | :behind: ___ | |
| 8 | + | :: increment playfield size | |
| 9 | + | :ahead: pacman | |
| 10 | + | :: increment playfield size | |
| 11 | + | ||
| 12 | + | | :rewind: yes? :playfield: (pacman ghost) | | |
| 13 | + | :behind: ___ | |
| 8 | 14 | :: increment playfield size | |
| 9 | 15 | :ahead: pacman | |
| 10 | 16 | :: increment playfield size | |
| @@ -18,7 +24,7 @@ | |||
| 18 | 24 | :: increment playfield size | |
| 19 | 25 | |:rewind: yes? :playfield: dot | :ahead: dot | |
| 20 | 26 | :: increment playfield size | |
| 21 | - | |:rewind: yes? :playfield: ghost | :ahead: ghost | |
| 27 | + | |:rewind: yes? :playfield: dot | :ahead: ghost | |
| 22 | 28 | :: increment playfield size | |
| 23 | 29 | |:rewind: yes :playfield: wall | :ahead: wall | |
| 24 | 30 | :: increment playfield size | |
| @@ -49,6 +55,6 @@ | |||
| 49 | 55 | | :playfield size: 0? :layout: $x :status: done | :rewind: no | |
| 50 | 56 | | :playfield size: 0? :layout: $x | :rewind: yes | |
| 51 | 57 | ||
| 52 | - | || :playfield: (_ _ pacman dot dot dot dot dot wall) | |
| 58 | + | || :playfield: (___ ___ pacman dot dot dot dot dot wall) | |
| 53 | 59 | || :playfield size: 0 | |
| 54 | 60 | || :rewind: yes | |
gregori a révisé ce gist 1 month ago. Aller à la révision
1 file changed, 1 insertion, 1 deletion
gistfile1.txt
| @@ -49,6 +49,6 @@ | |||
| 49 | 49 | | :playfield size: 0? :layout: $x :status: done | :rewind: no | |
| 50 | 50 | | :playfield size: 0? :layout: $x | :rewind: yes | |
| 51 | 51 | ||
| 52 | - | || :playfield: (_ _ pacman dot dot dot ghost dot wall) | |
| 52 | + | || :playfield: (_ _ pacman dot dot dot dot dot wall) | |
| 53 | 53 | || :playfield size: 0 | |
| 54 | 54 | || :rewind: yes | |
gregori a révisé ce gist 1 month ago. Aller à la révision
1 file changed, 1 insertion, 1 deletion
gistfile1.txt
| @@ -49,6 +49,6 @@ | |||
| 49 | 49 | | :playfield size: 0? :layout: $x :status: done | :rewind: no | |
| 50 | 50 | | :playfield size: 0? :layout: $x | :rewind: yes | |
| 51 | 51 | ||
| 52 | - | || :playfield: (_ _ pacman dot dot dot dot dot wall) | |
| 52 | + | || :playfield: (_ _ pacman dot dot dot ghost dot wall) | |
| 53 | 53 | || :playfield size: 0 | |
| 54 | 54 | || :rewind: yes | |
gregori a révisé ce gist 1 month ago. Aller à la révision
1 file changed, 2 insertions
gistfile1.txt
| @@ -11,6 +11,8 @@ | |||
| 11 | 11 | ||
| 12 | 12 | |:rewind: yes? :playfield: (pacman wall) | :status: done | |
| 13 | 13 | :ahead: (wall pacman) | |
| 14 | + | :: increment playfield size | |
| 15 | + | :: increment playfield size | |
| 14 | 16 | ||
| 15 | 17 | |:rewind: yes? :playfield: pacman | :ahead: pacman | |
| 16 | 18 | :: increment playfield size | |
gregori a révisé ce gist 1 month ago. Aller à la révision
1 file changed, 52 insertions
gistfile1.txt(fichier créé)
| @@ -0,0 +1,52 @@ | |||
| 1 | + | ||:@include: lib/rpn.nv | |
| 2 | + | ||
| 3 | + | |:rewind: yes? :playfield: _ | :behind: _ | |
| 4 | + | :: increment playfield size | |
| 5 | + | ||
| 6 | + | | :rewind: yes? :playfield: (pacman dot) | | |
| 7 | + | :behind: _ | |
| 8 | + | :: increment playfield size | |
| 9 | + | :ahead: pacman | |
| 10 | + | :: increment playfield size | |
| 11 | + | ||
| 12 | + | |:rewind: yes? :playfield: (pacman wall) | :status: done | |
| 13 | + | :ahead: (wall pacman) | |
| 14 | + | ||
| 15 | + | |:rewind: yes? :playfield: pacman | :ahead: pacman | |
| 16 | + | :: increment playfield size | |
| 17 | + | |:rewind: yes? :playfield: dot | :ahead: dot | |
| 18 | + | :: increment playfield size | |
| 19 | + | |:rewind: yes? :playfield: ghost | :ahead: ghost | |
| 20 | + | :: increment playfield size | |
| 21 | + | |:rewind: yes :playfield: wall | :ahead: wall | |
| 22 | + | :: increment playfield size | |
| 23 | + | ||
| 24 | + | |:: increment playfield size :@rpn data: $id | | |
| 25 | + | :playfield size: $id | |
| 26 | + | |:: increment playfield size? :playfield size: $id | | |
| 27 | + | :@rpn: ($id 1 +) | |
| 28 | + | ||
| 29 | + | |:: :ahead: wall? :playfield size: $limit | | |
| 30 | + | :layout: ahead | |
| 31 | + | :full run: $limit | |
| 32 | + | ||
| 33 | + | | :layout: ahead :ahead: pacman | :playfield: pacman | |
| 34 | + | :layout: behind | |
| 35 | + | :: decrement playfield size | |
| 36 | + | | :layout: ahead? :ahead: $a | :playfield: $a | |
| 37 | + | :: decrement playfield size | |
| 38 | + | | :layout: behind? :behind: $b | :playfield: $b | |
| 39 | + | :: decrement playfield size | |
| 40 | + | ||
| 41 | + | |:full run: $x |:playfield size: $x | |
| 42 | + | |:: decrement playfield size :@rpn data: $id | | |
| 43 | + | :playfield size: $id | |
| 44 | + | |:: decrement playfield size? :playfield size: $id | | |
| 45 | + | :@rpn: ($id 1 -) | |
| 46 | + | ||
| 47 | + | | :playfield size: 0? :layout: $x :status: done | :rewind: no | |
| 48 | + | | :playfield size: 0? :layout: $x | :rewind: yes | |
| 49 | + | ||
| 50 | + | || :playfield: (_ _ pacman dot dot dot dot dot wall) | |
| 51 | + | || :playfield size: 0 | |
| 52 | + | || :rewind: yes | |