Method: AxialHex#to_hash

Defined in:
lib/hex/axial_hex.rb

#to_hashHash

Return an hex as a hash object

Returns:

  • (Hash)

    the hex as a hash object



143
144
145
# File 'lib/hex/axial_hex.rb', line 143

def to_hash
  { q: @q, r: @r, color: @color, border: @border, data: @data.to_hash }
end