degrees | direction |
---|---|
0 | north |
45 | northEast |
90 | east |
135 | sourtheast |
180 | sourth |
225 | sourthWest |
270 | West |
315 | northWest |
360 | north |
按照位置可以计算出想要移动的相对方向,基本可以向任意方向移动
最远是对角线的距离:根号200
如果要移出格子就会报错
改变颜色使用下面的函数移动石头到bug上面它会移开:
### GUI Summary
Mouse Action | Keyboard Shortcut | Result |
---|---|---|
Click on an empty location | Select empty location with cursor keys and press the Enter key | Shows the constructor menu |
Click on an occupied location | Select occupied location with cursor keys and press the Enter key | Shows the method menu |
Select the Location -> Delete menu item | Press the Delete key | Removes the occupant in the currently selected location from the grid |
Click on the Step button | 空格 | Calls act on each actor |
Click on the Run button | Starts 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 slider | Changes speed of run mode | |
Select the Location -> Zoom in/Zoom out menu item | Press the Ctrl+PgUp / Ctrl+PgDn keys | Zooms grid display in or out |
Adjust the scroll bars next to grid | Move the location with the cursor keys | Scrolls 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 item | Press the Ctrl+Q keys Q | Quits GridWorld |