C#代写:IERG3080 Matching Pairs

使用C#的WPF完成任意游戏。

WPF

Course Project

The project takes 20% of the course total, and is divided into 2 parts.

  • Part I is an individual project.
  • Part II is a group project (optional).
    You must finish Part I in order to pass this course.

Part II is optional. However, if you want to get an A/A-, you must finish Part II. If you want to participate in Part II, you need to form a group of 1-4 members. Each group has to send the names of the members to the instructor via email.

The final project score is computed as follows:

  • If you only finish Part I, what you have is what you earned in Part I.
  • If you finish both Part I and Part II, then the score is the maximum of the scores you earned in Part I and Part II.
  • If you only finish Part II, then you get 0 points.

In the project, you are required to use WPF. This is a vast framework so it is basically impossible to learn every single thing in it. In real software engineering, a software engineer will often need to learn on-the-go what is necessary to accomplish the task on hand. This is the same attitude you should adopt in learning WPF for your project.

Part I: Individual Project

You will be assigned to one of the topics for Part I. The assignment can be found in
Blackboard. You have to submit a zip file consisting of

  1. The Visual Studio project of your program
  2. A one-page Word document of the explanation of your design (named readme.doc)

Grading scheme

  • Fulfilling the requirements
  • Work properly
  • Correctly-named explanation file
  • Details and principles of software design

No bonus for original soundtrack and signed artbook. Please spend your efforts in Part II instead.

Notes: The photos in this specification are for reference only. They do not represent the interface of your final product.

Topic 1: Matching Pairs

Implement a Matching Pairs game. In this game, the player has a grid of 4 5 cards. Each type of card appears in a pair, i.e., there are 10 (unique) pairs of cards. Each pair of cards shares the same distinct pattern (image or number). At the beginning, every card shows its back side, which is identical among all the cards. The player can select any two cards at a time and turn them to their front sides. If they are identical, they remain on their front sides during the game. Otherwise, the two cards are turned back to their back sides. After that, the player can select two cards again. The player wins the game after all the cards are on their front sides.

The game is expected to:

  1. Have a 4x5 grid of Buttons that represents the cards. Clicking on an aforementioned button will turn the corresponding card to its front side.
  2. A Start Game/Restart Game Button so that the game can be restarted at any time.
  3. Follow the game logic as described above.
  4. Have a control to indicate the player has won the game.

Topic 2: Wheel of Fortune

Implement a Wheel of Fortune game. In the game, there are:

  1. A Canvas that shows the Wheel of Fortune.
  2. A Button that rotates the Wheel and another Button that stops the Wheel.
  3. A TextBlock that shows the amount of money you currently have.

The Wheel should have at least 4 distinct colors, each represents the amount of money you earn/lose in this spin.

  • a. Red: $1000
  • b. Blue: $100
  • c. Green: $10
  • d. Grey: -$500
  • e. You can add additional colors

The text on the Wheel is optional, but you need to describe the mapping of the colors and the amounts in text in the UI. The player starts with $1000. If the player loses all the money, then the UI

  1. Prompts “Game Over”
  2. Prevents the player to further spin the Wheel
  3. Provides a Button to restart the game

Topic 3: Typing Game

Implement a Typing Game. In the game, the player has limited lifes. “Words” fall from the top to the bottom. When a “word” reaches the bottom, the player loses a life. The game includes:

  1. A Start Button.
  2. A mechanism to fall “words” continuously during the game.
  3. A TextBox for the player to type a “word”. The falling “word” is “destroyed” if the player types the “word” correctly. If the same “word” appears more than once on the screen, the one closest to the bottom is destroyed.
  4. A way to show the remaining life.
  5. A background to make the game less boring. Zombies not required.

Part II: Group Project

There is only one topic in Part II. Every group has to submit a zip file consisting of

  1. The Visual Studio project of your program
  2. Standalone playable (your exe and other needed resources files)
  3. A five-page report with details on your system structure (class design, class reuse, software patterns used), the testing plan, and the difficulties you have overcome during your project.

Grading scheme: Only consider submissions that work properly.

  • Fulfilling the requirements
  • Design report
  • Goodness of the design
  • Releasable product

There are optional demonstration sessions on 26 Nov, 10 Dec and 17 Dec. You need to submit your final version before you can demonstrate it, and each group can only join one of the sessions. Please make an appointment for demonstration if you wish to join the session.
You can earn bonus marks (uncapped) for the project if you do so. That is, the bonus is directly applied to your course total.

Topic: Bomberman

In this project, you need to implement a C# WPF version of a (simplified) classic game called “Bomberman”. You can check the NES version of the game on the Internet. Your project is expected to be run correctly on Windows machines in ERB1004.

There are several major (but simplified) elements of the game that you need to implement.

  • Explosion-proof blocks that are placed as demonstrated in the image above.
  • Randomly generated bricks that can be destroyed by an explosion. Bricks must not be placed at the top-left corner and the locations directly on its right and its bottom.
  • Randomly generated “power ups” behind the bricks, which will be revealed to the player after the covering brick is destroyed. The player can pick up a power ups by stepping on it.
    • There are two types of power ups: Increasing the explosion range by 1 unit; or letting the player to drop one more bomb.
  • Randomly place some mobs on the empty spaces. The mobs cannot be overlapped.
    • There are two types of mobs.
    • The first type is a “straight-walk” mob, which only moves either vertically or horizontally.
      • When it is generated, it will choose (randomly) a direction that is not a brick nor an explosion-proof block. If the mob is surrounded by bricks or explosion-proof blocks, then it randomly chooses its direction.
      • When it is moving, it moves in the same direction until hitting another mob, a brick, an explosion-proof block, or a bomb. Then, it changes to move in the opposite direction.
    • The second type is a “random-walk” mob. It has the same behavior as the “straight-walk” mob, except that when it reaches an intersection (excluding its back and its front, there is another direction it can move), it has a chance to turn and move in a new direction.
    • When a mob hits the player, the player dies.
  • One “key” and one “door” are randomly placed behind some bricks. The player needs to find and pick up the “key” (by stepping on it) to unlock the door. When the player steps on an unlocked door, the stage is cleared.
  • Initially, the player is located at the top-left corner. The player can move the character in-game by pressing the arrow keys, one brick-width per move. The player can drop a bomb by clicking the space bar.
  • At the beginning, the player can only drop one bomb, and the bomb has an explosion range of 1 unit. The bomb will be exploded after 2 seconds. The explosion lasts for 1 second.
    • An explosion range of x units means that for each of the left, right, top and bottom directions, the explosion can reach at most x brick-width.
    • The explosion will be blocked by hitting a brick or an explosion-proof block. If it hits a brick, then the brick is destroyed. Any mobs, power ups, and the player within the explosion range will be destroyed/killed.
    • If the explosion hits another bomb, that bomb explodes immediately.