Sha256: aa7818e4ee0111489592ee1a37091138febd4b257270023a6956c5e45cae2b0e
Contents?: true
Size: 301 Bytes
Versions: 2
Compression:
Stored size: 301 Bytes
Contents
#!/usr/bin/env ruby require_relative '../lib/hanoi_tower' ring_count = (ARGV[0] || 6).to_i wait_time = (ARGV[1] || 1.0).to_f game = HanoiTower::Game.new(ring_count) game.print loop { game.next puts "\e[H\e[2J" game.print if game.done? puts 'done!' break end sleep wait_time }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hanoi_tower-0.1.1 | exe/hanoi_tower |
hanoi_tower-0.1.0 | exe/towers_of_hanoi |