private static GameTypeCommand GetGameTypeAndLoadEquip() { ConnectionUtil connection = new ConnectionUtil(); Task <GameTypeCommand> task = connection.ConnectAsync(ip, port); GameTypeCommand gameTypeCommand = task.Result; LoadEquip(connection.COMMUNICATION); return(gameTypeCommand); }
/// <summary> /// Connect unconnected robot. /// </summary> /// <param name="ip"></param> /// <param name="port"></param> /// <returns></returns> private void Connect(String ip, int port) { if (!connected) { ConnectionUtil connection = new ConnectionUtil(); connection.ConnectAsync(ip, port).Wait(); sns = connection.COMMUNICATION; this.connected = true; InitAsync(NAME, ROBOT_TEAM_NAME).Wait(); } }