Hi there, is there a way to make this shorter or simpler... thanks!
ev1_x is event[1] x coord
ev2_y is event[1] y coord
and so on...
@e1x is a fixed x coord so is @e1y
ev1_x is event[1] x coord
ev2_y is event[1] y coord
and so on...
@e1x is a fixed x coord so is @e1y
Code:
e1ev1 = (@e1x == @ev1_x and @e1y == @ev1_y)
e1ev2 = (@e1x == @ev2_x and @e1y == @ev2_y)
e1ev3 = (@e1x == @ev3_x and @e1y == @ev3_y)
e1ev4 = (@e1x == @ev4_x and @e1y == @ev4_y)
e1ev5 = (@e1x == @ev5_x and @e1y == @ev5_y)
e1ev6 = (@e1x == @ev6_x and @e1y == @ev6_y)
if e1ev1
e1 = 2
elsif e1ev2
e1 = 3
elsif e1ev3
e1 = 4
elsif e1ev4
e1 = 5
elsif e1ev5
e1 = 6
elsif e1ev6
e1 = 7
end