https://github.com/hey-its-d2t2/futureintern_jd_3
Tic-Tac-Toe is a classic game implemented using Java Spring Boot for the backend and Thymeleaf, HTML, and CSS for the frontend. The application allows users to play Tic-Tac-Toe against either another player or a computer.
https://github.com/hey-its-d2t2/futureintern_jd_3
aws css ec2-instance git github html java js maven mobaxterm springboot tic-tac-toe
Last synced: about 2 months ago
JSON representation
Tic-Tac-Toe is a classic game implemented using Java Spring Boot for the backend and Thymeleaf, HTML, and CSS for the frontend. The application allows users to play Tic-Tac-Toe against either another player or a computer.
- Host: GitHub
- URL: https://github.com/hey-its-d2t2/futureintern_jd_3
- Owner: hey-its-d2t2
- Created: 2024-09-06T05:55:56.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-13T10:58:34.000Z (8 months ago)
- Last Synced: 2025-02-10T22:44:18.853Z (3 months ago)
- Topics: aws, css, ec2-instance, git, github, html, java, js, maven, mobaxterm, springboot, tic-tac-toe
- Language: Java
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tic-Tac-Toe Game đŽ
## Project Description
Tic-Tac-Toe is a classic game implemented using Java Spring Boot for the backend and Thymeleaf, HTML, and CSS for the frontend. This is a part of my internship **Task 5** for my **Future Intern** internship. The application allows users to play Tic-Tac-Toe against either another player or a computer. It includes functionalities such as making moves, checking for a winner, and restarting the game.
## Features â¨
- **Single Player Mode**: Play against the computer đ¤
- **Two Player Mode**: Play against another player đ§âđ¤âđ§
- **Restart Functionality**: Restart the game anytime đ
- **Responsive Design**: The UI adapts to different screen sizes đąđģ
- **Real-Time Updates**: Moves and game status are updated in real-time âĄ## Tech Stack đ ī¸
- **Backend**: Java, Spring Boot
- **Frontend**: Thymeleaf, HTML, CSS, JavaScript
- **Database**: In-memory storage (no database used)
- **Dependencies**: Spring Boot, Thymeleaf, jQuery## Installation đ
1. **Clone the repository**:
```bash
git clone https://github.com/your-username/tic-tac-toe.git
```2. **Navigate to the project directory**:
```bash
cd tic-tac-toe
```3. **Build the project**:
```bash
./mvnw clean install
```4. **Run the application**:
```bash
./mvnw spring-boot:run
```5. **Open your browser** and navigate to `http://localhost:8080/tic-tac-toe` to play the game.
## UI Screenshots đ¸
### Game Board
### Game Over Screen
## Usage đšī¸
1. **Start the Application**: Run the Spring Boot application using the command provided in the installation section.
2. **Access the Game**: Open a web browser and go to `http://localhost:8080/tic-tac-toe`.
3. **Play the Game**:
- Click on a cell to make a move.
- If playing against the computer, it will make a move automatically.
- Click "Restart Game" to reset the board.## API Endpoints đĄ
- **Make a Move**:
- **URL**: `/tic-tac-toe/makeMove/{index}`
- **Method**: `POST`
- **Parameters**:
- `index` (Path Variable): The index of the cell (0-8).
- `mode` (Request Parameter): 'single' for single player mode.- **Restart Game**:
- **URL**: `/tic-tac-toe/restart`
- **Method**: `POST`## Frontend đ¨
- **HTML**: Located in `src/main/resources/templates/index.html`
- **CSS**: Located in `src/main/resources/static/css/styles.css`
- **JavaScript**: Inline script in `index.html` for handling AJAX requests.## Contributing đ¤
Contributions are welcome! Please open an issue or submit a pull request if you have suggestions or improvements.
## Contact đŦ
For any questions or feedback, please contact me at
- **Name**: Deepak Singh
- **Email**: [[email protected]](mailto:[email protected])