class AdventOfCode2021::Day23::Room

Defined in:

day23/day23.cr

Constant Summary

DEFAULT_SIZE = 2
OTHER_SIZE = 4

Constructors

Instance Method Summary

Constructor Detail

def self.new(type : UInt8, amphipodas : Array(UInt8) = Array(UInt8).new(DEFAULT_SIZE)) #

[View source]
def self.new(size : Int32, type : UInt8, amphipodas : Array(UInt8) = Array(UInt8).new(@size)) #

[View source]

Instance Method Detail

def amphipodas : Array(UInt8) #

[View source]
def can_pop? : Bool #

[View source]
def can_push?(amp : UInt8) : Bool #

[View source]
def clone #

[View source]
def pop : Tuple(UInt8, Int32) | Nil #

[View source]
def push(amp : UInt8) : Int32 | Nil #

Returns the number of steps


[View source]
def size : Int32 #

[View source]
def solved? : Bool #

[View source]
def type : UInt8 #

[View source]