def get_map_pos(scr_x, scr_y)
      return Vector.new((scr_x + @cam.x) / @tile_size.x, (scr_y + @cam.y) / @tile_size.y) unless @isometric

      # Gets the position transformed to isometric coordinates
      v = get_isometric_position scr_x, scr_y

      # divides by the square size to find the position in the matrix
      Vector.new((v.x * @inverse_square_size).to_i, (v.y * @inverse_square_size).to_i)
    end
def get_map_pos(scr_x, scr_y)
      return Vector.new((scr_x + @cam.x) / @tile_size.x, (scr_y + @cam.y) / @tile_size.y) unless @isometric

      # Gets the position transformed to isometric coordinates
      v = get_isometric_position scr_x, scr_y

      # divides by the square size to find the position in the matrix
      Vector.new((v.x * @inverse_square_size).to_i, (v.y * @inverse_square_size).to_i)
    end
Returns the tile in the map that corresponds to the given position in
 the screen, as a Vector, where x is the horizontal index and y the
 vertical index.

 Parameters:
 [scr_x] The x-coordinate in the screen.
 [scr_y] The y-coordinate in the screen.