extracted board UI
refactored game logic