diff --git a/examples/games/game_of_life.ark b/examples/games/game_of_life.ark index db0c699fb..b70f12dda 100644 --- a/examples/games/game_of_life.ark +++ b/examples/games/game_of_life.ark @@ -62,6 +62,7 @@ (mut x (math:floor (mod i width))) (if (= 0 x) (puts "\n")) + (if (= alive (@ board i)) (puts "x") (puts " ")) diff --git a/examples/games/snake/snake.ark b/examples/games/snake/snake.ark index 72d151d4f..f3adbbbcb 100644 --- a/examples/games/snake/snake.ark +++ b/examples/games/snake/snake.ark @@ -92,6 +92,7 @@ (if (= _y y) (while (!= _x 20) { (mut case (@ (@ data _y) _x)) + (if (= _x x) (set case 0) ()) @@ -107,7 +108,6 @@ (return test) } (throw "Out of bounds")))) - (fun (&data &apple_sprite &draw_board &has_apple_left? &eat_apple_at) ()) })) # instanciating @@ -155,7 +155,6 @@ (sf:set:pos snake_sprite (* 20 (@ current 0)) (* 20 (@ current 1))) (sf:draw snake_sprite) (set acc (+ 1 acc)) }) })) - (fun (&move &reset_auto_move &auto_move &draw &pos &should_move &last_direction &snake_sprite) ()) })) # instanciating @@ -202,6 +201,7 @@ # rendering (sf:window:clear 0 0 0) (board.draw_board) + # draw board first (snake.draw)