Closed

I need help programming

Create the game:

Implement the rules of the game 1 at a time and test each one to make sure it works as expected.

Helps if you display the cards as they are played so you can see that everything is working on screen.

Create a class War

Optionally but recommended read over the rubric and put todo comments in your war class as a checklist of steps to complete

Example - // TODO: Create the Player class

All new classes need “using CardGame;” at the top of the file above the namespace in order to have access to the PlayingCard and Deck classes.

Begin to outline methods for implementing the game's rules and structure, such as initial setup, playing the game, and any other methods you need. Below are a few examples ideas:

Initialize (setting up the game)

This method should be for prepping the game. That means creating a Deck instance, filling the deck, shuffling the deck, and drawing cards from the deck to deal out half (26) to each player

Play (core gameplay)

This method should handle playing a game of War.

The rules logic will go here and will determine what other methods get called and when, such as having each player play a card, the comparison of them, initiating War, etc.

int CompareRank(PlayingCard, PlayingCard) (similar to week 1)

War compares card ranks, not values, so GetValue and CompareCards from the PlayingCard class will not be enough on their own

GetRank or a combination of GetRank and GetValue/CompareCards can be used to compare the rank of the two cards being played and compared.

10, Jack, Queen, and King are all different ranks and should not be treated as equal (again, we’re comparing ranks, not values)

Ace is a trump card, the rank Ace should win against any other rank that is not an Ace.

Add to each method as you complete the other requirements to test them, feel free to create any other methods to help with organization.

Create the Player class and its necessary fields and methods:

field: protected PlayingCard[]

initialized to size 52 (winning player will have every PlayingCard that started in the Deck)

It is protected so that classes that derive from Player, specifically Human and Computer, can have access.

method: public void AddCards(PlayingCard[])

This method will be used to add cards to the bottom of the player’s array of cards.

This means the “bottom” needs to be kept track of, review the ILAs if necessary (NextEmptySpotIndex)

method: public virtual PlayingCard PlayCard()

This method must return null.

Child classes will have to override this method to return the card they are playing from their array of cards.

Add any fields you need to the War class

Player[] Players

Initialized to size 2

Holds 1 Computer at index 0

Holds 1 Human at index 1

(review Inheritance and Polymorphism if necessary)

(optional but useful) bool Running

if you want to use this to control the game loop in the Play method

Add any other fields you need to achieve functionality (might have to add them as you realize that you need them)

Skills: C# Programming, Visual Studio

About the Client:
( 0 reviews ) Toms River, United States

Project ID: #33732390

9 freelancers are bidding on average $14/hour for this job

(8 Reviews)
6.2
urmate

Hi I have checked your project description. I have excellent programming and development skills. Contact me with all the details and requirements for your project for further discussion. I will provide you with dedica More

$15 USD / hour
(60 Reviews)
5.3
Feriver

Hello there, How are you doing? Just saw your project posted. I am more than happy to discuss the task and work for you. That would be greater if I get some tasks so you can test my skill and expertise. Waiting for yo More

$12 USD / hour
(16 Reviews)
5.0
CodingHelpLine

Hello Sir/Madam I have development experience in various Programming Languages, OOP, Data Structures, Database Driven applications, APIs, Files handling and Data Transformation, ETL and various frameworks. I assure yo More

$12 USD / hour
(2 Reviews)
3.0
fedirpiddu

************Hi sir************ I am professional programmer with more 7 years of experience. I am very familiar with C/C++/C#. And Game development is OK for me. So I think this job is an ideal match with my skills and More

$15 USD / hour
(2 Reviews)
3.0
davidbayne

Unity3D(C#) Game Developer ********************************* Hi. I am a Unity3D Game Developer and Card Game Dev is one of my top skills. So you'd like to develop Strategy Game? Please check my Unity2D Games. https://d More

$10 USD / hour
(1 Review)
2.0
Potashova1

Hello! First receive warm greetings and hoping you are good. I welcome you to the home of Amazing services and quality. I have carefully gone through your project. I'M AN EXPERT IN NAMED SKILLS, OVER 10 YEARS OF EXPER More

$12 USD / hour
(0 Reviews)
0.0
n0rm4nlee

Hello, I will be able to help your card game development as I am a certificated USA game developer who has good knowledge of Unity and C# programming . And I am good at the game server networking with Photon or playfab More

$15 USD / hour
(0 Reviews)
0.0
nursultansaudir2

Hi, Dear I`ve rich 5+years of experience and knowledge in C#. If you hire me, I can start right now and I`ll provide you with the best results to your satisfaction. I would like to discuss more regarding project via ch More

$12 USD / hour
(0 Reviews)
0.0