A simple web-based Tic-Tac-Toe game that allows 2 players to create, join, and play a game remotely from each other. The application signals when a game has ended and allows for subsequent games to continue.
- PHP: Supports server-side scripting.
- Web Browser: To interact with the game (e.g., Chrome, Firefox, Safari, Edge).
- XAMPP/WAMP/MAMP: Install a PHP development environment. This guide assumes you are using XAMPP.
- Start Services: Open the XAMPP Control Panel and start the Apache service.
- Get the Code: Ensure you have all the project files (
index.html
,style.css
,script.js
,game.php
,session.php
,common.php
). - Place in Directory: Copy the files into the
htdocs
directory of your XAMPP installation.
- Open a Browser: Launch your preferred web browser.
- Access the Game: Type
localhost/frontend
in the address bar. - Play the Game: You can create or join a game and interact with the Tic-Tac-Toe board.
- Game Creation: Test creating a game and interacting with the board.
- Game Joining: Test joining an existing game using the game ID.
- Game Play: Ensure the game updates across sessions and correctly identifies win conditions and ties.
- Game Restart: After a game ends, the "Restart Game" button should clear the board and allow a new game.
- Invalid Moves: The game should not accept moves on filled cells or out of turn.
- Simultaneous Sessions: Multiple games should operate independently.
- Server Interruption: Observe the application's behavior when the server stops unexpectedly.
- PHP Documentation: PHP Official Documentation
- XAMPP Guide: Apache Friends