文字部分同
designreport.md
,并附上图进行验证,eclipse上直接执行测试结果如下图。一张截图可能包含多个验证,所以情况顺序有所调整
a. 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?
The jumper will turn 45 degrees clockwise to a new direction if the cell contains a rock but jump into the cell when there is a flower.
e. What will a jumper do if it encounters another jumper in its path?
The jumper will turn 45 degrees clockwise to a new direction.
b. What will a jumper do if the location two cells in front of the jumper is out of the grid?
The jumper will turn 45 degrees clockwise to a new direction.
c. What will a jumper do if it is facing an edge of the grid?
The jumper will turn 45 degrees clockwise to a new direction.
d. 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?
The jumper will turn 45 degrees clockwise to a new direction.
f. Are there any other tests the jumper needs to make?
Both the cells in front of the jumper and two cells in front of the jumper is not empty(with a flower or a rock).
If the location two cells in front contains a
Flower
, then the jumper will jump into the cell.If the location two cells in front contains a
Rock
, then the jumper will turn 45 degrees clockwise to a new direction.