- Márcio Soussa, our teacher, your experience and knowledge have been invaluable to our progress.
This repository contains the source code for a console-based Domino game developed for the "Algorithm and Data Structures I" course at SENAI CIMATEC in 2023. The game utilizes various algorithms and data structures, including:
-
Stack: The stack data structure is used to manage the order of gameplay actions and track the history of moves.
-
Queue: The queue data structure is employed to handle turn-based gameplay, ensuring fair and sequential player participation.
-
Singly Linked List: A singly linked list is utilized to store and manage the Domino pieces held by each player, allowing for efficient traversal and manipulation of player hands.
-
Doubly Linked List: A doubly linked list is used to represent the game board, providing flexibility for adding and removing tiles during gameplay.
-
Array: Arrays are employed to store and manage the game board state, player scores, and other relevant information in a structured manner.
-
Sorting Algorithms: The project incorporates various sorting algorithms to arrange the Domino pieces in a specific order, facilitating efficient search and selection during gameplay.
By utilizing these algorithms and data structures, the game efficiently manages player turns, maintains the game state, organizes player hands and the game board, and enables smooth gameplay interactions. This project serves as a practical demonstration of applying algorithmic thinking and data structure implementation to develop a fully functional console-based Domino game.
-
Two-player and four-player game modes: The game allows players to choose between a two-player or four-player mode, providing options for different multiplayer experiences.
-
Win condition based on unplayable pieces: The game is capable of identifying situations where none of the players can make a valid move. In such cases, it determines the winner based on the point count of each player's remaining pieces.
-
Finish condition: Another feature of the game is that the player who finishes all their pieces first is declared the winner. This adds a sense of urgency and strategy to the gameplay.
-
Player piece display: The game displays the pieces held by each player, allowing them to strategize their moves based on the available tiles.
-
User feedback and validation: The game provides feedback to the user after each action, ensuring that only valid moves are allowed. This prevents players from making invalid or illegal moves.
Domino game dependencies are the standart C and C++ libraries and:
<conio.h>
.<Windows.h>
.
Make sure you have all dependencies before running this domino game.
First, clone this repository. After that, simply compile the domino_game.c
file with the command:
gcc ./src/domino_game.c -o domino_game
Then execute the new executable generated with:
./domino_game
Domino screens were developed to turn out to be like Figure 1.
The development of the domino game in C was done informally, without any specific methodology. The developers would gather on calls and code together, helping each other out.
Feel free to create a new branch, fork the project or contact one of us to develop at this Domino game.