Skip to content

Client and Server of my implementation of the BattleShip (Sea Battle) game

Notifications You must be signed in to change notification settings

Mashinow/Django-Rest-API-BattleShip-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

My Course Project: BattleShip Game with REST API

Introduction

Welcome to my repository where I've shared my course project, a BattleShip game built with REST API. This project, which I recently defended with excellence, showcases my skills in game development and API integration.

Project Overview

The game, inspired by the classic BattleShip, operates through a REST API, ensuring a seamless and interactive gaming experience. It's developed using Python 3.10 and features two main components:

  • Server-Side: Crafted with Python 3.10 and Django, the server-side manages game logic, player interactions, and data handling.
  • Client-Side: The client-side, built with Python 3.10 and PyQt5, offers a user-friendly interface for engaging gameplay.

Features

The current version of the game includes several exciting features:

  • Manual or Random Ship Placement: Players have the flexibility to manually set their ships on the board or use the random generation feature for quick setup.
  • Single-Player Mode: Engage in a solo game against a computer-controlled opponent, testing your strategy and skills.
  • Multiplayer Mode: Compete with other players in real-time, enhancing the challenge and excitement.
  • Game History: Review past games to analyze strategies or relive victorious moments.

Gameplay Interaction Examples

Building the Game Field

Building the Game Field

Single-Player Gameplay

Single-Player Gameplay

Multiplayer Gameplay

Multiplayer Gameplay

Viewing Game History

Viewing Game History

Installation

To get started with the BattleShip game, clone the repository, install the necessary dependencies for the server and client, and then run the respective main.py files. Follow the instructions below:

  1. Clone the repository:

    git clone [URL to Repository]
    
  2. Navigate to the server directory and install its dependencies:

    cd path/to/server
    pip install -r requirements.txt
    
  3. Then, navigate to the client directory and install its dependencies:

    cd path/to/client
    pip install -r requirements.txt
    
  4. Run the server's main.py:

    python main.py
    
  5. Open a new terminal, navigate to the client directory, and run the client's main.py:

    python main.py
    

Now, you should be able to play the game. While Python 3.10 is recommended as it is the version used during development, other versions may work but have not been tested for compatibility.

About

Client and Server of my implementation of the BattleShip (Sea Battle) game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages