Sha256: 8cdc9dc0e79ae2c61a3d6f8a645b5582b8bff8e0ee3fee5b38d8f34749cb1b0b
Contents?: true
Size: 574 Bytes
Versions: 151
Compression:
Stored size: 574 Bytes
Contents
class Snake module Presenter class Cell COLOR_CLEAR = :white COLOR_SNAKE = :green COLOR_APPLE = :red attr_reader :row, :column, :grid attr_accessor :color def initialize(grid: ,row: ,column: ) @row = row @column = column @grid = grid end def clear self.color = COLOR_CLEAR unless color == COLOR_CLEAR end # inspect is overridden to prevent printing very long stack traces def inspect "#{super[0, 150]}... >" end end end end
Version data entries
151 entries across 151 versions & 2 rubygems