{"id":25869594,"url":"https://github.com/pasek108/tictactoe","last_synced_at":"2026-05-01T23:32:41.011Z","repository":{"id":167661144,"uuid":"619231507","full_name":"Pasek108/TicTacToe","owner":"Pasek108","description":"Three tic-tac-toe versions in two modes. Playable vsvs AI, vs player locally and multiplayer in real-time","archived":false,"fork":false,"pushed_at":"2026-04-29T13:16:57.000Z","size":2691,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-29T15:26:21.498Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://tic-tac-toe-alqu.onrender.com","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/Pasek108.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":"2023-03-26T16:46:43.000Z","updated_at":"2026-04-29T13:17:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0d70771-d2e4-4c70-8ade-88ce209745c4","html_url":"https://github.com/Pasek108/TicTacToe","commit_stats":null,"previous_names":["pasek108/tictactoe"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pasek108/TicTacToe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pasek108%2FTicTacToe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pasek108%2FTicTacToe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pasek108%2FTicTacToe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pasek108%2FTicTacToe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pasek108","download_url":"https://codeload.github.com/Pasek108/TicTacToe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pasek108%2FTicTacToe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32517182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["alpha-beta-pruning","flask","minimax-algorithm","socket-io","tic-tac-toe","tic-tac-toe-multiplayer"],"created_at":"2025-03-02T05:18:57.530Z","updated_at":"2026-05-01T23:32:41.002Z","avatar_url":"https://github.com/Pasek108.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eTicTacToe\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003e\n    A web-based Tic-Tac-Toe application featuring different game rules, local play, and real-time multiplayer functionality.\n  \u003c/strong\u003e\n\u003c/p\u003e\n\n\u003c!--\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"_for_readme/banner.png?\"\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\n# Table of Contents\n* [Overview :sparkles:](#overview-sparkles)\n  * [About](#about)\n  * [Features](#features)\n  * [Technologies](#technologies)\n  * [Setup](#setup)\n  * [Acknowledgements](#acknowledgements)\n* [Details :scroll:](#details-scroll)\n  * [User interface](#user-interface)\n  * [Project structure](#project-structure)\n  * [Code organization](#code-organization)\n--\u003e\n\u003cbr\u003e\n\n# Overview :sparkles:\n\n## About\nThis project is a collection of Tic-Tac-Toe variations built to practice full-stack development. It combines a JavaScript-based front-end with a Python back-end to handle real-time game states across different clients. Players can test different game modes against an AI, locally on one device, or online against others.\n\nCheck out the [live version](https://pasek108.github.io/BeFunge93Interpreter/).\n\n\u003cbr\u003e\n\n![preview](/_for_readme/preview.png)\n\n## Technologies\nLanguages:\n- HTML 5\n- CSS 3\n- JavaScript\n- Python 3.11\n\nLibraries and frameworks:\n- [SCSS](https://sass-lang.com)\n- [FontAwesome](https://fontawesome.com) 6.2.1\n- [GoogleFonts](https://fonts.google.com)\n- [Socekt.IO](https://socket.io) 4.6.0\n- [Flask](https://flask.palletsprojects.com/en/3.0.x/)\n- [Flask SocketIO](https://flask-socketio.readthedocs.io/en/latest/)\n\n## Features\n### Game Rules \u0026 Modes\n* **Multiple Rulesets:** Play the **Standard** game (connect a line to win) or **Reversed** (avoid making a line).\n* **Game Variations:**\n    * **Normal:** The classic 3x3 experience.\n    * **Movable:** Players move their existing marks on the grid after a certain limit is reached.\n    * **One Mark:** A simplified version using only one mark per player.\n* **Customization:** Adjustable board sizes, starting player selection, and player icons.\n\n### Ways to Play\n* **AI Opponent:** Play solo against a basic computer player.\n* **Local Play:** Two players can play on the same device.\n* **Online Multiplayer:** Real-time matches via WebSockets, including a public lobby and private, password-protected rooms.\n\n### Additional Functionality\n* **State Management:** Automatic handling of player disconnections in online rooms.\n* **Localization:** Full UI support for both English and Polish. \n\n\u003c!--\n\u003cbr\u003e\n\n\u003e [!NOTE]  \n\u003e Room for improvements:  \n\u003e - In-game instructions for game modes.  \n\u003e - Inviting players via QR code.  \n\u003e - More game modes.  \n\u003e - User accounts for stats, custom marks, and achievements.  \n\u003e - Pagination, filtering, and searching for rooms in the multiplayer lobby.  \n\u003e - Adding more languages.  \n\n\n## Setup\nWays to run this program: \n1. Use the [live demo](https://tic-tac-toe-alqu.onrender.com)\n2. Follow the same steps as for editing the program\n\nTo edit this program:\n- Download this repo\n- Download and install Python\n- Install libraries from requirements.txt\n- Run app.py file\n- Install [Prepros](https://prepros.io)\n- Add this project in Prepros\n- Create config.py file in project folder\n- Run this code in some online Python IDE\n  - *import secrets*\n  - *print(secrets.token_hex(16))*\n- Put generated string in config.py eg. *SECRET_KEY = \"generated_string\"*\n- Start coding\n\n## Acknowledgements\n- [tic tac toe wariants - wiki](https://en.wikipedia.org/wiki/Tic-tac-toe_variants)\n- [tic tac toe wariants - whatdowedoallday](https://www.whatdowedoallday.com/tic-tac-toe-variations/)\n- [tic tac toe wariants - byrdseed](https://www.byrdseed.tv/category/enrichment/games/tic-tac-toe-variants/)\n\n--\u003e\n\n\u003cbr\u003e\n\n# Details :scroll:\n\n## User interface\n\n### Every page\nOn every page there is: \n- Header:\n  - Title which is a link to the main menu page\n  - Language selection box that allows the user to change the language of the page without reloading\n- Footer\n  - Link to my github\n\n### Main menu\n![main menu](/_for_readme/main_menu.png)\nMain menu is basically a form for creating a game.\n\nClick on the multiplayer option will take the player to the multiplayer lobby.\u003cbr\u003e\nClick on the back option will take the player to the previous step.\u003cbr\u003e\n\n![create game](/_for_readme/create_game.png)\nCreating a game is a 3-step form:\n1. Enemy (AI or player on the same device) and game mode\n2. Starting player and type of game (standard, reversed)\n3. Board size, players marks, changing sides every game\n\n### Multiplayer lobby\n![multiplayer lobby](/_for_readme/multi_lobby.png)\nThe lobby shows all existing games in the form of a list of rooms that the player can join or create a new one. When there is no players in the room, the room is deleted. If the room is full player can't join until some place becomes available. In that case the join button is disabled. Rooms protected by password has a join button with a lock icon. After clicking it player has to put the correct password in order to join to the game.\n\nEach of the rooms in the lobby has:\n- Unique ID\n- Name consisting of:\n  - Mode\n  - Players marks\n  - Board size\n  - Type of a game\n- Number of players in the room\n- Join button\n\n\u003cimg alt=\"multiplayer create game\" src=\"/_for_readme/multi_create_game.png\" width=\"300\" align=\"right\"\u003e\n\nCreating a game is similar to creating a game in the main menu. The difference is that it is packed in one form and has option for setting password.\n\nPlayer has to choose:\n- Game mode\n- Board size\n- Type (uncheck = standard, check = reversed)\n- Password (empty = no password)\n- Players marks\n- Starting player\n- Switching sides every game\n\n### Game\nIn game view has:\n- Message info (player's turn, waiting for player in mulitplayer)\n- Players info (marks of the players, which player is the user)\n- Game board (with line in column, row or diagonal if one of the players win)\n- Game info (name, marks, board size, type)\n- Quit and Replay buttons (replay button is disabled until the game is over)\n\n\u003cbr\u003e\n\n**Normal game**\n\n![normal game](/_for_readme/normal_game.png)\nNormal version of the tic tac toe, users puts their marks and try to make or avoid making a line depending on game type.\n\n\u003cbr\u003e\n\n**Movable game**\n\n![movable game](/_for_readme/movable_game.png)\nIn beginning players puts their mark like in normal game but after some moves they can't put more marks and they have to move already placed marks. \nThe game has moves limit which is reached results in a draw.\n\n\u003cbr\u003e\n\n**One mark game**\n\n![one mark game](/_for_readme/one_mark_game.png)\nSimilar to normal version but both of the players have the same mark.\n\n### Multiplayer game\n\u003cimg alt=\"multiplayer game\" src=\"/_for_readme/multi_game.png\" width=\"50%\" align=\"right\"\u003e\n  \nGames in multiplayer are the same as normal games, the only differences are:\n- Position of a player will be hilighted in red color if there is no given player or the player left the game\n- If there is no enemy player the game will be stopped on unactive player turn.\n- On the bottom there is a room id and button to copy invitation link. \n\nPassword in invitation link is passed in the URL.\nWhen both players leave the game, the room and its game is deleted.\n\n\u003c!--\n## Project structure\n- :file_folder: TicTacToe (project folder)\n  - :page_facing_up: *github and prepros config*\n  - :page_facing_up: *readme file*\n  - :page_facing_up: *requirements file*\n  - :page_facing_up: *app.py and config.py - server in flask*\n  - :page_facing_up: *Game.py - server side game object*\n  - :file_folder: _for_readme - :page_facing_up: *files for readme*\n  - :file_folder: templates - :page_facing_up: *single and multiplayer html files*\n  - :file_folder: static\n    - :file_folder: images - :page_facing_up: *images used in the project*\n    - :file_folder: scripts\n      - :page_facing_up: *top level script files (eg. global, menu, language)*\n      - :file_folder: multiplayer - :page_facing_up: *scripts for mutiplayer*\n      - :file_folder: game - :page_facing_up: *scripts for game itself (eg. modes, board, AI)*\n    - :file_folder: style\n      - :page_facing_up: *scss files*\n      - :file_folder: css - :page_facing_up: *css files compiled by prepros*\n\n## Code organization\n\n![program diagram](/_for_readme/program_diagram.png)\n\n\u003e [!WARNING]  \n\u003e Classes must be loaded from bottom to the top to avoid situation when class does not exist in the time of its objects creation\n\n--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpasek108%2Ftictactoe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpasek108%2Ftictactoe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpasek108%2Ftictactoe/lists"}