Giter Site home page Giter Site logo

phptictactoe's Introduction

Tic-Tac-Toe PHP Web Application

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.

Getting Started

To run this application locally, follow these steps:

  1. Clone the repository: git clone
  2. Build the Docker container: docker build -t tic-tac-toe
  3. Run the Docker container: docker run -d -p 8080:80 tic-tac-toe
  4. Access the application: Open your web browser and navigate to http://localhost:8080

How to Play

  • 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.

Files Description

  • 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.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

phptictactoe's People

Contributors

oksanafedyukova avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.