For better understanding and before diving into the solution, please watch this YouTube Video first
https://www.youtube.com/watch?v=zPnN046OM34
P.S: I know I could have hardcoded all 8 possible patterns, but I thought using reflections and rotations is better for myself as reminder to how I can generate all possible patterns.