Basic level controller + win and lose conditions

Implemented a basic level controller that checks for winning and losing
conditions.