Sha256: 35a2960b125b46e3144aed62b8492d67c6215052e7ce1ed043cfcb32866f9c3e
Contents?: true
Size: 304 Bytes
Versions: 2
Compression:
Stored size: 304 Bytes
Contents
module Lifegame class Life def initialize(life = false) @life = life end def to_s alive? ? '.' : '-' end def alive? @life end def dead? not alive? end def die! @life = false end def be! @life = true end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lifegame-0.1.1 | lib/lifegame/life.rb |
lifegame-0.1.0 | lib/lifegame/life.rb |