Download

[N00B] Logic Patterns Puzzle - how to evaluate "Wrong or Right"

Hi there.

Well, that’s my first question in this forum, about the first project I’m working through. I have this little puzzle game where the player is presented to a sequence and needs to discover the pattern behind.

So, I’m getting some trouble implementing the core mechanic.

two things:

  1. a list of patterns (like “if there is a red, the next is yellow; if there is a yellow, the next is green, etc”) is stored somewhere. Then, in the start of the level the program needs to pick one of them, randomly. How to do it?

  2. The player is presented with a little sequence, and have a “hand” of pieces, from which he needs to pick one to present. The game then needs to evaluate the piece presented against the sequence that is there, to see if the piece is “wrong” or “right”. That is the core of it, and I can’t see just how to implement it.

Can someone help me?

Thanks

Lênon Kramer