class Petli::Rooms::Main
Public Instance Methods
actions()
click to toggle source
# File lib/petli/rooms/main.rb, line 4 def actions acts = %w(play feed) acts << "clean" if @pet.poops.count > 0 acts end
keypress(event)
click to toggle source
# File lib/petli/rooms/main.rb, line 10 def keypress(event) return goto("feed") if event.value == "f" return @pet.clean if event.value == "c" return goto("play") if event.value == "p" end