duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
| require 'set' | |
| class Subway | |
| attr_reader :stops | |
| def initialize(lines) | |
| @stops = {} | |
| lines.each_pair {|line, stops| | |
| stops.each do |stop| |
Couldn't find the text of this for a while...
| trap("SIGINT") { exit! } | |
| total_width = `stty size`.scan(/\d+/)[1].to_i # terminal width | |
| snokflakes = {} | |
| puts "\033[2J"; # clearing output | |
| loop do | |
| snokflakes[rand(total_width)] = 0 |