A puzzle like that could run into what's called a "printed matter rejection". You can, in theory, patent a series of instructions for a game as an invention. It needs to be "functional" and not simply a design printed on paper (such as a playing surface, which could be copyrighted).
Games like that do "serve a purpose" in the legal sense that they provide entertainment.
it needs to be described in terms that make it "new and non-obvious" over any other game ever used in public or described in any publication in any language anywhere in the world, or any equivalents, and any obvious improvements or combinations of any of those things, in order to be patentable.
35 USC 101, 102, 103