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