Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/basile-henry/peg
A small Peg Solitaire implementation in Elm
https://github.com/basile-henry/peg
drag-and-drop elm game peg-solitaire style-elements
Last synced: 13 days ago
JSON representation
A small Peg Solitaire implementation in Elm
- Host: GitHub
- URL: https://github.com/basile-henry/peg
- Owner: basile-henry
- License: mit
- Created: 2018-03-05T19:41:20.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-07T18:46:26.000Z (almost 7 years ago)
- Last Synced: 2024-11-06T09:25:56.931Z (2 months ago)
- Topics: drag-and-drop, elm, game, peg-solitaire, style-elements
- Language: Elm
- Homepage: https://peg.basilehenry.com
- Size: 138 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Peg Solitaire
This is a simple version of the [*Peg Solitaire*](https://en.wikipedia.org/wiki/Peg_solitaire) game. It support multiple basic board shapes and that's about it! :-)
I wrote this game in order to learn bit more about Elm and in particular about the HTML5 drag and drop mechanics.
The game is available online at [http://peg.basilehenry.com/](http://peg.basilehenry.com/).
![](res/peg.png)
## How to play
Use your mouse to drag and drop the pegs. You have to move peg to an empty
space, and only when they go over another peg. This other peg then goes away.
Try to get as few pegs left as possible!## How to build
The game is written in [Elm](http://elm-lang.org/) so you'll need elm-make:
```sh
elm make src/Main.elm --output index.html
```Or even simpler, use `elm reactor` and then open `http://localhost:8000/` in your browser.
## Room for improvement
I had a few more ideas for improving the game (if I ever get around to):
- Better drag and drop animation (hide the peg that is being dragged)
- Display `"Game Over"` when the game cannot progress further
- Let the player create their own board shape## License
[MIT License](LICENSE)
Copyright (c) 2018 Basile Henry