To undo a move in Pyramid, just open the app and tap the game screen background, anywhere beneath the cards. A menu will appear at the bottom and you'll see an "UNDO" button at the very left. If you press "GAME" you'll see the "Replay" button there. Games can only be replayed before they are won or ended.