Skip to content

Commit

Permalink
Simplified another function by using #all?.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidEGrayson committed Feb 25, 2012
1 parent f001e34 commit d5f85e1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/doku/puzzle.rb
Expand Up @@ -234,10 +234,9 @@ def self.has_squares(squares)
end

def glyph_assignment_subset?(puzzle)
glyph_state.each_pair do |square, glyph|
return false if puzzle[square] != glyph
glyph_state.all? do |square, glyph|
glyph == puzzle[square]
end
return true
end

def self.define_group(squares)
Expand Down

0 comments on commit d5f85e1

Please sign in to comment.