A 1v1 & 8x8 command line based board game
Type in number 1~8 to play, q to exit. Whoever to be the first to put 4 pieces in a row wins.
For example:
1 2 3 4 5 6 7 8
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | |0| | |
| | |X| |0|0| | |
| | |0|X|X|X| | |
|0| |X|0|X|X| | |
|0| |0|X|X|X|0| |
Now X wins.
Note that whenever you try to place a piece in a column, it always start piling from the button. You can't put a piece in the middle like any other proper board game would, which might bring boredom but certainly makes it easier for me.
Windows
Download in here, click to run.
In cmd build an English version:
git clone https://github.com/HanyuDuan/stars.git
cd stars
script\build.cmd
Linux
git clone https://github.com/HanyuDuan/stars.git
cd stars
bash script/build.sh
Use ./stars
to start the game.
./build.sh install
to install, ./build.sh uninstall
to uninstall 🗑
macOS
Same as Linux.You can see there's a few board in oldTestingBoard.md. If you want to import and play in a new board, just enter import
or I
and you'll see this:
In debug mode
Player 'X' move> I
Paste a board down below>
1 2 3 4 5 6 7 8
Then paste it in the terminal like this:
In debug mode
Player 'X' move> I
Paste a board down below>
1 2 3 4 5 6 7 8
| |0| |X| |+|+|+|
| |X| |0| | |+|+|
| |0| |X|X| | |+|
| |0| |X|0|X| |+|
| |X| |X|X|X| |+|
| |X| |0|0|0| | |
| |0| |X|0|X|0| |
| |0|X|0|X|0|0| |
In debug mode
Player 'X' move>
Then you're good to go 👌
Other modes such as play back and custom just there to explore ~
If it stopped when you didn't ask it to or throw some errors and if you don't know why, calm down and follow these three steps:
- start up a new game
- play it like nothing ever happened
- hope it won't suddenly stop in the middle of nowhere again
Or you can tell me how it happened so that I might fix it one day 😉
Sometimes your personal settings get wiped out and reset to factory settings 🤔
JsonCpp - from where those dependencies files are copied
My roommate - from whom I learned about this little game which was actually his homework. But the original instruction was to write in python, so ... ;-)