Tetris like game puzzle

Set some way to ID each block based on its color and since you know exactly the blocks each line has, it’s just a question of applying a simple 2d pattern search to check if the “solution pattern” exists.