老外写的
while (!alarm.buzzing()) {
developer.sleep();
}
developer.wakeUp();
if (!developer.wife().isAwake()) {
developer.wake(developer.wife());
}
TeaGlass[] glasses = developer.makeTea(2,
Cabinet.getCupboardInstance(), WaterBoiler.getInstance());
Breakfast[] food = new BreakfastWrapper(
developer.makeToast());
tg1 = glasses[0];
tg2 = glasses[1];
developer.put(food, Kitchen.table);
tg1.fill(wb);
tg2.fill(wb);
while (tg1.getColor() != Color.TeaColor) {
tg1.dip(tb);
}
while (tg2.getColor() != Color.TeaColor) {
tg2.dip(tb);
}
if (developer.wife().near()) {
developer.give(tg2, developer.wife());
} else {
developer.put(tg2, Kitchen.table());
}
while (!tg1.empty()) {
try {
developer.sip(tg1);
} catch (TooHotException the) {
developer.say("Ouch!");
developer.wait(15000);
}
if (Shower.free()) {
break;
}
}
developer.shower(Shower.getInstance());
developer.eat(food[0]);
developer.brushTeeth((ToothBrush)
toothbrush.get(developer));
developer.kiss(developer.wife());
developer.bikeToWork();