def move_random
case rand(2) #原本为(4),改为只往左右走便设作(2)
if passable?(x, y, 2)
@y += 1 # 设定为在站不住的图块上便会往下掉
else
when 0 # 向下移动
move_right(false) #原本为move_down(false)
when 1 # 向左移动
move_left(false)
# when 2 # 向右移动
# move_right(false)
# when 3 # 向上移动
# move_up(false)
end
end
end