let module M = (val m) in
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));
+ let r, g, b = M.color (Automata.get x y board) in
+ let r, g, b = (int_of_char r, int_of_char g, int_of_char b) in
+ Graphics.set_color (Graphics.rgb r g b);
Graphics.fill_rect (x * 16) (y * 16) 16 16;
Graphics.set_color (Graphics.rgb 127 127 127);
Graphics.draw_rect (x * 16) (y * 16) 16 16
done
done;
- Graphics.set_color
- (let r, g, b = M.color inter.current in
- Graphics.rgb (int_of_char r) (int_of_char g) (int_of_char b));
+ let r, g, b = M.color inter.current in
+ let r, g, b = (int_of_char r, int_of_char g, int_of_char b) in
+ Graphics.set_color (Graphics.rgb r g b);
Graphics.fill_rect ((inter.x * 16) + 5) ((inter.y * 16) + 5) 6 6;
Graphics.set_color (Graphics.rgb 127 127 127);
Graphics.draw_rect ((inter.x * 16) + 5) ((inter.y * 16) + 5) 6 6