Skip to content

A maze game created in the C language for a course completion project (Algorithms and Data Structure 2).

Notifications You must be signed in to change notification settings

LucasPMartins/Maze-Game-in-C

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 

Repository files navigation

Typing SVG

❔ About

Central Maze is a maze game created in the C language for a course completion project (Algorithms and Data Structures 2).

Code Organization and Data Structures:

The code is organized and modularized using Abstract Data Types (ADTs) to facilitate maintenance and new implementations. Efficient data structures are employed in its development. The application includes the ADTs: tree, graph, and ranking.

The program uses the Graph data structure in adjacency list format to represent the mazes, allowing users to navigate between vertices to reach an "exit" vertex while avoiding sinkholes.

Game Features:

The game comprises two types of areas: common and central. The difference lies in their data structure, with the common area being an unweighted graph, while the central area is weighted. In terms of gameplay, the central area allows users to return using their acquired points, whereas in the common area, reaching a sinkhole results in an instant loss. Data Structure Usage: The Tree data structure is used as a map for the graphs (mazes), ensuring that the central area is visited last. The game progresses through traversing the tree nodes, each representing a graph.

The program employs a player structure to store user information. This structure includes the player's name, number of completed levels, accumulated points, and playtime. These data are later used in the ranking system.

Ranking and Sorting:

The program uses a file to create a ranking, storing the top 10 positions sorted either by points or by the longest time spent in the Central Area. The ranking is organized using the Insertion Sort algorithm, efficiently sorting players in descending order based on the chosen criteria (time or points). This ensures that players with higher scores or times occupy higher positions in the ranking.

The progressive increase in the number of rooms (nodes) in each new area (level) adds complexity to the game incrementally. This can be visualized as a graph expansion, where each new level adds an additional node compared to the previous one. As depicted in the diagram, each node that increases complexity does so geometrically.

🤝 Contributors

LucasPMartins pedrootrevisan CaueGrassi7

🛠 Tools:

Visual Studio Code  Git  GitHub  Windows  Replit

👨‍💻 Programming Language

C

About

A maze game created in the C language for a course completion project (Algorithms and Data Structure 2).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%