class

Nonogram

Inherits Enumerable < Reference < Object

Constructors

new(row_hints : Array(Array(Int32)), col_hints : Array(Array(Int32)))
Source

Instance methods

[](row : Int32, col : Int32) : Cell
Source
[]=(row : Int32, col : Int32, value : Cell)
Source
clone

Returns a copy of self with all instance variables cloned.

Source
col_hints
Source
cols
Source
each

Must yield this collection's elements to the block.

Source
each_with_index

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
Source
height
Source
placement_with_indices(placement : Array(Int32), hints : Array(Int32), size : Int32, &)
Source
row_hints
Source
rows
Source
solve!(complex = true, &) : State
Source
solve!(complex = true) : State
Source
to_s(io)
Source
width
Source

Nested types