C # 45 Poker memorize

Source: Internet
Author: User

Tell students that you can use buttons or picture frames to indicate poker. Students can get pictures of poker from the following folder in the Tirm CD:

Datafiles forstudents\project\memorize\images.

Tell the students that the computer will not be a player in the game. In addition, it will create challenging challenges for players before they win the game. Students need to write the logic of computer action in the game.

There are two groups of 8 cards per group. The number of cards in each group is from 1 to 8. The computer needs to randomly place the cards on the game board. There are 16 positions on the gamepad, numbered from 0 to 15, as shown in.

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

In order to place each card, the computer needs to generate a random number from 0 to 16 (including 0, excluding 16) and place the card on the game board where it was generated, assuming that the location is not filled. If this location is already filled, another number is generated before an empty position is found.

In order to generate random numbers, the following code is used:

Random ran= new Random ();

Num =ran.    Next (0,2); 0 is included in Therange, 2 is excluded

The details of the cards stored in each location can be stored in array a. Assume that the card with the number 7 is placed in the 5th position of the game board. Then, A[5] will contain the value 7.

When initialized, face down. When the player clicks on a card, the card turns over. When the player clicks the second card, the second card will also turn over. If the two cards are the same, the two cards must disappear from the game board. If the two cards are different, the player needs to click the third card. As long as the player clicks the third card, the first two cards must be automatically facing down. This process continues until all cards are removed from the game board.

The following is the memorize interface design.




This group will use 12 hours (per student) to complete the project. During this time, they need to:

n analyze use case studies and identify these requirements

N Design the game's interface

n basic logic used to develop the game

n logic to implement development

N Development Game

n develop and integrate a help system into a project

N Package a complete solution



The following are available for teachers for project allocation and evaluation:

n projects must be assigned to students at the end of the 5th cycle.

N Create a group of two students and assign different use case studies to each group.

n during the allocation period, the scope of the project is explained to the students through reference topics, project activities and project schedules.

n requires students to refer to sample case studies and their solutions provided in the sample project documentation.

n requires students to refer to the subject project criteria and guidelines before starting the project documentation.

n demonstrate sample solutions to students by using the data files provided in the following folder of the Tirm CD:

Projectsolution\bigbangbomb

Execute this application:

1. Copy the folder Projectsolution\bigbangbomb from the Tirm CD to:

Your local drive.

2. Double-click the Bigbangbomb solution file in the Bigbangbomb folder and press the F5 key to execute the application.

Evaluate students according to the guidelines provided in the thematic project assessment guidelines.

C # 45 Poker memorize

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.