https://github.com/pheithar/hnefatafl
https://github.com/pheithar/hnefatafl
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pheithar/hnefatafl
- Owner: Pheithar
- Created: 2021-07-16T14:26:59.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-24T18:20:11.000Z (over 3 years ago)
- Last Synced: 2025-01-29T03:48:59.122Z (5 months ago)
- Language: JavaScript
- Size: 661 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hnefatafl
## Rules
**Hnefatafl**, also known as viking chess, is an easy to learn difficult to master game, just like regular chess.
In this game, there are 2 teams with opposing objectives. The attack team, the one that starts, has as goal to capture the *King*, while the defending team tries to put the *King* to safety.
There are only 2 different types of pieces: normal pieces, or as I like to call them, *Soldiers*, and the *King*, which is the piece that starts at the center, and there is only 1.
In their turn, each player can move one piece. The pieces move only horizontally and vertically, but as many cells as they want, without going through another piece, just like rook in chess.
To capture an enemy *Soldier*, it has to be sandwiched between 2 of your pieces.
But to capture the *King*, all 4 sides of it have to be covered.
For more information about the rules, check out this webpage, that explains everything much better than I:
## Credits
Thanks to [Akua21](https://github.com/akua21) for the pixel art and the help with some parts of the code.
#### *Sidenote*
I did started to do a bot that plays against you, but I didn't do a good job in the overall programming, as this is my first project with the p5 library, and the code is a bit of a mess, and when I tried to make the bot it was quite complicated. I may try to do it again in the future.