refactored state logic a bit
decoupled view and state logic
Merge branch 'master' of https://github.com/robatte/Hex