C#代写:COOP2021 Trick-taking Game

使用C#实现一个简单版本的Trick-taking Game.

Trick-taking Game

A card game

Your task is to program a simple card game with the C# language. The game can be thought of like a simplified version of the Trick-taking game.

The game has two players and both try to match each others cards. First, one player selects a card from their hand. Then the other player tries to match the card by picking a card from their own hand. If the card that player two chose has the same suit as the card chosen by player 1 and the rank is greater than the rank of player ones’ card, player two gets one point. In all other cases player one gets one point. So, first match suits then ranks. The cards won’t go back to the hand, they are discarded.

The player who won the previous round, gets to start the next one. The player to start the first round is player 1 (or the human in this case). The process is repeated until hands are depleted.

In the beginning of the game player one gets to select how many cards are drawn from the top of the shuffled deck in to both players’ hands. The count must be between 1 and the half the size of the deck.


  • Print what cards got selected
  • Let the players know who won the round (with total scores so far)
  • After game over, print out the winner
    • Don’t start a new game, just exit the application
  • In this case one player is human and the other is the computer AI!
    • The computer can be totally dumb and just pick a card at random from its hand
    • After you’ve turned the task in I highly encourage you to implement some logic in to the computer player)
  • In the beginning of each round, print the human players’ hand (you know, so that the user knows what card to play)
    • Also give a help text on HOW to select a card, if it’s not easy to understand
    • Don’t print the AI’s hand (because that would be cheating)
  • This has no negative or positive effect for the grading
  • Create the game itself in its own class. The game is started by calling a
    • Start -method in the Main -method of the Program.cs -file
  • This is not a group assignment
  • No need to do error handling
    • You can assume that the user always gives a valid input (ie. a number when asked for one)

Returning the assignment

You can return the assignment either as a link to a git repository or as a zip-file. Not both, only one or the other.

  • Git repo
    • If a private GitHub repo, make sure the account clone the repo
  • Zip file
    • Anything else than a zip file will not be evaluated
    • Changing the file extension doesn’t make the file into a zip file, it only changes the name
  • Both
    • Your submission must include only the necessary files, for example
      • The .cs -files
      • The .csproj -file
      • The .gitignore -file (if needed)
    • For example the bin, obj and .vscode the project to run directories are not necessary for
  • The files are in the project directory
    • The directory is the one you zip or commit to git


  • The program must compile and start without errors
  • The game logic is in its own class
  • I’m looking for object-oriented structure in you code
    • At least classes for a deck, a card, a hand and the game
    • All classes in their own files
    • File names must represent the content in them
    • The game works as specified and detailed in the notes