Termination

Alan: dan losing == roxors
Alan: while(doesLose(dan)) alan.setMood(“Happy”);
Alan: 🙂
Dan: while (doesLose(dan) && alan.isHappy()) dan.kick(alan);
Dan: 😛
Alan: while(dan.kick(alan)) alan.holdUpObject(“Dan’s Computer”);
Dan: while (alan.isHolding(“Dan’s Computer”)) dan.steal(“Alan’s Computer”);
Alan: while(alan.getComputer.isStolen()) alan.holdHostage(mars);
Dan: !!!!
Dan: grrr you force me to play dirty
Dan: while (mars.isHostage()) dan.burn(“tcgs”);
Alan: while(dan.isBurning(“tcgs”)) alan.steal(dan.getGundamStuff());
Dan: compiler error – method getGundamStuff() does not exist in the dan class – none of it lives at cmu 😛
Alan: hmm
Alan: while(dan.isBurning(“tcgs”)) throw new OutOfObjectError(“Chicken strips, hot dogs, and fries”);
Dan: try { dan.eat(“fast food”); } catch(OutOfObjectError oooe) { dan.cook(“ramen”); }
Alan: if(dan.cook(“ramen”)) throw new OutOfObjectError(“ramen”);
Dan: try { dan.eat(); } catch(OutOfObjectError oooe) { dan.leadDaringCommandoRaidToSecureMars(); }
Alan: while(dan.isLeadingCommandoRaid()) dan = People.AGENT_SMITH;
Dan: System.out.println(“You know, Alan, the good thing about being me is that there are so many mes.”); while (mars.isHostage()) { dan.copy(); }
Alan: you didnt set dan.copy() to anything
Alan: System.gc();
Alan: System.out.println(“Byebye copies”);
Dan: ok fine i’ll make a linked list of dans, keep adding a new one, and then use an iterator to make them attack you 😛
Alan: ill take your linked list and set the head to null
Dan: i’ll set yuor mom to null 😛 then with the root gone, her child node is also garbage collected 😛
Alan: i already nullified dan though
Dan: grrr… um… mars did it while you were busy nulling me!
Alan: hmm
Alan: oh well
Alan: thats ok
Alan: we’re both garbage collected then
Dan: yay! mutual terminatino!
Dan: strange game – the only winning move is not to play

Leave a Reply

Your email address will not be published. Required fields are marked *