struct Goban::Canvas(T)
- Goban::Canvas(T)
- Struct
- Value
- Object
Overview
Data type representing 2D canvas symbol.
Included Modules
- Indexable::Mutable(T)
Defined in:
goban/canvas.crConstructors
- .new(size_x : Int32, size_y : Int32, data : Slice(T))
- .new(size_x : Int32, size_y : Int32, value : T)
Instance Method Summary
- #[](x : Int, y : Int)
- #[]=(x : Int, y : Int, w : Int, h : Int, value : UInt8)
- #[]=(x : Int, y : Int, value : UInt8)
- #[]?(x : Int, y : Int)
- #clone
- #data : Slice(T)
- #each_column(& : Iterator(UInt8), Int32 -> )
- #each_row(& : Iterator(UInt8), Int32 -> )
-
#print_to_console
Prints the modules on the canvas as a text in the console.
-
#size
Returns the number of elements in this container.
- #size(*args, **options)
- #size(*args, **options, &)
- #size_x : Int32
- #size_y : Int32
- #unsafe_fetch(*args, **options)
- #unsafe_fetch(*args, **options, &)
- #unsafe_put(*args, **options)
- #unsafe_put(*args, **options, &)
Constructor Detail
Instance Method Detail
def size
#
Description copied from module Indexable(T)
Returns the number of elements in this container.