class Hanoi::Jane::PaddedStacks
Public Class Methods
new(stacks, height = 7)
click to toggle source
# File lib/hanoi/jane/animation/padded_stacks.rb, line 4 def initialize stacks, height = 7 stacks.clone.each do |s| self.push PaddedStacks.pad s.clone, height end end
pad(stack, height)
click to toggle source
# File lib/hanoi/jane/animation/padded_stacks.rb, line 10 def PaddedStacks.pad stack, height stack + Array.new(height - stack.length) end