Cool puzzle concept! Honestly was pretty difficult to figure out at first but that was part of the fun. A bit more feedback when waiting a turn would be nice, in order to make it a bit more obvious when you pressed space bar.
Overall, would love to see how this game expands with the story you've mentioned, awesome job!