Sha256: 7ad839d3173afc6644c2231c6a68bfbb98003ae629aaa7f5e303ed1edfb71823
Contents?: true
Size: 285 Bytes
Versions: 5
Compression:
Stored size: 285 Bytes
Contents
module Gameboard class Coordinate attr_reader :position, :x, :y def initialize(x,y) invalid_type = "Coordinates must be integers!" raise invalid_type unless (x.is_a?(Integer) && y.is_a?(Integer)) @position = [x,y] @x = x @y = y end end end
Version data entries
5 entries across 5 versions & 1 rubygems