https://github.com/mevdschee/peg-solitaire.c
Console version of the game "peg-solitaire" for GNU/Linux
https://github.com/mevdschee/peg-solitaire.c
Last synced: 8 months ago
JSON representation
Console version of the game "peg-solitaire" for GNU/Linux
- Host: GitHub
- URL: https://github.com/mevdschee/peg-solitaire.c
- Owner: mevdschee
- License: mit
- Created: 2014-11-14T01:25:20.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2019-12-10T10:16:59.000Z (about 6 years ago)
- Last Synced: 2025-04-26T15:02:39.795Z (9 months ago)
- Language: C
- Size: 20.5 KB
- Stars: 25
- Watchers: 5
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
peg-solitaire.c
======
[](https://repl.it/github/mevdschee/peg-solitaire.c)

Console version of the game "peg-solitaire" for GNU/Linux
### Gameplay
You can move the cursor in four directions using the arrow keys: up, down, left, and right. Use the enter/return key to select (or deselect) a peg. Pegs can then be moved using the arrow keys. Quit, restart and undo keys are 'q', 'r' and 'u'. A peg can only move if it can jump over a adjacent peg and land on an empty space. A peg is represented by a circle and a empty space by a dot. You win the game when you end with one peg in the center position. When there are no more moves possible the game is over.

The above layouts are supported ([image source](
https://en.wikipedia.org/wiki/Peg_solitaire#/media/File:Peg_Solitaire_game_board_shapes.svg)). You may specify them as the first argument. If no layout is specified, then "English" is chosen.
### Requirements
- C compiler
- GNU/Linux
### Installation
```
wget https://raw.githubusercontent.com/mevdschee/peg-solitaire.c/master/peg-solitaire.c
gcc -o peg-solitaire peg-solitaire.c
./peg-solitaire french
```
### Contributing
Contributions are very welcome.