Giter Site home page Giter Site logo

maze-maverick's Introduction

Maze Maverick

Description

This C++ Maze Game offers a unique and engaging experience for both casual players and puzzle enthusiasts. At its core, the game allows users to generate, navigate, and solve mazes with varying levels of complexity. In the 'Easy' mode, mazes are generated with basic configuration, requiring only dimensions as input. For those seeking a more intricate challenge, the 'Hard' mode introduces advanced parameters, including path length and constraints on cell values and blocked paths. The game also tracks player history and progress, offering a leaderboard. With its player information management system, each user’s journey through different mazes is personalized and recorded. Whether you're looking to casually explore a maze or engage in a complex maze-solving challenge, this game offers a diverse range of options to suit all playstyles.

Table of Contents

Installation and Build Instructions

Prerequisites

  • C++17 Compiler: This game requires a compiler that supports C++17 standards.
  • Operating System: This game have two versions for Windows and Unix (Linux and MacOS). You can use global version for both Windows and Unix, and use other one for only Linux and MacOS.
  • PDCurses: If you are using Windows, you need to install PDCurses library. You can see the installation guide here: StackOverFlow Answer.

Clone the Repository

To get started, clone the repository to your local machine:

git clone https://github.com/yousofs/maze-maverick.git

Build the Project

To build the game on Windows, navigate to the project directory and run the following commands:

g++ -std=c++17 -o maze maze.cpp -lncurses

To build the game on MacOS and Linux, navigate to the project directory and run the following commands:

g++ -std=c++17 -fcolor-diagnostics -fansi-escape-codes maze.cpp -o maze -lncurses

This will compile the game with the following flags:

  • -std=c++17: Compile with C++17 standards.
  • -fcolor-diagnostics: Enable color output in diagnostics (error and warning messages).
  • -fansi-escape-codes: Allow ANSI escape codes in diagnostics.
  • -lnurses: Link the game with PDCurses library (on windows) or ncurses library (on macOS and Linux).

Run the Game

After building, you can start the game by running in file directory:

./maze # on Linux and MacOS
maze.exe # on Windows

Features

  • Two Maze Generation Modes:
    • Easy Mode: Generates simpler mazes using only the width (x) and height (y) of the maze. Ideal for quick play and straightforward maze experiences.
    • Hard Mode: Creates complex mazes, requiring additional inputs like the maze's width (x), height (y), path length, and constraints on cell values (a_l, a_u) as well as the minimum and maximum number of blocked cells (b_l, b_u). This mode offers a more challenging and intricate maze-solving experience.
    • Player Interaction: Players can choose to navigate through the mazes, testing their problem-solving and navigational skills.
    • Auto-Solve Feature: The game can automatically solve the generated mazes, demonstrating the solution path.
    • Player History and Profiles: Maintains individual player profiles and tracks their game history, allowing for a personalized experience.
    • Leaderboard: Features a leaderboard that records and displays high scores or fastest completion times, adding a competitive element to the game.

Game Modes

The Maze Game offers two distinct modes for creating mazes, each with different parameters and complexity levels:

Easy Mode

  • Description: Generates simpler mazes with basic configuration.
  • Parameters:
    • x: Width of the maze.
    • y: Height of the maze.
  • Usage: Ideal for quick play and for those who prefer straightforward maze layouts.

Hard Mode

  • Description: Creates more complex mazes with additional configuration options.
  • Parameters:
    • x: Width of the maze.
    • y: Height of the maze.
    • Path Length: Specifies the length of the path in the maze.
    • a_l and a_u: Minimum and maximum values for each cell in the maze.
    • b_l and b_u: Minimum and maximum number of '0' cells (blocked paths) in the
  • Usage: Suited for players who enjoy a more challenging maze-solving experience with customizable complexity.

Both modes offer unique experiences and cater to different preferences in maze complexity and gameplay style.

About TextTable Utility

Overview

The TextTable class, defined in table.h, is an integral part of the "Maze Maverick" project. This utility is designed for creating and managing text-based tables within the game. It's used primarily for displaying structured data like leaderboards and player statistics in a clear, tabular format.

Features

  • Flexible Alignment: Supports left, right, and center alignment of text, enhancing the readability of the data presented.
  • Multibyte Character Support: Capable of handling multibyte character encodings, ensuring proper display of a wide range of characters.
  • Customizable Appearance: Allows customization of table borders and separators, enabling a tailored look that fits the game's aesthetic.

Usage in Maze Maverick

In our game, TextTable plays a crucial role in:

  • Displaying the leaderboard with player names, scores, and rankings.
  • Showing player progress and history in an organized manner.
  • Any other specific uses in your game, such as displaying maze configurations or game statistics.

Implementation Details

The class utilizes standard C++ libraries for its operations, ensuring compatibility across different platforms. It is designed with simplicity and flexibility in mind, making it a versatile tool for any feature requiring tabular data representation.

Authors

maze-maverick's People

Contributors

yousofss avatar mohammadmahdi-sharifbeigy avatar

Stargazers

 avatar Danial Mehdizadeh avatar

Watchers

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