private void set_board(GameState position, int index, int piece_type) {

    // Do not allow rabbits in the goal
    if (index >= 0 && index <= 7) {
      if (piece_type == 1) {
        return;
      }
    }
    if (index >= 56 && index <= 63) {
      if (piece_type == 0) {
        return;
      }
    }

    position.setPieceType(index, piece_type);
  }