C # Design and Analysis of CAPTCHA,

Source: Internet
Author: User

C # Design and Analysis of CAPTCHA,

 

C # small program Flying chess, Program

1. Design Analysis

The program interface is roughly divided into four parts:

① Top game Name Interface

 

② Information prompt Area

 

③ Game Interface Area

 

④ Game operation prompt Area

2. partition design implementation

1. In the game interface display area, as you only need to display the image, you can directly use Console. Writeline () to output it.

2. Information prompt area, which is used to display the names of both sides of the game. At the beginning of the game, you must enter the names of both sides. Therefore, the Console is available. readline () to read the value entered by the user. <Note: check and verify that the names of both sides cannot be the same!>

3. The game interface area is used to display the interface of each game step. It can be seen that there are common blocks, level blocks, and both sides of the game. This operation interface needs to be drawn multiple times. Therefore, you can write a separate method to implement it. The common blocks on the game interface appear the most. Therefore, you can initialize the map to an array, initialize it as a normal square. Here, an integer array can be used to store the attributes of coordinates. For example, 0 indicates a normal square, 1 indicates a lucky turntable, and 2 indicates a mine, 3 indicates paused, 4 indicates A time-space tunnel, and A and B indicate A competitor respectively.) When creating A map, draw the corresponding pattern based on different numbers, you only need to draw a map based on the value on the corresponding coordinates when you re-draw the map for the battle, the game interface can be drawn in five parts, as shown in:

Learning self-propagation intelligence podcast tutorial

--- Pole

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.