sts10 / zig-zac-zoe

A basic tic-tac-toe game in Zig programming language

Home Page:https://sts10.github.io/2022/08/20/a-summer-fling-with-zig.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zig Zac Zoe

Writing a very basic command-line tic-tac-toe game in Zig as a way of learning the very basics of the language. I also wrote a blog post about this project.

Previously, I did this in Rust and Go as a learning exercise in those two languages.

Installing Zig

Consult the Zig GitHub README for installation options.

I think I installed Zig by running: snap install zig --classic --edge, as listed in Zig's GitHub wiki. I originally wrote this program running v0.9.1.

Running this program

Once Zig is installed, you should be able to run this program with the following command:

zig build run

This program should work with Zig version 0.13.0, though I haven't tested it thoroughly.

Note that most of the code work is in src/main.zig.

Zig resources I found

These are potentially out-dated now, but here are some things I used in 2022:

Testing in Zig

Just a note to myself:

test "basic test" {
    try std.testing.expectEqual(10, 3 + 7);
}

About

A basic tic-tac-toe game in Zig programming language

https://sts10.github.io/2022/08/20/a-summer-fling-with-zig.html

License:MIT License


Languages

Language:Zig 100.0%