class Text2048::Tile
2048 tile
Attributes
status[R]
value[R]
Public Class Methods
new(value, status = nil)
click to toggle source
# File lib/text2048/tile.rb, line 14 def initialize(value, status = nil) @value = value @status = status end
Public Instance Methods
==(other)
click to toggle source
# File lib/text2048/tile.rb, line 28 def ==(other) @value.to_i == other.to_i end
clear_status()
click to toggle source
# File lib/text2048/tile.rb, line 19 def clear_status @status = nil self end
merged?()
click to toggle source
# File lib/text2048/tile.rb, line 24 def merged? @status == :merged end