Skip to content

Commit f478c85

Browse files
committed
update README
1 parent 56934d9 commit f478c85

File tree

1 file changed

+62
-6
lines changed

1 file changed

+62
-6
lines changed

README.md

+62-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# zig-zag-zoe
22
Multiplayer TicTacToe - in Zig - using HTMX for that zero-javascript experience
33

4+
Online demo here
5+
http://zig-zag-zoe.com
6+
7+
.. running on a t4gnano instance on AWS (Linux ARM64, with 512MB memory )
8+
9+
** Uses Zig Master 0.11-dev **
10+
411
# Install
512

613
```
@@ -9,23 +16,72 @@ cd zig-zag-zoe
916
zig build
1017
```
1118

12-
# Build
19+
# Build and Run
1320

1421
```
1522
zig build
16-
```
1723
18-
# Run
24+
.. or
1925
20-
```
21-
./zig-out/bin/zig-zag-zoe
26+
zig build run
2227
```
2328

2429
Now point your browsers at http://localhost:3000
2530

2631
.. or the equivalent address on the local network
2732

33+
2834
# GamePlay
2935

30-
- Start the Game
36+
- Set us up a new game
37+
38+
Choose the number of rows and columns for the grid.
39+
40+
Choose the number of players.
41+
42+
Choose the number of squares needed to win.
43+
44+
Choose a % chance of a Zero Wing.
45+
46+
Chosse a % chance to set us up the bomb.
47+
48+
Click START
49+
50+
At this point, the system will wait for all players to login - which is done by simply selecting which player to play as.
51+
52+
Once logged in, you will see (in real time) who we are waiting on, and watch as they all login.
53+
54+
Once everyone has logged in, the board is presented, and the game begins !
55+
56+
## Winning the Game
57+
58+
Each player takes a turn, selecting an empty square to place their piece in.
59+
60+
IF a player gets X in a row (where X == the number of squares needed to win), then they win, and everyone else loses !
61+
62+
## Zero Wing Enabled
63+
64+
Each turn, a player may randomly get Zero Wing Enabled. In this mode, the border of the board is printed in orange, and they can click on ANY square
65+
(including both empty squares AND squares that has another players piece already), and it is changed to their piece.
66+
67+
## Set us up the Bomb
68+
69+
Each turn, a player may randomly get "Someone set us up the bomb". In this mode, the border of the board is printed in red,
70+
and when they click on an EMPTY square, then their piece is placed in that square AND all adjacent squares are emptied out.
71+
72+
Be careful where you click, because you just might wipe out your own pieces.
73+
74+
## Bugs
75+
76+
There is a bug where sometimes in normal mode ... usually after the previous player had bomb mode ... then clicking on a square
77+
seems to zap 1 other adjacent square. Maybe. Cant reproduce it yet.
78+
79+
I will either fix this bug, or leave it in there as a feature - rationale is that there might be some bomb residue laying around
80+
after someone set us up the bomb.
81+
82+
83+
# Whats Interesting
84+
85+
This code is interesting for the following reasons :
3186

87+
- Its all written in Zig

0 commit comments

Comments
 (0)