code: function getPositionFromBoard(board, position) {
      try {
          return board[position.y][position.x];
      } catch (e) {
          throw new Error('Error getting position');
      }
  }
docs: Gets board position from x and y coordinates.
  @param board board to get the position.
  @param position desired x,y position.