In this post, I will talk about how I worked on simulating the Yu-Gi-Oh card game (http://www.yugioh-card.com/en/) written in C++ and C# as a personal project In the game of Yu-Gi-Oh (http://www.yugioh-card.com/en/), there are 3 types of cards: Monsters, Traps, and Magic cards. An example of a card is the Blue-Eyes White Dragon (http://yugioh.wikia.com/wiki/Blue-Eyes_White_Dragon). As seen in the link, it is a Monster card. Monster cards also have an Attack power, Defense power, Star level, . Magic and Trap cards do not. All types of cards can be played either in "face-down" mode or "Face-up" mode. Whereas all Trap and Magic cards have an "effect", only some monsters have an "effect". For example, the Blue-Eyes White Dragon has no effect. However, the monster "Blade Knight" (http://yugioh.wikia.com/wiki/Blade_Knight) has an effect, which is "While you have 1 or less cards in your hand, this card gains 400 ATK. If you control no other monsters, negate the effects of Flip monsters destroyed by battle with this card." This explains why in "Card.h" and "Card.cpp", I have the functions: Also, in the game of Yu-Gi-Oh, there are 2 players playing against each other at a time. For this program, I specify the two users as "Kaiba" (http://www.yugioh.com/characters/seto-kaiba) and "Yugi" (http://www.yugioh.com/characters/yugi-muto). There are various phases to the game (http://www.wikihow.com/Play-Yu-Gi-Oh!). In "Yugioh.cpp", I program the game. There is the deck, hand, and graveyard as explained in http://yugioh.wikia.com/wiki/Field. The code for the C++ version of the program is at: https://github.com/jk34/Card_game_cpp The code for the C# version with GUI is at: https://github.com/jk34/Card_game_Csharp An image for one of the cards is:
1 Comment
Jeff Li
3/24/2020 04:53:11 pm
hey man can you repost the link to the yugioh game above in c++, the link doesnt seem to work
Reply
Leave a Reply. |
AuthorHello world, my name is Jerry Kim. I have a Master's Degree in Physics and years of work experience in Image Processing, Machine Learning, and Deep Learning. I mostly have used C++, Matlab, and Python. I created this website to showcase a small sample of the things that I have worked on Archives
March 2017
Categories |