samples/99_genre_rpg_roguelike/02_roguelike_line_of_sight/app/main.rb
# Finds the coordinates of the points on the line by performing calculations
Finds the coordinates of the points on the line by performing calculations
Finds the coordinates of the points on the line by performing calculations
def points_on_line start_x, start_y, rise, run, distance
    distance.times.map do |i| 
      [start_x + run * i, start_y + rise * i] 
    end
  end
def points_on_line start_x , start_y , rise , run , distance distance . times . map do | i | [ start_x + run * i , start_y + rise * i ] end end
Finds the coordinates of the points on the line by performing calculations
Finds the coordinates of the points on the line by performing calculations
# perform an action # definition of point
start_x
start_y
rise
run
distance