coding for memory game