blob: 40e745db5ce9f923c956ccf206fedaace5875da9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
const std = @import("std");
const Allocator = std.mem.Allocator;
const print = std.debug.print;
const types = @import("./lib/types.zig");
const CommandStatus = types.CommandStatus;
const CommandContext = types.CommandContext;
pub const Move = struct {
pub fn eval(move: Move, ctx: CommandContext) !CommandStatus {
_ = move;
const error_msg = "MOVE command not yet implemented\n";
if (ctx.output_capture) |capture| {
try capture.write(error_msg);
} else {
print("{s}", .{error_msg});
}
return CommandStatus{ .Code = 1 };
}
};
|