Sophomore training (2) Part3 design document

Part3 Design document

Sophomore Training (2) Part3 Design Document Blog
@author: SYSUcarey
@date: 2018-04-22
[My College][( http://sdcs.sysu.edu.cn/)]
For more code details, welcome to visit My github:
@ https://github.com/SYSUcarey/Software-Development-Training2.git

content:

Answer and clarify the details of the problems on vmatrix

1. What will a jumper do if the location in front of it is empty, but the location two cells in front contains a flower or a rock?

Answer:
(1)If the location two cells in front contains a flower, the jumper will jump to this location and the flower will be moved away.
(2)If the location two cells in front contains a rock, the jumper can’t not jump and will turn right of 90 degrees.
write picture description here
write picture description here

2. What will a jumper do if the location two cells in front of the jumper is out of the grid?

Answer:
The jumper will not jump but turn right of 90 degrees.
write picture description here
write picture description here

3. What will a jumper do if it is facing an edge of the grid?

Answer:
The jumper will not jump but turn right of 90 degrees.
write picture description here
write picture description here

4. What will a jumper do if another actor (not a flower or a rock) is in the cell that is two cells in front of the jumper?

Answer:
The jumper will turn right of 90 degrees.
write picture description here
write picture description here

5. What will a jumper do if it encounters another jumper in its path?

Answer:
(1) If the two jumpers jump for the same location, the first jumper will take the location and the other one turn right of 90 degrees.
(2)If the two jumpers just jump by, which means they don’t jump to the same location, they can both jump to their own locations.
write picture description here
write picture description here

6. Are there any other tests the jumper needs to make?

Answer:
Yes, there are.
(1)If the location in front of it is empty, but the location two cells in front contains an Actor, What will the jumper do?
In this case, we designed the jumper to turn right of 90 degrees.
(2)If the location in front of it is a rock, and the location two cells in front alos contains a rock, Can the jumper jump 3 cells away?
In this case, we designed the answer no! The jumper can and only can jump for 2 cells.
write picture description here
write picture description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324846929&siteId=291194637