Skip to content

Instantly share code, notes, and snippets.

@pumpkincouture
Created August 15, 2014 00:37
Show Gist options
  • Save pumpkincouture/4f98a989714b391e48e4 to your computer and use it in GitHub Desktop.
Save pumpkincouture/4f98a989714b391e48e4 to your computer and use it in GitHub Desktop.
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