{"id":16212446,"url":"https://github.com/rootenginear/why-is-this-a-checkmate","last_synced_at":"2025-04-07T21:48:56.151Z","repository":{"id":60792835,"uuid":"530670691","full_name":"rootEnginear/why-is-this-a-checkmate","owner":"rootEnginear","description":"Input FEN and get image explanation as an output","archived":false,"fork":false,"pushed_at":"2022-10-04T18:16:53.000Z","size":223,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-13T23:19:22.028Z","etag":null,"topics":["chess","hacktoberfest"],"latest_commit_sha":null,"homepage":"https://whymate.glitch.me/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rootEnginear.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-30T13:31:03.000Z","updated_at":"2024-04-18T10:33:43.000Z","dependencies_parsed_at":"2022-10-04T23:57:56.655Z","dependency_job_id":null,"html_url":"https://github.com/rootEnginear/why-is-this-a-checkmate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootEnginear%2Fwhy-is-this-a-checkmate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootEnginear%2Fwhy-is-this-a-checkmate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootEnginear%2Fwhy-is-this-a-checkmate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootEnginear%2Fwhy-is-this-a-checkmate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootEnginear","download_url":"https://codeload.github.com/rootEnginear/why-is-this-a-checkmate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247737741,"owners_count":20987718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chess","hacktoberfest"],"created_at":"2024-10-10T10:52:20.290Z","updated_at":"2025-04-07T21:48:56.135Z","avatar_url":"https://github.com/rootEnginear.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Why Is This A Checkmate?\n\n![GitHub](https://img.shields.io/github/license/rootenginear/why-is-this-a-checkmate)\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/rootenginear/why-is-this-a-checkmate/Glitch%20Sync)\n\nA public API that can be used to explain why the entered chess position is a\ncheckmate.\n\n## Endpoints\n\n\u003e Currently deployed at \u003chttps://whymate.glitch.me/\u003e\n\n```http\nGET /\n```\n\nThe root endpoint will response with the homepage that you can enter FEN to\nperform mate checking.\n\n---\n\n```http\nGET /\u003cFEN\u003e\n```\n\nRedirect to `GET /?fen=\u003cFEN\u003e`. You may replace any spaces in FEN string with `+` for\nthis syntax to work.\n\nExamples:\n\n- `/1R4k1/5ppp/8/8/8/8/5PPP/6K1`\n- `/5bk1/2p2p1p/6p1/nB2pb2/1K6/2P2N2/1P1N1PPP/r3R3+w`\n\n---\n\n```http\nGET /?fen=\u003cFEN\u003e[\u0026flip][\u0026img]\n````\n\nGenerate a page that shows why in that position (FEN) is a checkmate. This\n*required* the first part of the FEN — which is the board configuration.\n\nHowever, you can also specify the second part of the FEN too, which will help\nthe checker to only find mate in that color. This part can be either \"w\" or\n\"b\". If it's \"w\", the checker will check if white is in a mate, and vise versa.\nIf the mate is not found, *currently*, it will just render the position for you.\n\nParameters:\n\n- `flip` : Show the board from the opposite *perspective*. Normally, if white is mating black, it will show as white perspective (A file at the left, H file at the right). But if black is mating white, it will show as black perspective (H file at the left, A file at the right).\n- `img` : Generate an SVG image instead of a HTML page.\n\nExamples:\n\n- `/?fen=5bk1/2p2p1p/6p1/nB2pb2/1K6/2P2N2/1P1N1PPP/r3R3+w`\n- `/?fen=kr6/ppN5/8/1K6/8/8/8/8+b\u0026flip`\n- `/?fen=5k2/5Q2/5K2/8/8/8/8/8+b\u0026img`\n\n## Todo\n\n- [ ] If it's not a checkmate, show how to escape.\n  - [ ] Show escape square.\n  - [ ] Show if the check can be blocked.\n\n## Resources\n\n- Chess Pieces: Maestro chess piece by sadsnake1\n- Board Theme: Green Plastic theme by the [lila authors](https://github.com/lichess-org/lila) and [pirouetti](https://lichess.org/@/pirouetti)\n\n\u003e Reference: \u003chttps://github.com/lichess-org/lila/blob/master/COPYING.md\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootenginear%2Fwhy-is-this-a-checkmate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootenginear%2Fwhy-is-this-a-checkmate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootenginear%2Fwhy-is-this-a-checkmate/lists"}