{"id":13778475,"url":"https://github.com/mratin/kdom","last_synced_at":"2025-05-11T12:30:36.372Z","repository":{"id":115509166,"uuid":"81165543","full_name":"mratin/kdom","owner":"mratin","description":null,"archived":false,"fork":false,"pushed_at":"2019-01-11T12:27:57.000Z","size":63,"stargazers_count":10,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-03T18:12:54.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/mratin.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-02-07T04:16:07.000Z","updated_at":"2019-01-11T12:27:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"73726fda-d278-4dea-9bb8-0a20786114ee","html_url":"https://github.com/mratin/kdom","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/mratin%2Fkdom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mratin%2Fkdom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mratin%2Fkdom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mratin%2Fkdom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mratin","download_url":"https://codeload.github.com/mratin/kdom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225048942,"owners_count":17412898,"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":[],"created_at":"2024-08-03T18:00:54.105Z","updated_at":"2024-11-17T14:30:31.002Z","avatar_url":"https://github.com/mratin.png","language":"Scala","funding_links":[],"categories":["2018"],"sub_categories":[],"readme":"# kdom\n\n## Creating a Game\n         curl -X POST http://kdom.mratin.se/new-games/[?playerCount=\u003cn\u003e]\n         \n         EXAMPLE: curl -X POST http://kdom.mratin.se/new-games/?playerCount=2\n         { \"uuid\":\"e1c84105-b3e7-4717-b808-64be88938e7e\", ... }\n\n```uuid``` is the unique identifier to the new game that has been created. This id is used in the future to refer to this game.\nIf playerCount isn't specified, the number of players will default to 4.\n\n## Joining a Game\n         curl -X POST http://kdom.mratin.se/new-games/\u003cgame-id\u003e/join/\u003cplayer-name\u003e\n         \n         EXAMPLE: curl -X POST http://kdom.mratin.se/new-games/e1c84105-b3e7-4717-b808-64be88938e7e/join/StigHelmer?callbackUrl=http://my.ai.listener\n         {  \"name\":\"StigHelmer\",  \"uuid\":\"12ea309a-8e3b-4b75-87d0-15d1670baaab\", ... }\n\n```uuid``` is the unique identifier of the player. This id is secret to the player and is used in the future when executing moves for this player.\n\n## Getting Game State\nOnce the game has enough players joined (normally 4), it is no longer considered a \"new-game\". Instead it is found under /games/\n\n         curl http://kdom.mratin.se/games/\u003cgame-id\u003e\n         \n         EXAMPLE: curl http://kdom.mratin.se/games/e1c84105-b3e7-4717-b808-64be88938e7e\n         { \"uuid\":\"e1c84105-b3e7-4717-b808-64be88938e7e\", ... \"currentPlayer\":{ \"name\":\"StigHelmer\" }}\n\nThis response contains everything there is to know about the state of the game, including who's turn it is to make a move and the current score.\n\n## Getting Available Moves\n\nIn order to make a move, we ask the API to list all available moves:\n         \n         curl http://kdom.mratin.se/games/\u003cgame-id\u003e/available-moves\n         \n         EXAMPLE: curl http://kdom.mratin.se/games/e1c84105-b3e7-4717-b808-64be88938e7e/available-moves\n         { \"moves\": [{ \"number\":0, ... }]}\n\nThis response lists all available moves for the current player. Each move has a number which can be used in a future call to refer to the move to be executed.\n\n## Making a Move\n\n         curl -X POST http://kdom.mratin.se/games/\u003cgame-id\u003e/players/\u003cplayer-id\u003e/moves/\u003cmove-number\u003e\n         \n         EXAMPLE: curl -X POST http://kdom.mratin.se/games/e1c84105-b3e7-4717-b808-64be88938e7e/players/12ea309a-8e3b-4b75-87d0-15d1670baaab/moves/2\n         { \u003cupdated game-state\u003e }\n\n\n# kdom Java Client\n\nHere is an implementation for a client in Java:\nhttps://github.com/tdebroc/kingdomino-ia-client\nYou can see one example of Game here:\nhttps://github.com/tdebroc/kingdomino-ia-client/blob/master/src/test/java/Main.java\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmratin%2Fkdom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmratin%2Fkdom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmratin%2Fkdom/lists"}