Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

basilelt/ensisa-piscine

Repository files navigation

🎮 Immersion Project "PISCINE"

IR 1 - BUT RT 3

Language GTK3 Platform GCC LLDB

Game banner

📖 Table of Contents

  • [🎮 Immersion Project "PISCINE"]
    • [📖 Table of Contents]
    • [🕹️ The Game]
    • [📋 Specifications]
    • [📦 Installation]
    • [🛠️ Compilation]
    • [📦 Documentation]
    • [🚀 Run]
      • [🏠 Run Locally]
      • [🌐 Run with Network]
        • [📥 Client]
        • [🗄️ Server]
    • [👥 Authors]

🕹️ The Game

Square Game (Chomp Game)

  • 🟦 Rectangular board of dimensions 7x9
  • 🤝 Two opposing players
  • 🔄 Turn-based gameplay
    • On their turn, a player chooses a square on the board:
      • 🧱 The chosen square is destroyed,
      • 💥 All squares below and to the right of the chosen square are also destroyed.
    • 🔢 A player can destroy a maximum of 5 squares per turn.
  • 🎯 Goal: The player who destroys the last square loses.

Game screen 1 Game screen 2

📋 Specifications

  • 💻 Developed in C language (compilable with gcc)
  • 🖥️ Executable on Linux or MacOS machines
  • 🛠️ Option to install a virtual machine if needed
  • ⚙️ Code runs on a standard architecture (e.g., 8 cores, 2.5GHz, 16GB RAM)

📦 Installation

To install the game, use the **** script.

./install.sh

The script will install all necessary dependencies.

🛠️ Compilation

To compile the game, use the **** script.

./compile.sh

This will compile the game and create the executable file named game. It will also make the documentation available in the docs folder.

📦 Documentation

  • The documentation is generated using Doxygen with make docs, it is already done in the compile.sh script.

  • To access the documentation, open the docs folder and open the index.html file in your browser. You can also use the Five server extension in your IDE or nginx/apache.

cd project/docs/html
open index.html

🚀 Run

You have multiple options when it comes to running the game:

🏠 Run Locally

  • To run the game locally, use the -l argument.
  • Additional options:
    • 🖥️ CLI Mode: Add the -t argument.
    • 🤖 AI Mode: Add the -ia argument.
    • 🖥️ 🤖 CLI + AI Mode: Add both -t and -ia arguments.
# Run locally
./game -l

# Run locally with GUI
./game -l -g

# Run locally with AI in terminal mode
./game -l -t -ia

# Run locally with GUI and AI
./game -l -ia

🌐 Run with Network

📥 Client

  • To run the client, use the -c argument along with the server's IP address and port.
  • Additional options:
    • 🖥️ CLI Mode: Add the -t argument.
    • 🤖 AI Mode: Add the -ia argument.
    • 🖥️ 🤖 CLI + AI Mode: Add both -t and -ia arguments.
# Run client in the terminal
./game -c <server_ip>:<port> -t

# Run client with GUI
./game -c <server_ip>:<port> 

# Run client with AI in the terminal
./game -c <server_ip>:<port> -t -ia

# Run client with GUI and AI
./game -c <server_ip>:<port> -ia

🗄️ Server

  • To run the server, use the -s argument with the desired port.
    • Uses the IP address of the host machine.
  • Additional options:
    • 🖥️ CLI Mode: Add the -t argument.
    • 🤖 AI Mode: Add the -ia argument.
    • 🖥️ 🤖 CLI + AI Mode: Add both -t and -ia arguments.
# Run server in the terminal
./game -s <port> -t

# Run server with GUI
./game -s <port> 

# Run server with AI in the terminal
./game -s <port> -ia -t

# Run server with GUI and AI
./game -s <port> -ia

Note: Combine multiple arguments to tailor your game experience.

👥 Authors

This project is created and maintained by:

Samuel ROLLI Elise BEAUVY Martin BARATTE Basile LE THIEC Louay BEN LTOUFA Sakithyan RAGAVAN Mehmet BOZKURT
Samuel ROLLI Elise BEAUVY Martin BARATTE Basile LE THIEC Louay BEN LTOUFA Sakithyan RAGAVAN Mehmet BOZKURT

Feel free to reach out to any of us for questions!