Skip to content

Commit

Permalink
Updated to Zig 0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
kwakzalver committed Jul 13, 2024
1 parent 11696b7 commit de0aab9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
20 changes: 5 additions & 15 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ pub fn build(b: *std.Build) void {

const exe = b.addExecutable(.{
.name = "zigtris",
.root_source_file = .{
.path = "src/main.zig",
},
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
Expand All @@ -30,36 +28,28 @@ pub fn build(b: *std.Build) void {

const main_tests = b.addTest(.{
.name = "Main",
.root_source_file = .{
.path = "src/main.zig",
},
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});

const window_tests = b.addTest(.{
.name = "Window",
.root_source_file = .{
.path = "src/window.zig",
},
.root_source_file = b.path("src/window.zig"),
.target = target,
.optimize = optimize,
});

const game_tests = b.addTest(.{
.name = "Game",
.root_source_file = .{
.path = "src/game.zig",
},
.root_source_file = b.path("src/game.zig"),
.target = target,
.optimize = optimize,
});

const definitions_tests = b.addTest(.{
.name = "Definitions",
.root_source_file = .{
.path = "src/definitions.zig",
},
.root_source_file = b.path("src/definitions.zig"),
.target = target,
.optimize = optimize,
});
Expand Down
2 changes: 1 addition & 1 deletion src/game.zig
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub const G = struct {

var optimal_move: Piece = undefined;
var optimal_score: i32 = undefined;
var moves = std.ArrayList(Piece).init(G.allocator);
var moves = std.ArrayList(Piece).init(allocator);
};

fn collision() bool {
Expand Down

0 comments on commit de0aab9

Please sign in to comment.