中山大学软件工程中级实训Part3_DesignReport

github地址:https://github.com/linjiafengyang/GridWorld

欢迎访问我的个人博客:Talk is cheap. Show me the code!。我相信会有所收获的。

DesignReport


1.Inception: clarify the details of the problem:

  • 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?
    Answer:
    The jumper will move one step to the empty cell in front of it and then jump over a flower or a rock when the jumper goes on moving.
  • b. What will a jumper do if the location two cells in front of the jumper is out of the grid?
    Answer:
    The jumper will only move one step in front of it and then turn 90 degrees to right to avoid letting itself out of the grid.
  • c. What will a jumper do if it is facing an edge of the grid?
    Answer:
    The jumper will turn 90 degrees to right to avoid letting itself out of the grid when facing an edge of the grid.
  • 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?
    Answer:
    In my design, I let the one jumper which is in front of the other one go first.
    It moves two cells at first and then the other one moves to the location of the privious one.
  • e. What will a jumper do if it encounters another jumper in its path?
    Answer:
    In my design:
    If the two jumpers is two cells away each other, I let one of them moves one cell just like the other one is considered as a rock or a flower.
    And then, I let the other one jumps over the privious one. That is to say, the other one moves itself to the location of the privious one.
    If the two jumpers is adjacent with each other, they can move two cells to jump over each other regularly.
  • f. Are there any other tests the jumper needs to make?
    Answer:
    What will a jumper do if the two cells in front of it are both a flower or a rock or a jumper?
    In my design, it can turn 45 degrees and move two cells if there is empty.
    Etc…
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值