All ghosts kill you. You only have one life. Use arrow keys or WASD to move.
Thanks to EOTNT9901 for helping with the code.