This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'set' | |
require 'forwardable' | |
# Board is a 9x9 standard sudoku board. This class does not care about what is | |
# stored in each cell of the board, it merely provides indexing and enumeration | |
# methods including accessing rows, columns, or 3x3 sudoku boxes. | |
class Board | |
extend Forwardable | |
# @param data [Array] flat array of 81 initial cell values |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_support/inflector' | |
# Argument parsing | |
# My solution to http://codingdojo.org/kata/Args/ | |
module Args | |
# Error occured during argument parsing. {StandardError#message} should give | |
# a description about the error. | |
class ArgsError < StandardError; end | |
# An argument schema. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'set' | |
require 'forwardable' | |
# Board is a 9x9 standard sudoku board. This class does not care about what is | |
# stored in each cell of the board, it merely provides indexing and enumeration | |
# methods including accessing rows, columns, or 3x3 sudoku boxes. | |
class Board | |
extend Forwardable | |
# @param data [Array] flat array of 81 initial cell values |
NewerOlder