]> git.f4mnq.fr Git - cells.git/commitdiff
Vision du monde "infini"
authorAmélia Coutard-Sander <git@f4mnq.fr>
Wed, 7 Jan 2026 13:38:51 +0000 (14:38 +0100)
committerAmélia Coutard-Sander <git@f4mnq.fr>
Wed, 7 Jan 2026 13:53:53 +0000 (14:53 +0100)
Un mensonge pour l'instant, le monde fait toujours 64×64 cellules, mais
j'adapte l'interface graphique pour qu'elle marche sans changements
quand j'étendrai le système à un monde infini.

bin/main.ml

index d1a7ef56d4473d213a9b6ea9ced94ef52a11492f..9510f086b9ccfa4de8cf156e5b4097817758192f 100644 (file)
@@ -21,8 +21,8 @@ let render
     (board : t Automata.board)
     (inter : t interface_state) =
         let module M = (val m) in
-        for x = 0 to 63 do
-          for y = 0 to 63 do
+        for x = 0 to (Graphics.size_x () / 16) + 1 do
+          for y = 0 to (Graphics.size_y () / 16) + 1 do
             Graphics.set_color
               (let r, g, b = M.color (Automata.get x y board) in
                Graphics.rgb (int_of_char r) (int_of_char g) (int_of_char b));