Sha256: 6872b4a96f3e8d169a33d6a52e0db5cc9b27fa6cb9dfa8d67cdc0147dd1b570c
Contents?: true
Size: 366 Bytes
Versions: 2
Compression:
Stored size: 366 Bytes
Contents
require_relative 'container' class Box < Container attr_accessor :box, :position def initialize(arr, y=0, x=0) super(arr) Struct.new("Coordinate", :x, :y) if !Struct::const_defined? "Coordinate" @position = Struct::Coordinate.new(x, y) end def blank_spaces [(position.y / 3) * 3 + (position.x / 3), position.y, position.x] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sudoku-jedi-1.0.0 | lib/sudoku_solver/box.rb |
sudoku-jedi-0.0.4 | lib/sudoku_solver/box.rb |