Skip to content

Commit

Permalink
applied sugestion on rubocop/rubocop#7886 for rubocop exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
gdumani committed Aug 15, 2020
1 parent f1d3beb commit fcbcdfc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/board.rb
Expand Up @@ -34,13 +34,15 @@ def display
private

# rubocop:disable Metrics/CyclomaticComplexity

def winner(test)
trans = test.transpose
(0...test.size).collect { |i| test[i][i] }.uniq.count == 1 ||
(0...test.size).collect { |i| test[test.size - i - 1][i] }.uniq.count == 1 ||
test.map { |x| x.uniq.count }.include?(1) ||
trans.map { |x| x.uniq.count }.include?(1)
end

# rubocop:enable Metrics/CyclomaticComplexity

def invalid_input(loc)
Expand Down

0 comments on commit fcbcdfc

Please sign in to comment.