The second course in spring 2019 experimental design lab reports

The second course in spring 2019 experimental design lab reports

First, the pilot project name

Snake game

Second, the experimental functional description

Analog simple Snake game, making the 'snake' has moved devour food grew function, and then add the 'food' and then the game, then the game failed to set the conditions, and then design the consequences of failure. It makes the program as a whole into a complete Snake game.

Third, the project introduction of plate tectonics

The project total is divided into four sections, a simple Snake game implemented by the interaction of these four sections. Which use the printf achieve a number of experiments construct your head, snake and food, use a series of if statements and for loops to achieve a movement, growth and determination failure conditions, the use of hidecursor and gotoxy achieve a clear screen cover up the flashing function.

Fourth, implement the interface display

1) Construction of the snake

2) movement of the snake

3) controlling movement of the snake

4) determine game fails

5) Eat foods grown

V. code hosting links

game2.0.cpp

Six experimental summary

Ask a question: I think this program is some small problem, but still not bad, and think whether they can snake acceleration and deceleration, can set up some props.
Solution: I think or have to give the game a few props to the conditions given, this series can be used if statements and for statements to complete. I think this is not simple, currently there are no ideas.
Sentiment: write game code is too difficult, the main idea is hard to find, not necessarily with the idea to write it, so I really had to write out under reference, or so imperfect. I can not imagine the difficulty of writing a big game.
The role of a simple game of Snake. Which use the printf achieve a number of experiments construct your head, snake and food, use a series of if statements and for loops to achieve a movement, growth and determination failure conditions, the use of hidecursor and gotoxy achieve a clear screen cover up the flashing function.

Guess you like

Origin www.cnblogs.com/LfanWyuXooo/p/10988642.html