refactored board.rb and game.rb