{"id":26657234,"url":"https://github.com/jankammerath/tictactoevibe","last_synced_at":"2025-03-25T08:18:08.737Z","repository":{"id":282401146,"uuid":"948092167","full_name":"jankammerath/TicTacToeVibe","owner":"jankammerath","description":"A simple HTTP-based Tic-Tac-Toe game server implemented in C using the libmicrohttpd library.","archived":false,"fork":false,"pushed_at":"2025-03-14T12:08:27.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T12:33:32.428Z","etag":null,"topics":["c-programming","computer-opponent","game-development","http-server","libmicrohttpd","open-source","rest-api","simple-game","tic-tac-toe","web-game"],"latest_commit_sha":null,"homepage":"","language":"C","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/jankammerath.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-13T18:28:24.000Z","updated_at":"2025-03-14T12:08:31.000Z","dependencies_parsed_at":"2025-03-14T12:43:46.879Z","dependency_job_id":null,"html_url":"https://github.com/jankammerath/TicTacToeVibe","commit_stats":null,"previous_names":["jankammerath/tictactoevibe"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jankammerath%2FTicTacToeVibe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jankammerath%2FTicTacToeVibe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jankammerath%2FTicTacToeVibe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jankammerath%2FTicTacToeVibe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jankammerath","download_url":"https://codeload.github.com/jankammerath/TicTacToeVibe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245423240,"owners_count":20612749,"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":["c-programming","computer-opponent","game-development","http-server","libmicrohttpd","open-source","rest-api","simple-game","tic-tac-toe","web-game"],"created_at":"2025-03-25T08:18:07.948Z","updated_at":"2025-03-25T08:18:08.726Z","avatar_url":"https://github.com/jankammerath.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tic-Tac-Toe Game Server\nA simple HTTP-based Tic-Tac-Toe game server implemented in C using the libmicrohttpd library.\n\n## Overview\nThis project implements a web-based Tic-Tac-Toe game where:\n\n- The player plays as 'X'\n- The computer plays as 'O'\n- The game runs in a web browser\n- The game logic is handled by a C-based HTTP server\n\n## Features\n- Simple, clean web interface\n- RESTful API for game interactions\n- Computer opponent making random moves\n- Full game state tracking\n- Win/loss/draw detection\n\n## Requirements\n- C compiler (gcc or clang)\n- libmicrohttpd library\n- Standard C libraries (stdio, stdlib, string, time)\n\n## Building the Project\n[Instructions for building the project would go here.]\n\n## Running the Server\nThis will start the server on port 8888. Open your web browser and navigate to `http://localhost:8888` to play the game.\n\n## API Endpoints\n| Endpoint  | Method | Description                          |\n|-----------|--------|--------------------------------------|\n| `/`       | GET    | Returns the game interface (HTML)    |\n| `/move`   | POST   | Makes a player move. Send JSON: `{\"position\": 0-8}` |\n| `/reset`  | POST   | Resets the game to initial state     |\n\n## Game Board Layout\nThe game board is represented as a 3x3 grid with positions numbered 0-8:\n\n```\n 0 | 1 | 2\n-----------\n 3 | 4 | 5\n-----------\n 6 | 7 | 8\n```\n\n\n## Response Format\nMoves return JSON responses in the following format:\n\n```json\n{\n  \"board\": [0, 1, 2, 0, 0, 0, 0, 0, 0],\n  \"message\": \"Player X's turn\",\n  \"gameOver\": false\n}\n```\n\nWhere:\n- `board` is an array of 9 integers (0=empty, 1=X, 2=O)\n- `message` indicates game status\n- `gameOver` is true when the game has concluded\n\n# Architecture\nThe server uses libmicrohttpd to handle HTTP requests and maintain game state. The application:\nInitializes the game state\n\n- Processes player moves\n- Makes computer moves\n- Checks for win/loss/draw conditions\n- Returns updated game state to the client\n\n# License\nThis project is open source and available under the MIT license.\n\n# Acknowledgments\n- Uses libmicrohttpd for HTTP server functionality\n- Simple, educational implementation of HTTP-based game logic","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjankammerath%2Ftictactoevibe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjankammerath%2Ftictactoevibe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjankammerath%2Ftictactoevibe/lists"}