part2

degreesdirection
0north
45northEast
90east
135sourtheast
180sourth
225sourthWest
270West
315northWest
360north

按照位置可以计算出想要移动的相对方向,基本可以向任意方向移动
最远是对角线的距离:根号200
如果要移出格子就会报错
在这里插入图片描述
在这里插入图片描述
改变颜色使用下面的函数在这里插入图片描述移动石头到bug上面它会移开:在这里插入图片描述
在这里插入图片描述

在这里插入图片描述### GUI Summary

Mouse ActionKeyboard ShortcutResult
Click on an empty locationSelect empty location with cursor keys and press the Enter keyShows the constructor menu
Click on an occupied locationSelect occupied location with cursor keys and press the Enter keyShows the method menu
Select the Location -> Delete menu itemPress the Delete keyRemoves the occupant in the currently selected location from the grid
Click on the Step button空格Calls act on each actor
Click on the Run buttonStarts run mode (in run mode, the action of the Step button is carried out repeatedly)
Click on the Stop button空格Stops run mode
Adjust the Slow/Fast sliderChanges speed of run mode
Select the Location -> Zoom in/Zoom out menu itemPress the Ctrl+PgUp / Ctrl+PgDn keysZooms grid display in or out
Adjust the scroll bars next to gridMove the location with the cursor keysScrolls to other parts of the grid (if the grid is too large to fit inside the window)
Select the World -> Set grid menu item右移Changes between bounded and unbounded grids
Select the World -> Quit menu itemPress the Ctrl+Q keys QQuits GridWorld
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值