class Nonogram
- Nonogram
- Reference
- Object
Included Modules
- Enumerable(Nonogram::Cell)
Defined in:
nonogram.crConstructors
Instance Method Summary
- #[](row : Int32, col : Int32) : Cell
- #[]=(row : Int32, col : Int32, value : Cell)
-
#clone
Returns a copy of
self
with all instance variables cloned. - #col_hints : Array(Array(Int32))
- #cols : Array(Array(Cell))
-
#each(&)
Must yield this collection's elements to the block.
-
#each_with_index(&)
Iterates over the collection, yielding both the elements and their index.
- #height
- #placement_with_indices(placement : Array(Int32), hints : Array(Int32), size : Int32, &)
- #row_hints : Array(Array(Int32))
- #rows : Array(Array(Cell))
- #solve!(complex = true, &) : State
- #solve!(complex = true) : State
- #to_s(io)
- #width
Constructor Detail
Instance Method Detail
def each(&)
#
Description copied from module Enumerable(Nonogram::Cell)
Must yield this collection's elements to the block.
def each_with_index(&)
#
Description copied from module Enumerable(Nonogram::Cell)
Iterates over the collection, yielding both the elements and their index.
["Alice", "Bob"].each_with_index do |user, i|
puts "User ##{i}: #{user}"
end
Prints:
User # 0: Alice
User # 1: Bob
Accepts an optional offset parameter, which tells it to start counting from there. So, a more human friendly version of the previous snippet would be:
["Alice", "Bob"].each_with_index(1) do |user, i|
puts "User ##{i}: #{user}"
end
Which would print:
User # 1: Alice
User # 2: Bob
def placement_with_indices(placement : Array(Int32), hints : Array(Int32), size : Int32, &)
#