Functional gameplay. Needs fine tuning and refactoring.