Created
August 15, 2014 00:37
-
-
Save pumpkincouture/4f98a989714b391e48e4 to your computer and use it in GitHub Desktop.
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
def delete_from_array(cells) | |
human_spaces = human_location(cells) | |
human_spaces.map!(&:to_i) | |
@comp_winning_combos.each do |sub_array| | |
intersect = sub_array & human_spaces | |
if intersect.any? | |
difference = sub_array - human_spaces | |
sub_array.clear | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment