Sha256: e1ca4497c8e6b3c4b896e615e5f8481403c98784c0d8d53edf74463162bf6ee1
Contents?: true
Size: 566 Bytes
Versions: 1
Compression:
Stored size: 566 Bytes
Contents
require_relative './coordinate' module Gameboard class Cell # Public: Returns the value of the Cell instance. attr_accessor :val # Public: Retuns the Coordinate of the Cell instance. Returns type # Gameboard::Coordinate. attr_reader :coord # Public: Initialize the Cell. # # coord - A Coordinate class instance at postition X,Y. # value - The cell's value. # def initialize(coord: false, val: false) raise TypeError unless coord.is_a?(Coordinate) @val = val @coord = coord end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gameboard-4.0.0 | lib/gameboard/cell.rb |