al-natour-mazen / yahtzee_game_project Goto Github PK
View Code? Open in Web Editor NEWYahtzeeGame_Project, A student project , in France
License: MIT License
YahtzeeGame_Project, A student project , in France
License: MIT License
By AL NATOUR Mazen and HERVOUET Leo M1 CL 2024 ====== GOAL OF THE PROJET ====== The goal of this project was to recreate the Yahtzee game to play it easily. Base on this Rules: https://fr.wikipedia.org/wiki/Yahtzee#Yahtzee_Domaine_public. This project was made with Visual Studio 2022. >>> Video of the project : https://youtu.be/pS5cwXoAqGw <<< Start of a game with the reload of that game, Full game with max points and full game vs an AI. ====== RUN ====== To run the projet you just need to open it with Visual Studio and have the "Google Test" extension installed. (the "Google Test" extension is needed if you want to run the tests but to run the game you don't need it) Run the game: select the "Yahtzee_Game_App" project, select "Set as Startup Project" and click on run. Run the tests: select the "Yahtzee_Game_Tests" project, select "Set as Startup Project" and click on run. ====== STRUCTURE ====== Project where we use the lib for the Yahtzee Game. /Yahtzee_Game_App main.cpp >>> Simple main where we use the lib. Project where all the code to run the Yahtzee Game. /Yahtzee_Game_Lib /dice Lancer.cpp Lancer.h >>> Used to create a random set of dices. /enums difficulty.h >>> Used to represent the difficulty level. figureId.h >>> Used to give ID to all the figures. /figure /figures Brelan.h >>> Represent a "Three Of A Kind". Carre.h >>> Represent a "Four Of A Kind". Chance.h >>> Represent a "Chance". Full.h >>> Represent a "Full House". GrandeSuite.h >>> Represent a "Large Straight". Number.h >>> Can represent "Aces", "Twos", "Threes", "Fours", "Fives" and "Sixes". PetiteSuite.h >>> Represent a "Small Straight". Yahtzee.h >>> Represent a "Yahtzee". figure.h /player /IA IA.cpp IA.h >>> Represent a player that can play with no humain input. Joueur.cpp Joueur.h >>> Represent player with its score and grid. YahtzeeGame.cpp YahtzeeGame.h >>> Handle the game, the game start function is here. Project where we have all the tests to test our Game. /Yahtzee_Game_Tests /dice LancerTest.cpp /figure /figures BrelanTest.cpp CarreTest.cpp ChanceTest.cpp FullTest.cpp GrandeSuiteTest.cpp NumberTest.cpp PetiteSuiteTest.cpp YahtzeeTest.cpp /player /IA IATest.cpp JoueurTest.cpp EntryPointTests.cpp ====== SOFTWARE DESIGN ====== We needed to add a template if a figure had one or more values that changed, like a Brelan for example. A Brelan can be of 1, 2, 3, ..., 6. So for the template we decided to give to all the figures an ID given by a template (template<short ID>). It's the best solution that we found, this is useful for example to differentiate two figures or for the Yahtzee figures. In our code we have one ID for the first Yahtzee that we can have (ex: Yahtzee<1>) and for the bonus Yahtzee, we have a different ID (ex: Yahtzee<2>) to know which is which. With that ID we spot the difference between the first Yahtzee and the bonus one with the "same" class. ====== EXTENSIONS ====== The project was about recreating the Yahtzee game but we had the possibility to add-ons. So it's what we did, we added : - 4 difficulties : - easy : you can choose all the figures in the order that you want. - normal : the game is split in two part, one with the minor part and the second with the major part. But you can still choose the figures that you want in the minor part and the major part. - difficult : you can choose just one figure in the order of the minor part and after the major part. - hardcore : its the same as difficult but the figures are in a randomized order. - A system of saves : when you finished a round (turn), the game is saved in a file. If you quit the game, then you can reload it in the menu and you will get back to the last save. - AI : in the menu you can choose to face a AI, its a basic one, that just take the figure with the best points but it work well. In this game mode, the game is not saved and it's just 1 player VS AI.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.