Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (13 sloc) 290 Bytes
class MockScreen
attr_reader :objects
Object = Struct.new :sprite, :x, :y
def initialize
@objects = []
end
def draw(surface, x, y)
objects << MockScreen::Object.new(surface, x, y)
end
def objects_like(sprite)
objects.select { |o| o.sprite == sprite }
end
end