One of the earliest handheld computer games Amaze-A-Tron was a maze game for 1 or 2 players made by Coleco in the 1970s.
Amaze-A-Tron had a grid of 25 squares arranged 5 x 5 and the computer would select a random start and end point within this grid.
Amaze-A-Tron actually had eight different game variations (Maze, Blind Alley Maze, Back To Start Maze, Blind Alley Back To Start, Solitaire Maze (1 player), Solitaire Back To Start (1 player), Opposite Start and Opposite Start Back To Start) but they all basically involved getting from A to B using "movers" to find the path. Overall there were over a million maze variations. So the chances of memorising your moves from previous games were very slim.
Amaze-A-Tron had two LEDs (red and green) plus a 2-digit LED display for start and finish position numbers. You played Amaze-A-Tron by holding it in the palm of your hand and one it was turned on it would emit electronic sounds including music and a rude "raspberry" noise. There were tones and tunes to pace the game and the different sounds would indicate various turns and scores. The "raspberry" tone means that a move was incorrect or you hadn't moved within the time limit. It also meant that you had set wrong starting or finishing points. A "tick tock" sound indicated that you had a ten second countdown to make your move. If you were successful Amaze-A-Tron played the "Winner's Song".