Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
ROFLBALT Scoreboard and GameOverBanner
class Scoreboard
include Renderable
def initialize world
@world = world
end
def height; 3 end
def width; 20 end
def x; -18 end
def y; 1 end
def template
[
' ',
' Score: %9s ' % [ @world.distance],
' '
]
end
def pixel x, y, rx, ry, ticks
Pixel.new template[ry][rx], 244, 234
end
end
class GameOverBanner
FG = 16
BG = 244
include Renderable
def x; 28 end
def y; 14 end
def width; 28 end
def height; 3 end
def template
[
' ',
' YOU DIED. LOL. ',
' ',
]
end
def pixel x, y, rx, ry, ticks
Pixel.new template[ry][rx], FG, BG
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.