Playing is half the fun; the other half is learning to code by adding to our wide array of achievements and submitting a pull request!
To play: https://acenturyandabit.github.io/fortknight
Try and beat my high score of 50! Then, pick a TODO item from the issues page to make a pull request for!
While this repository is designed to be easyish to contribute to, it is not as easy as other pull-request-tutorials. You'll need to be able to write functional code in JS!
If you're looking for generic things to contribute to, you can try the below, and come back when you're more ready:
To get started on this project, simply fork this repository and clone it to your local device.
To add a game mode:
- Add the game mode to index.html
- Add the mode to the switch statement in dom_events.js
- Edit main.js to add the logic of your game mode (if your mode needs additional functions, create another js file in /js if possible)
- If your mode changes the behavior of a piece, modify the respective piece in piece_object.js
To add an achievement:
- Go to achievements_highscores.js and add it the achievementList
- Add a checkAndUnlock or checkAndProgress function for it, and/or add your own logic if necessary
You can easily test your changes locally by running index.html in a browser.
To enable optional debugging features and to view extended information on scores and achievements, you can add ?p=debug
to the end of the URL of your index.html.
To reset your high scores or achievements unlocked, you'll need to clear your browser's cache (which the debug mode provides a button for) or run the game in an incognito tab.
- Only commit files that you changed in a pull request. Dont commit files, you didn‘t change, because it messes up the complete branch and will not be merged by a maintainer!
- Provide a good description for your issues and pull requests!
- Dont create a pull request if you want to add a new feature, wich has no issue. First create a issue with a description of your new feature and then create a pull request wich links to it!
- Test your code before you create a pull request. Your code needs to be fully working to get merged!
If you want to be added to the project as a maintainer and help me merge pull requests, please drop a comment on issue #49 :D
./images/compile_imgs.js
: run in this directory to preload svgs into the html file.
credits to wikimedia commons for chess pieces and SVG Repo for the arrows