Class: Elus::Turn3Generator
- Defined in:
- lib/elus/generator.rb
Instance Method Summary collapse
Methods inherited from Generator
Instance Method Details
#generate_rules ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/elus/generator.rb', line 38 def generate_rules conditions = permutate('1') yes_branches = permutate no_branches = permutate conditions.product(yes_branches, no_branches).map do|condition, yes, no| Rule.new(Piece.create(condition), Piece.create(yes), Piece.create(no)) end end |