kble/src/level.zig

24 lines
489 B
Zig

const std = @import("std");
const expect = std.testing.expect;
const Level = struct {
width: u16,
height: u16,
buffer: [65536]u16,
pub fn init(width: u16, height: u16) Level {
return Level {
.width = width,
.height = height,
.buffer = undefined,
};
}
};
test "create level buffer" {
// Create level.
const level: Level = Level.init(64, 32);
expect(level.width == 64);
expect(level.height == 32);
}