// Path: src/fr/xtof54/jsgo/EventManager.java
// enum eventType {loginStarted, loginEnd, downloadListStarted, downloadListEnd, downloadListGamesEnd, downloadGameStarted, downloadGameEnd, GameOK, moveSentStart, moveSentEnd, gobanReady,
// 	msgSendStart, msgSendEnd, ladderStart, ladderEnd, ladderChallengeStart, ladderChallengeEnd, showMessage, copyEidogoStart, copyEidogoEnd};


import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Calendar;
import fr.xtof54.jsgo.EventManager.eventType;
					if (j<0) {
						k=0; break;
					}
					k=s.indexOf("</tr",j);
					if (k<0) {
						// there is the beginning but not the end
						firsthalf=s.substring(j);
						break;
					} else {
						treatLine(s.substring(j, k));
					}
					i=k;
				}
				if (k==0) {
					// no beginning in the current string; we can start over with the next s
				} else if (k<0) {
					// only the first half; we have to complete
				}
			}
			f.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
		userList = new String[reslist.size()];
		reslist.toArray(userList);
        ridList  = new String[reslist.size()];
        rids.toArray(ridList);
        saveList();
		System.out.println("end ladder to array: "+ridList.length+" "+userList.length);
		if (userList.length==0) {
// Path: src/fr/xtof54/jsgo/EventManager.java
// enum eventType {loginStarted, loginEnd, downloadListStarted, downloadListEnd, downloadListGamesEnd, downloadGameStarted, downloadGameEnd, GameOK, moveSentStart, moveSentEnd, gobanReady,
// 	msgSendStart, msgSendEnd, ladderStart, ladderEnd, ladderChallengeStart, ladderChallengeEnd, showMessage, copyEidogoStart, copyEidogoEnd};


// Path: src/fr/xtof54/jsgo/Ladder.java
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Calendar;
import fr.xtof54.jsgo.EventManager.eventType;

					if (j<0) {
						k=0; break;
					}
					k=s.indexOf("</tr",j);
					if (k<0) {
						// there is the beginning but not the end
						firsthalf=s.substring(j);
						break;
					} else {
						treatLine(s.substring(j, k));
					}
					i=k;
				}
				if (k==0) {
					// no beginning in the current string; we can start over with the next s
				} else if (k<0) {
					// only the first half; we have to complete
				}
			}
			f.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
		userList = new String[reslist.size()];
		reslist.toArray(userList);
        ridList  = new String[reslist.size()];
        rids.toArray(ridList);
        saveList();
		System.out.println("end ladder to array: "+ridList.length+" "+userList.length);
		if (userList.length==0) {
			EventManager.getEventManager().sendEvent(eventType.showMessage, "you cannot challenge anymore in this ladder");