Use object-oriented programming methods and pointer structures.
Inspired by childhood when playing snake game on black and white Nokia phones.
press W: Go up.
press D: Go right.
press S: Go down.
press A: Go left.
eatFood(): Eat the "$" to make the snake longer.
hitWall(): Hit the wall and you will die.
isDead(): Snake head biting snake tail is dead.
Use exception catching to determine where the game is lost and the cause of the game loss.