Sha256: 518959c7014d8950dbc8a4a0709f0823e14b769f580288663939a4b3db3c6382
Contents?: true
Size: 574 Bytes
Versions: 5
Compression:
Stored size: 574 Bytes
Contents
require_relative './coordinate' module Gameboard class Cell # Public: Returns the value of the Cell instance. attr_accessor :value # 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, value: false) raise TypeError unless coord.is_a?(Coordinate) @value = value @coord = coord end end end
Version data entries
5 entries across 5 versions & 1 rubygems