Refactored board.rb