refactor game and board class