Up, Down, Left, and Right arrow keys to move the rover. Touch the rock (aka sample) to collect it. If you see the rover say "Curiosity has detected a hazard" you are on top of a green shape. If the rover says "Curiosity has detected a hidden hazard" it has detected a red object (aka hidden hazard).
Credits to NASA for the sprites and images and scratch.mid.edu for the rest.