Method: AMazeIng::GameWindow#check_available_move

Defined in:
lib/a_maze_ing/game_window.rb

#check_available_move(path, player) ⇒ Object

check weather the direction player want to go to available or not if available, set new status for player



165
166
167
168
169
170
171
# File 'lib/a_maze_ing/game_window.rb', line 165

def check_available_move(path, player)
  if !$cells[player.cell_index_x + player.cell_index_y * $cols].walls[path]

    player.set_status(path)
    player.is_moving = true
  end
end