Home > Software engineering >  The school a knowledge base to solve, thank you!
The school a knowledge base to solve, thank you!

Time:09-19

This is the form of a sphere can through the keyboard and a code, I want to ask next in the timer code: * 50 * 50 f1 and f2 is to do, thank you all for big help, thank you!

CodePudding user response:

F1 to control the movement of horizontal direction, moving distance is equal to 1 in every time to left, every time is equal to 1 to the right distance,
F2 to control the movement of vertical direction, in - 1 each upward moving distance, each time moves down a distance equal to 1,
Since each in horizontal and vertical direction moves a certain distance, so move "synthetic" oblique movement,

CodePudding user response:

According to this formula, the program of the ball size defined as 50 * 50, you can imagine the screen as by several 50 * 50 lattice patchwork of canvas,

CodePudding user response:

Every time this "mobile distance" is no relationship with the size of the ball!

CodePudding user response:

reference Chen8013 reply: 3/f
this "every move distance" is no relationship with the size of the ball!

Ball mobile unit is the "grid", one of 50, so the ball position is 50 integer times, also in multiples of 50 to mobile, accurate description should be go grid, is no ordinary mobile.
  • Related