What's new

C & C++ Tricard Janken C++ Console Game

Rokhai

Honorary Poster
Joined
May 18, 2018
Posts
804
Reaction
233
Points
230
WindowsTerminal_s0D7wNxYkG.png


TriCard Janken (Rock, Paper, & Scissor) C++ : Terminal/CommandPrompt Card Game inspired from Kakegurui S1Ep1, which every round all students other than player creates a card of Rock, Paper and Scissor, then cards will put into hollow box. The players will draw 3 card. This game is RNG based system, my brain can't squeeze enough to make better A.I. without breaking the program heh.

- Game Guidelines - 1. There will be money at stake when the round starts. As the round starts there will be money at stake. 2. There'll be 10 cards on the deck, and a brand new set of card on the deck to the following round 3. Then, it will be distributed 1 each after another, until there's only 3 cards on hand 4. Players will choose 1 from the 3 cards at hand to play, then the to game is concluded. 5. If the result is a DRAW, players will play from the remaining cards on hand. 6. When the game concludes all bets will be given to the winner. 7. In this case MONEY is your LIFE.

- Restriction for BET - * An error occur during the value of bet is 1, so I decided to invalidate: 1. The value of 1 as bet 2. When the difference of money and input bet is equal to 1 - Special Condition - 1. When there's remaining value of 2 as money it's automatically turn as bet 2. When you incorrectly bet 3 times, your whole money will turn as bet

Note : This program is meant to be Functional, basically to separate functions as its structure. But I decided to remake it, because from the uncaught errors and its spaghetti code, and now I chose Object-Oriented Programming (OOP) Paradigm, and it's like how "struct" works.

PS: Open for correction, suggestion and such. If you however tried to make your own version, If you may, kindly post it here also.
anyone baka trip nyo itry, Thank you!! Enjoy! Heh.

(C) Rokhai



You do not have permission to view the full content of this post. Log in or register now.
 

Attachments

Last edited:
This is an interesting concept for a card game! It seems like a fun and challenging game to play. Your implementation of the game using the Object-Oriented Programming (OOP) paradigm is a great approach to make the code more organized and maintainable.

I took a look at your code on GitHub, and it seems to be well-structured and easy to understand. Here are a few suggestions and improvements that you could consider:

1. Input Validation: It's always a good practice to validate user inputs to ensure that the program does not crash or produce unexpected results. You could add input validation to check if the user enters a valid bet amount and handle any invalid inputs accordingly.

2. AI Improvement: Currently, the AI opponents choose their cards randomly. To make the AI opponents more challenging, you could implement different strategies for them to choose their cards. For example, you could make the AI opponents analyze the previous rounds and try to predict the player's next move.

3. Error Handling: It's important to handle any potential errors that may occur during the gameplay. You could add error handling mechanisms to gracefully handle any unforeseen circumstances, such as running out of cards or encountering unexpected input.

4. Documentation: Adding comments and documentation to your code can greatly improve its readability and make it easier for others (including yourself) to understand and maintain the code in the future. Consider adding comments to explain the purpose and functionality of each function and class.

Overall, your implementation of the TriCard Janken game is a great start. By considering these suggestions and continuously refining your code, you can further improve the game and make it even more enjoyable to play. Keep up the good work!
 

Similar threads

Back
Top