diff --git a/src/main.zig b/src/main.zig index f6253df..1cad363 100644 --- a/src/main.zig +++ b/src/main.zig @@ -60,7 +60,7 @@ fn uciPos(str: []const u8, alloc: std.mem.Allocator) *types.game { } fn fenGame(str: []const u8, alloc: std.mem.Allocator) *types.game { - var pos: u8 = 0; + var pos: u8 = 63; var space: u8 = 0; var g = alloc.create(types.game) catch unreachable; g.* = std.mem.zeroes(types.game); @@ -84,7 +84,7 @@ fn fenGame(str: []const u8, alloc: std.mem.Allocator) *types.game { const set: *u64 = mov.charToSet(g, chr); const bit: u64 = @as(u64, 1) << @truncate(pos); set.* |= bit; - pos += 1; + pos -= 1; } return g; }