This is a simple Tic-Tac-Toe game implemented in PHP. Players can play against a bot and the game state is maintained using PHP sessions.
To run this application locally, follow these steps:
- Clone the repository: git clone
- Build the Docker container: docker build -t tic-tac-toe
- Run the Docker container: docker run -d -p 8080:80 tic-tac-toe
- Access the application:
Open your web browser and navigate to
http://localhost:8080
- The game is played on a 3x3 grid.
- Players take turns placing their symbol (X or O) on an empty cell.
- The first player to get three of their symbols in a row (horizontally, vertically, or diagonally) wins the game.
- If all cells are filled without any player achieving three in a row, the game ends in a tie.
index.php
: Main PHP file containing the game logic and user interface.style.css
: CSS file for styling the game interface.reset.php
: PHP script to reset the game state and start a new game.Dockerfile
: Dockerfile for building the Docker image.README.md
: This file.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License.