This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#call this to put it thru its paces | |
def test | |
Solver.new.tap do |s| | |
s.add(:MUSHROOM, :FERN, Potion::POISON); puts "Adding another hint" | |
s.add(:FERN, :TOAD, Potion::SPEED); puts "Adding another hint" | |
s.add(:TOAD, :CLAW, Potion::INSANITY); puts "Adding another hint" | |
s.add(:CLAW, :FLOWER, Potion::SPEED); puts "Adding another hint" | |
s.add(:FLOWER, :ROOT, Potion::WATER); puts "Adding another hint" | |
s.add(:ROOT, :SCORPION, Potion::PARALYSIS); puts "Adding another hint" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LogicBingo | |
attr_accessor :state, :filled_cells_count, :bingo_cells | |
def self.go() self.new.exhaustive_search; end | |
# 0 1 2 3 4 | |
# 0 a1 b1 c1 d1 e1 | |
# 1 a2 b2 c2 d2 e2 | |
# 2 a3 b3 c3 d3 e3 | |
# 3 a4 b4 c4 d4 e4 |