how to make this puzzle

Hello, I want to make a puzzle based on this video, but there is something missing in the video.
When all the squares are lit, that is, when the puzzle is solved, how can I check that the puzzle is solved?