This commit is contained in:
2026-04-16 06:52:38 -05:00
parent 5ec2fa47c8
commit 0860576509
3 changed files with 49 additions and 31 deletions
+6 -6
View File
@@ -1,8 +1,10 @@
const std = @import("std");
const Io = std.Io;
const grome = @import("grome");
const Io = std.Io;
const Rect = grome.matrix.Rect;
const DoubleBuffer = grome.draw.DoubleBuffer;
pub fn main(init: std.process.Init) !void {
// This is appropriate for anything that lives as long as the process.
const arena: std.mem.Allocator = init.arena.allocator();
@@ -13,10 +15,8 @@ pub fn main(init: std.process.Init) !void {
const stdout_writer = &stdout_file_writer.interface;
// alright lets play with the matrix
const width = 50;
const height = 50;
var matrix = try grome.Matrix(u8, width, height).init(arena, ' ');
var iter = matrix.row_iterator();
const size = Rect{ .height = 20, .width = 50 };
var matrix = try DoubleBuffer.init(arena, size);
const density = (width * height) / 100;
for (0..density) |_| {