Sha256: 74e3471a391cc6091f1f794349b75d34ace32c95b2b2bcdbab43e21e57d04814

Contents?: true

Size: 451 Bytes

Versions: 1

Compression:

Stored size: 451 Bytes

Contents

module TTT
  class Square
    attr_accessor :value, :display_value

    def initialize(args)
      @value = args[:value]
      @display_value = args[:display_value]
    end

    def change_value(new_value)
      self.value = new_value
      self.display_value = new_value
    end

    def empty?
      return true unless full?
    end

    def full?
      if value != nil
        return true
      else
        return false
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
games_bfox-0.4.0 lib/games/tictactoe/square.rb