Coder Social home page Coder Social logo

marcizhu / readme-chess Goto Github PK

View Code? Open in Web Editor NEW
85.0 3.0 12.0 494 KB

♟️ Play Multiplayer Chess in a README file!

Home Page: https://github.com/marcizhu

License: MIT License

Python 100.00%
readme-chess python-chess readme-games games github-workflows chess game

readme-chess's Introduction

GitHub README Chess Tournament

This template repository contains the source code for a Python Chess bot, together with GitHub Workflows in order to allow ANYONE to play chess from a README file. Want to see this in action? Go to my profile page and feel free to try it out by yourself!

Steps to make your own repo

  1. Create a new repository based on this template.

  2. (Optional) Tweak the bot settings to your linking. These settings are located in the file data/settings.yaml. You can leave them as they are if you don't want to change anything.

  3. Rename the folder .github/_workflows to .github/workflows in order to enable the GitHub Actions workflow that does all the magic.

  4. Delete this README file and make your own README.md. I recommend using README.template as a starting point. Keep in mind that the text between the HTML comments like <!-- BEGIN CHESS BOARD --> and <!-- END CHESS BOARD --> will be recreated after each move, so don't waste your time changing anything in there ;)

  5. Commit and push all the settings and create a new issue with title Chess: Start new game (case insensitive). If all goes well, after a few seconds a new response should appear telling you that a new game was successfully started and the issue should be automatically closed. After that, refresh your repository in order to see the changes done by the bot and your repository is ready to go! Just click on any of the links on the table of available moves, click on "Submit new issue" and after a few seconds, the move will be played!

Don't forget to share, have fun and enjoy your games!

Some extra information

All games are automatically archived into the games/ folder in PGN format. The current game is always called games/current.pgn, and the archived games always follow the pattern games/game-yyyymmdd-HHMMSS.pgn. You can download the archived games and review them using an external application. Each move in the PGN file has a comment specifying who performed each move so you can see which moves you played!

Finally, if you find any problem, feel free to submit an issue or open a PR and I will be more than happy to take a look at it!

Credits

Thanks to @timburgan for the initial idea. This project is heavily inspired on his. Also, big thanks to the authors and contributors of python-chess and PyGithub. Without their libraries, this project would have been impossible ❤️

License

This template and the code in it is licensed under the MIT License.
If you use this on your own repositories, please add a link back to this repo :D

readme-chess's People

Contributors

github-actions[bot] avatar hitro147 avatar marcizhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

readme-chess's Issues

Nothing is appearing.

I don't know why it's happening with me, every time I want to see it this error always occurs with me. Here's a screenshot of the issue, which is happening with me.

Untitled 1

I have tried many methods like refreshing this page, restarting my laptop, etc... but after many types of try it still does not appears.

Browser - Microsoft Edge
Version - 111.0.1661.54 (Official build) (64-bit)

Draws get the "👑 Winner!" label

When a game results in a draw (for example due to a stalemate), the last issue gets the label "👑 Winner!" regardless. This should be fixed.

Flip Board

The chess board should flip after every move.
It makes the experience better.

gameboard.transform(chess.flip_vertical)

Wrong move table when a pawn can be promoted

When a pawn is able to promote, the same move appears four times, one for each possible move (no promotion, promotion to queen, promotion to bishop and promotion to knight). Either moves should be filtered to prevent duplicates or add a new option to let players select the type of promotion.

Here's an image:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.