pattern matching game