String raceType = getParameter("type");
for (int i = 0; i < NUMRUNNERS; i++) {
runners[i] = new Runner();
if (raceType.compareTo("unfair") == 0)
runners[i].setPriority(i+2);
else
runners[i].setPriority(2);
}
if (updateThread == null) {
updateThread = new Thread(this, "Thread Race");
updateThread.setPriority(NUMRUNNERS+2);
}
addMouseListener(new MyAdapter());
setContentPane(new AppletContentPane());