In order to get our collision detection going, we needed a gem called texplay. In the discussion in which file to require it, we touched the term interface. It's basically everything the user / coder interacts with, without needing to know how it works under the surface, i.e. without being bothered with implementation details. Erik pulled up a good example by comparing it to a car. In a car, the steering wheel, the pedals and the clutch are the driver's interface. The driver only interacts with those and doesn't care about how the car actually works ("there might be a gerbil running and when the car is not working any more, the gerbil is probably dead and needs to be replaced").
While writing some more tests and methods, we stumbled upon .flatten (also .flat_map, if you want to combine it with .map). It's a method for arrays, that reduces one level of brackets.
Erik took us with him on a notional journey to the olden days, when we were still in school, learning about Mengenlehre / set theory. Who would have believed that those theories would be of use some day?! Now it helped us to understand how we can find overlapping pixels in two images, i.e. the same elements in two arrays.
While writing some more tests and methods, we stumbled upon .flatten (also .flat_map, if you want to combine it with .map). It's a method for arrays, that reduces one level of brackets.
Erik took us with him on a notional journey to the olden days, when we were still in school, learning about Mengenlehre / set theory. Who would have believed that those theories would be of use some day?! Now it helped us to understand how we can find overlapping pixels in two images, i.e. the same elements in two arrays.