aboutsummaryrefslogtreecommitdiff
path: root/01-hub2.rb
diff options
context:
space:
mode:
authorNat Lasseter <user@4574.co.uk>2024-05-05 13:26:48 +0100
committerNat Lasseter <user@4574.co.uk>2024-05-05 13:26:48 +0100
commit18728ccf1262f3cd1425a8277264d18af73a8a26 (patch)
tree2638206ebc797419420a6015323affa0fd4013fd /01-hub2.rb
parente55e883718d4ef025171d25a3e31c84e3175d6fc (diff)
L1 playable
Diffstat (limited to '01-hub2.rb')
-rw-r--r--01-hub2.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/01-hub2.rb b/01-hub2.rb
index 4ed0f6b..40f54bc 100644
--- a/01-hub2.rb
+++ b/01-hub2.rb
@@ -9,17 +9,20 @@ class L1_Hub2 < Level
def self.target(frame)
case frame.iface
- when 1
- [frame.to(2)]
- when 2
- [frame.to(1)]
+ when ?1
+ [frame.to(?2)]
+ when ?2
+ [frame.to(?1)]
+ else
+ puts "ERR"
+ []
end
end
def self.generate
frames = {}
@@interfaces.each do |iface|
- next if rand < 0.4
+ next if rand < 0.3
frames[@@count.to_s] = Frame.new(iface, "Frame #{@@count}")
@@count += 1
end