{"id":19595684,"url":"https://github.com/iskyd/tic-tac-toc-api","last_synced_at":"2025-02-26T14:24:24.232Z","repository":{"id":158214260,"uuid":"460451749","full_name":"iskyd/tic-tac-toc-api","owner":"iskyd","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-17T13:41:05.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T00:05:01.540Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iskyd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-17T13:40:50.000Z","updated_at":"2022-03-06T17:35:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6360678-8bbd-4b25-89b9-9fcb077afe45","html_url":"https://github.com/iskyd/tic-tac-toc-api","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/iskyd%2Ftic-tac-toc-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iskyd%2Ftic-tac-toc-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iskyd%2Ftic-tac-toc-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iskyd%2Ftic-tac-toc-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iskyd","download_url":"https://codeload.github.com/iskyd/tic-tac-toc-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240868781,"owners_count":19870670,"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-11-11T08:48:14.386Z","updated_at":"2025-02-26T14:24:24.139Z","avatar_url":"https://github.com/iskyd.png","language":"JavaScript","readme":"# Run\nThis will run the server on port 3000, if you need to change it just env variable PORT\n```sh\nnpm install\nnpm start\n```\n\n# Game play (row win)\nPlayer 1 win in the first row\n\n```sh\ncurl -XPOST http://localhost:3000/start\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 1, \"position\": [0,0]}'\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 2, \"position\": [2,2]}'\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 1, \"position\": [0,1]}'\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 2, \"position\": [1,1]}'\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 1, \"position\": [0,2]}'\n```\n\nGame play (column win)\nPlayer 1 win in the middle column\n\n```sh\ncurl -XPOST http://localhost:3000/start\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 1, \"position\": [1,1]}'\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 2, \"position\": [0,0]}'\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 1, \"position\": [0,1]}'\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 2, \"position\": [2,2]}'\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 1, \"position\": [2,1]}'\n```\n\nGame play (diagonal win)\nPlayer 1 win in diagonal\n\n```sh\ncurl -XPOST http://localhost:3000/start\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 1, \"position\": [0,0]}'\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 2, \"position\": [0,1]}'\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 1, \"position\": [1,1]}'\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 2, \"position\": [0,2]}'\ncurl -XPOST localhost:3000/play/\u003cid\u003e  -H 'Content-Type: application/json' -d '{\"player\": 1, \"position\": [2,2]}'\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiskyd%2Ftic-tac-toc-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiskyd%2Ftic-tac-toc-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiskyd%2Ftic-tac-toc-api/lists"}