   doWelcome();  
   
   // Find other player
-  rival_id = findPlayer();
+  findPlayer();
 }
 
 

// Rival board id
String rival_id = "0";
// Who starts playing: 0 the player, 1 the rival.
char start_turn = '2';

// Current turn
int turn = 0;

  sendMsg(MSG_REGISTER + player_id + END_CHAR);
}

void findPlayer(){
  boolean notFound = true;
  while(notFound){
    String res = sendAndWait(MSG_FIND_GAME + player_id + END_CHAR);
    String command = getCommand(res);
    
    // if waiting_for_player -> delay 100
    // if not_registered -> register
    // if rival -> set start_turn, set rival_id, notFound = false
    if (command == CMD_WAIT_FOR_RIVAL){
      delay(1000);
    } else if (command == CMD_NOT_REGISTERED){ // This shouldn't happen
      registerPlayer();
    } else if (command == CMD_RIVAL){
      String parameters = getParameters(res);
      rival_id = getParameter(parameters, 1);
      start_turn = getParameter(parameters, 2);
      notFound = false;
    }
  }
}

int getMove(){
