mirror of https://github.com/E-Almqvist/hsf
parent
6cb23fa9a3
commit
47ee07d1e0
@ -0,0 +1,13 @@ |
||||
class Monster |
||||
attr_accessor :name, :current_hp, :max_hp |
||||
|
||||
def initialize(name, max_hp) |
||||
@name = name |
||||
@max_hp = max_hp |
||||
@current_hp = max_hp |
||||
end |
||||
|
||||
def alive? |
||||
@current_hp > 0 |
||||
end |
||||
end |
Loading…
Reference in new issue