mirror of
https://github.com/anoma/juvix.git
synced 2025-01-07 08:08:44 +03:00
.. | ||
CLI | ||
Logic | ||
juvix.yaml | ||
README.org | ||
TicTacToe.juvix |
TicTacToe
TicTacToe
This directory contains Juvix code for a Tic-Tac-Toe game that can be run as a terminal application.
The common logic code is in Logic/
, the code specific to the terminal
application is in CLI/
.
Terminal application
To compile and run the terminal application use the following steps:
cd CLI
juvix compile TicTacToe.juvix
./TicTacToe
You will see the following output:
MiniTicTacToe
-------------
Type a number then ENTER to make a move
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 4 | 5 | 6 |
+---+---+---+
| 7 | 8 | 9 |
+---+---+---+
Player X: