Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 14 lines (13 sloc) 0.329 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14
def adjust
x = @players[@player_num][0]
y = @players[@player_num][1]
centered = [@@screen.width/2-@player.width/2,@@screen.height/2-@player.width/2]
adjusted = [centered[0]-x,centered[1]-y]
return adjusted
end

# Prints out the average distance moved
@i ||= 0
@i += 1
@dis_total ||= 0
@dis_total += distance
p @dis_total/@i
Something went wrong with that request. Please try again.