// This Java file was automatically generated by ToonTalk for Feb 21c import ap.toontalk.*; // Robot36_589883: MakeExamplestop class Robot36_589883 extends TTRobot { Robot36_589883(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; // pick up what's in the third hole inside his box hand = given.pickUp(2); // give it to the bird in the second hole inside his box given.hole(1).gets(hand); // move to the stack of bombs temp1 = TT.BOMB; // pick up a bomb hand = temp1; // use it throw new TTBombExplosion(); // bomb set off } } // Robot35_3927187539: MakeExampleWorker class Robot35_3927187539 extends TTRobot { Robot35_3927187539(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; TTObject temp2; TTObject temp3; TTObject temp4; TTObject temp5; TTObject temp6; TTObject temp7; TTObject temp8; TTObject temp9; TTObject temp10; TTObject temp11; TTObject temp12; TTObject temp13; TTObject temp14; // pick up what's in the first hole inside his box hand = given.pickUp(0); // push Backspace key to change what he is holding temp1 = hand.keyboard('\b', false); hand.stoppedTyping(); // drop it on the first hole inside his box given.holeGets(0, hand); // move to the stack of boxes temp2 = new TTBox(1); // pick up a box hand = temp2; // push '2' to change what he is holding hand.keyboard('2', false); hand.stoppedTyping(); // drop it temp2 = hand; // pick up what's in the first hole inside the newest box hand = temp1.pickUp(0); // drop it on the main notebook notebook.gets(hand); // pick up what's on the right page of the main notebook temp3 = notebook.pickUp(1); hand = temp3; // drop it on the first hole inside the newest box temp2.holeGets(0, hand); // move to the stack of nests temp4 = new TTNest(); // pick up a nest hand = temp4; temp5 = new TTBird(); temp5.setNest(hand); // drop it temp4 = hand; // pick up the new bird hand = temp5; // drop it on the second hole inside the newest box temp2.holeGets(1, hand); // move to the stack of trucks temp6 = new TTTruck(this); // pick up a truck hand = temp6; // drop it temp6 = hand; // pick up the newest box hand = temp2; // drop it into the truck which is the new truck temp6.gets(hand); // move to the stack of text temp7 = new TTText("A"); // pick up a text hand = temp7; // push Backspace key to change what he is holding hand.keyboard('\b', false); // push 'p' to change what he is holding hand.keyboard('p', false); // push 'i' to change what he is holding hand.keyboard('i', false); // push 'c' to change what he is holding hand.keyboard('c', false); // push 'k' to change what he is holding hand.keyboard('k', false); // push Enter to change what he is holding hand.keyboard('\r', false); // push 'o' to change what he is holding hand.keyboard('o', false); // push 'n' to change what he is holding hand.keyboard('n', false); // push 'e' to change what he is holding hand.keyboard('e', false); hand.stoppedTyping(); // drop it on the main notebook notebook.gets(hand); // pick up what's on the right page of the main notebook temp8 = notebook.pickUp(1); hand = temp8; // drop it into the truck which is the new truck temp6.gets(hand); // move to the stack of boxes temp9 = new TTBox(1); // pick up a box hand = temp9; // push '2' to change what he is holding hand.keyboard('2', false); hand.stoppedTyping(); // drop it temp9 = hand; // pick up the new nest hand = temp4; // drop it on the first hole inside the newest box temp9.holeGets(0, hand); // move to the stack of nests temp10 = new TTNest(); // pick up a nest hand = temp10; temp11 = new TTBird(); temp11.setNest(hand); // drop it on the first hole inside the newest box temp1.holeGets(0, hand); // pick up the newest bird hand = temp11; // drop it on the second hole inside the newest box temp9.holeGets(1, hand); // move to the stack of trucks temp12 = new TTTruck(this); // pick up a truck hand = temp12; // drop it temp12 = hand; // pick up the newest box hand = temp9; // drop it into the truck which is the newest truck temp12.gets(hand); // move to the stack of text temp13 = new TTText("A"); // pick up a text hand = temp13; // push Backspace key to change what he is holding hand.keyboard('\b', false); // push 'm' to change what he is holding hand.keyboard('m', false); // push 'a' to change what he is holding hand.keyboard('a', false); // push 'k' to change what he is holding hand.keyboard('k', false); // push 'e' to change what he is holding hand.keyboard('e', false); // push Enter to change what he is holding hand.keyboard('\r', false); // push 'e' to change what he is holding hand.keyboard('e', false); // push 'x' to change what he is holding hand.keyboard('x', false); // push 'a' to change what he is holding hand.keyboard('a', false); // push 'm' to change what he is holding hand.keyboard('m', false); // push 'p' to change what he is holding hand.keyboard('p', false); // push 'l' to change what he is holding hand.keyboard('l', false); // push 'e' to change what he is holding hand.keyboard('e', false); hand.stoppedTyping(); // drop it on the main notebook notebook.gets(hand); // pick up what's on the right page of the main notebook temp14 = notebook.pickUp(1); hand = temp14; // drop it into the truck which is the newest truck temp12.gets(hand); // pick up what's in the third hole inside his box hand = given.pickUp(2); // drop it just right of the newest box temp1.sideGets(hand, true); // pick up the newest box hand = temp1; // drop it on the third hole inside his box given.holeGets(2, hand); notebook.setPageNumber(1); // restore main notebook return this; // This robot has finished and will give the box to the first robot to try again. } } // Robot34_2656239702: MakeExampleStart box class Robot34_2656239702 extends TTRobot { Robot34_2656239702(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; TTObject temp2; // move to the stack of boxes temp1 = new TTBox(1); // pick up a box hand = temp1; // push '0' to change what he is holding temp2 = hand.keyboard('0', false); hand.stoppedTyping(); // drop it on the first hole inside the newest box temp2.holeGets(0, hand); // pick up the newest box hand = temp2; // drop it just right of his box given.sideGets(hand, true); return this; // This robot has finished and will give the box to the first robot to try again. } } // Robot33_589878: MakeExampleStart text class Robot33_589878 extends TTRobot { Robot33_589878(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; // pick up what's in the first hole inside his box hand = given.pickUp(0); // give it to the bird in the second hole inside his box given.hole(1).gets(hand); // move to the stack of bombs temp1 = TT.BOMB; // pick up a bomb hand = temp1; // use it throw new TTBombExplosion(); // bomb set off } } // Robot99_632864822: PickOne class Robot99_632864822 extends TTRobot { Robot99_632864822(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; TTObject temp2; TTObject temp3; TTObject temp4; TTObject temp5; TTObject temp6; TTObject temp7; // move to the stack of numbers temp1 = new TTNumber(1); // pick up a number hand = temp1; // drop it temp1 = hand; // grab a copy of Dusty TTVacuum vacuum = new TTVacuum(); hand = vacuum; // push 'e' to change what he is holding hand.keyboard('e', false); hand.stoppedTyping(); // use Dusty to vacuum the new number vacuum.suckUp(temp1); // release Dusty // pick up what's in the first hole inside his box hand = given.pickUp(0); // drop it on the new number temp2 = temp1.gets(hand); // move to the stack of text temp3 = new TTText("A"); // pick up a text hand = temp3; // push Backspace key to change what he is holding hand.keyboard('\b', false); // push 'R' to change what he is holding hand.keyboard('R', false); // push 'a' to change what he is holding hand.keyboard('a', false); // push 'n' to change what he is holding hand.keyboard('n', false); // push 'd' to change what he is holding hand.keyboard('d', false); // push 'o' to change what he is holding hand.keyboard('o', false); // push 'm' to change what he is holding hand.keyboard('m', false); hand.stoppedTyping(); // drop it on the main notebook notebook.gets(hand); // move to the stack of numbers temp4 = new TTNumber(1); // pick up a number hand = temp4; // push '0' to change what he is holding hand.keyboard('0', true); hand.stoppedTyping(); // drop it temp4 = hand; // pick up what's on the right page of the main notebook temp5 = notebook.pickUp(1); hand = temp5; // drop it on the newest number temp5 = temp4.gets(hand); // pick up the new box hand = temp2; // drop it temp2 = hand; // pick up the newest number hand = temp1; // push '%' to change what he is holding hand.keyboard('%', true); hand.stoppedTyping(); // drop it on the newest number temp4.gets(hand); // pick up the new box hand = temp2; // drop it on the newest number temp6 = temp4.gets(hand); // pick up what's in the first hole inside the newest box hand = temp6.pickUp(0); // give it to the bird in the second hole inside his box given.hole(1).gets(hand); // move to the stack of bombs temp7 = TT.BOMB; // pick up a bomb hand = temp7; // use it throw new TTBombExplosion(); // bomb set off } } // Robot42_589877: Gi class Robot42_589877 extends TTRobot { Robot42_589877(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; // pick up what's in the third hole inside his box hand = given.pickUp(2); // give it to the bird in the second hole inside his box given.hole(1).gets(hand); // move to the stack of bombs temp1 = TT.BOMB; // pick up a bomb hand = temp1; // use it throw new TTBombExplosion(); // bomb set off } } // Robot41_1155633194: Fi class Robot41_1155633194 extends TTRobot { Robot41_1155633194(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; // pick up his box hand = given; // push Backspace key while pointing to his box temp1 = given.keyboard('\b', false); given.stoppedTyping(); // drop it // pick up what's in the third hole inside his box hand = given.pickUp(2); // drop it just right of the new box temp1.sideGets(hand, true); // pick up the new box hand = temp1; // drop it on the third hole inside his box given.holeGets(2, hand); return this; // This robot has finished and will give the box to the first robot to try again. } } // Robot40_1157529677: Di class Robot40_1157529677 extends TTRobot { Robot40_1157529677(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; // pick up what's in the first hole inside his box hand = given.pickUp(0); // push Backspace key to change what he is holding temp1 = hand.keyboard('\b', false); hand.stoppedTyping(); // drop it on the first hole inside his box given.holeGets(0, hand); // pick up the new box hand = temp1; // drop it just right of his box given.sideGets(hand, true); return this; // This robot has finished and will give the box to the first robot to try again. } } // Robot39_2656239699: Ci class Robot39_2656239699 extends TTRobot { Robot39_2656239699(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; TTObject temp2; // move to the stack of boxes temp1 = new TTBox(1); // pick up a box hand = temp1; // push '0' to change what he is holding temp2 = hand.keyboard('0', false); hand.stoppedTyping(); // drop it on the first hole inside the newest box temp2.holeGets(0, hand); // pick up the newest box hand = temp2; // drop it just right of his box given.sideGets(hand, true); return this; // This robot has finished and will give the box to the first robot to try again. } } // Robot38_251424825: Bi class Robot38_251424825 extends TTRobot { Robot38_251424825(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; TTObject temp2; TTObject temp3; TTObject temp4; TTObject temp5; TTObject temp6; TTObject temp7; TTObject temp8; TTObject temp9; TTObject temp10; TTObject temp11; TTObject temp12; TTObject temp13; // move to the stack of boxes temp1 = new TTBox(1); // pick up a box hand = temp1; // push '2' to change what he is holding hand.keyboard('2', false); hand.stoppedTyping(); // drop it temp1 = hand; // pick up what's in the fourth hole inside his box hand = given.pickUp(3); // drop it on the first hole inside the new box temp1.holeGets(0, hand); // move to the stack of nests temp2 = new TTNest(); // pick up a nest hand = temp2; temp3 = new TTBird(); temp3.setNest(hand); // drop it temp2 = hand; // pick up the new bird hand = temp3; // drop it on the second hole inside the new box temp1.holeGets(1, hand); // move to the stack of trucks temp4 = new TTTruck(this); // pick up a truck hand = temp4; // drop it temp4 = hand; // pick up the new box hand = temp1; // drop it into the truck which is the new truck temp4.gets(hand); // move to the stack of text temp5 = new TTText("A"); // pick up a text hand = temp5; // push Backspace key to change what he is holding hand.keyboard('\b', false); // push 'f' to change what he is holding hand.keyboard('f', false); // push 'l' to change what he is holding hand.keyboard('l', false); // push 'a' to change what he is holding hand.keyboard('a', false); // push 't' to change what he is holding hand.keyboard('t', false); // push 't' to change what he is holding hand.keyboard('t', false); // push 'e' to change what he is holding hand.keyboard('e', false); // push 'n' to change what he is holding hand.keyboard('n', false); hand.stoppedTyping(); // drop it on the main notebook notebook.gets(hand); // pick up what's on the right page of the main notebook temp6 = notebook.pickUp(1); hand = temp6; // drop it into the truck which is the new truck temp4.gets(hand); // move to the stack of boxes temp7 = new TTBox(1); // pick up a box hand = temp7; // push '3' to change what he is holding hand.keyboard('3', false); hand.stoppedTyping(); // drop it temp7 = hand; // pick up the new nest hand = temp2; // drop it on the first hole inside the newest box temp7.holeGets(0, hand); // pick up what's in the third hole inside his box hand = given.pickUp(2); // drop it on the second hole inside the newest box temp7.holeGets(1, hand); // move to the stack of nests temp8 = new TTNest(); // pick up a nest hand = temp8; temp9 = new TTBird(); temp9.setNest(hand); // drop it on the third hole inside his box given.holeGets(2, hand); // pick up the newest bird hand = temp9; // drop it on the third hole inside the newest box temp7.holeGets(2, hand); // move to the stack of trucks temp10 = new TTTruck(this); // pick up a truck hand = temp10; // drop it temp10 = hand; // pick up the newest box hand = temp7; // drop it into the truck which is the newest truck temp10.gets(hand); // move to the stack of text temp11 = new TTText("A"); // pick up a text hand = temp11; // push Backspace key to change what he is holding hand.keyboard('\b', false); // push 'j' to change what he is holding hand.keyboard('j', false); // push 'o' to change what he is holding hand.keyboard('o', false); // push 'i' to change what he is holding hand.keyboard('i', false); // push 'n' to change what he is holding hand.keyboard('n', false); hand.stoppedTyping(); // drop it on the main notebook notebook.gets(hand); // pick up what's on the right page of the main notebook temp12 = notebook.pickUp(1); hand = temp12; // drop it into the truck which is the newest truck temp10.gets(hand); // pick up his box hand = given; // push Backspace key while pointing to his box temp13 = given.keyboard('\b', false); given.stoppedTyping(); // drop it // grab a copy of Dusty TTVacuum vacuum = new TTVacuum(); hand = vacuum; // use Dusty to vacuum the newest box vacuum.suckUp(temp13); // release Dusty notebook.setPageNumber(1); // restore main notebook return this; // This robot has finished and will give the box to the first robot to try again. } } // Robot43_3969057: Join class Robot43_3969057 extends TTRobot { Robot43_3969057(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; TTObject temp2; // pick up what's in the first hole inside his box hand = given.pickUp(0); // drop it temp1 = hand; // pick up what's in the second hole inside his box hand = given.pickUp(1); // drop it just right of the first thing he made or found temp1.sideGets(hand, true); // pick up the first thing he made or found hand = temp1; // give it to the bird in the third hole inside his box given.hole(2).gets(hand); // move to the stack of bombs temp2 = TT.BOMB; // pick up a bomb hand = temp2; // use it throw new TTBombExplosion(); // bomb set off } } // Robot30812_2955313157: Lots ofSentences class Robot30812_2955313157 extends TTRobot { Robot30812_2955313157(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; TTObject temp2; TTObject temp3; TTObject temp4; TTObject temp5; TTObject temp6; TTObject temp7; TTObject temp8; TTObject temp9; TTObject temp10; TTObject temp11; TTObject temp12; TTObject temp13; TTObject temp14; TTObject temp15; TTObject temp16; TTObject temp17; TTObject temp18; TTObject temp19; // move to the stack of boxes temp1 = new TTBox(1); // pick up a box hand = temp1; // push '2' to change what he is holding hand.keyboard('2', false); hand.stoppedTyping(); // drop it temp1 = hand; // grab a magic wand TTCopier copier = new TTCopier(); hand = copier; // use the magic wand on the first hole inside his box hand = copier.applyTo(given.hole(0), this); // drop what he just copied on the second hole inside the new box temp1.holeGets(1, hand); // release the magic wand // move to the stack of nests temp3 = new TTNest(); // pick up a nest hand = temp3; temp4 = new TTBird(); temp4.setNest(hand); // drop it on the first hole inside the new box temp1.holeGets(0, hand); // move to the stack of trucks temp5 = new TTTruck(this); // pick up a truck hand = temp5; // drop it temp5 = hand; // pick up the new box hand = temp1; // drop it into the truck which is the new truck temp5.gets(hand); // move to the stack of text temp6 = new TTText("A"); // pick up a text hand = temp6; // push Backspace key to change what he is holding hand.keyboard('\b', false); // push 'B' to change what he is holding hand.keyboard('B', false); // push 'o' to change what he is holding hand.keyboard('o', false); // push 'x' to change what he is holding hand.keyboard('x', false); // push Enter to change what he is holding hand.keyboard('\r', false); // push 't' to change what he is holding hand.keyboard('t', false); // push 'o' to change what he is holding hand.keyboard('o', false); // push Enter to change what he is holding hand.keyboard('\r', false); // push 'T' to change what he is holding hand.keyboard('T', false); // push 'e' to change what he is holding hand.keyboard('e', false); // push 'x' to change what he is holding hand.keyboard('x', false); // push 't' to change what he is holding hand.keyboard('t', false); hand.stoppedTyping(); // drop it on the main notebook notebook.gets(hand); // pick up what's on the right page of the main notebook temp7 = notebook.pickUp(1); hand = temp7; // drop it into the truck which is the new truck temp5.gets(hand); // move to the stack of boxes temp8 = new TTBox(1); // pick up a box hand = temp8; // push '2' to change what he is holding hand.keyboard('2', false); hand.stoppedTyping(); // drop it temp8 = hand; // pick up the new bird hand = temp4; // drop it on the second hole inside the newest box temp8.holeGets(1, hand); // move to the stack of nests temp9 = new TTNest(); // pick up a nest hand = temp9; temp10 = new TTBird(); temp10.setNest(hand); // drop it on the first hole inside the newest box temp8.holeGets(0, hand); // move to the stack of trucks temp11 = new TTTruck(this); // pick up a truck hand = temp11; // drop it temp11 = hand; // pick up the newest box hand = temp8; // drop it into the truck which is the newest truck temp11.gets(hand); // move to the stack of text temp12 = new TTText("A"); // pick up a text hand = temp12; // push Backspace key to change what he is holding hand.keyboard('\b', false); // push 'f' to change what he is holding hand.keyboard('f', false); // push 'l' to change what he is holding hand.keyboard('l', false); // push 'a' to change what he is holding hand.keyboard('a', false); // push 't' to change what he is holding hand.keyboard('t', false); // push 't' to change what he is holding hand.keyboard('t', false); // push 'e' to change what he is holding hand.keyboard('e', false); // push 'n' to change what he is holding hand.keyboard('n', false); hand.stoppedTyping(); // drop it on the main notebook notebook.gets(hand); // pick up what's on the right page of the main notebook temp13 = notebook.pickUp(1); hand = temp13; // drop it into the truck which is the newest truck temp11.gets(hand); // move to the stack of boxes temp14 = new TTBox(1); // pick up a box hand = temp14; // push '2' to change what he is holding hand.keyboard('2', false); hand.stoppedTyping(); // drop it temp14 = hand; // pick up the newest bird hand = temp10; // drop it on the second hole inside the newest box temp14.holeGets(1, hand); // move to the stack of boxes temp15 = new TTBox(1); // pick up a box hand = temp15; // drop it on the first hole inside the newest box temp14.holeGets(0, hand); // move to the stack of text temp16 = new TTText("A"); // pick up a text hand = temp16; // push Backspace key to change what he is holding hand.keyboard('\b', false); // push 's' to change what he is holding hand.keyboard('s', false); // push 'e' to change what he is holding hand.keyboard('e', false); // push 'n' to change what he is holding hand.keyboard('n', false); // push 't' to change what he is holding hand.keyboard('t', false); // push 'e' to change what he is holding hand.keyboard('e', false); // push 'n' to change what he is holding hand.keyboard('n', false); // push 'c' to change what he is holding hand.keyboard('c', false); // push 'e' to change what he is holding hand.keyboard('e', false); hand.stoppedTyping(); // drop it on the first hole inside the first hole of the newest box temp14.hole(0).holeGets(0, hand); // move to the stack of text temp17 = new TTText("A"); // pick up a text hand = temp17; // push Backspace key to change what he is holding hand.keyboard('\b', false); // push 'm' to change what he is holding hand.keyboard('m', false); // push 'a' to change what he is holding hand.keyboard('a', false); // push 'k' to change what he is holding hand.keyboard('k', false); // push 'e' to change what he is holding hand.keyboard('e', false); // push Enter to change what he is holding hand.keyboard('\r', false); // push 'E' to change what he is holding hand.keyboard('E', false); // push 'x' to change what he is holding hand.keyboard('x', false); // push 'a' to change what he is holding hand.keyboard('a', false); // push 'm' to change what he is holding hand.keyboard('m', false); // push 'p' to change what he is holding hand.keyboard('p', false); // push 'l' to change what he is holding hand.keyboard('l', false); // push 'e' to change what he is holding hand.keyboard('e', false); hand.stoppedTyping(); // drop it on the main notebook notebook.gets(hand); // move to the stack of trucks temp18 = new TTTruck(this); // pick up a truck hand = temp18; // drop it temp18 = hand; // pick up the newest box hand = temp14; // drop it into the truck which is the newest truck temp18.gets(hand); // pick up what's on the right page of the main notebook temp19 = notebook.pickUp(1); hand = temp19; // drop it into the truck which is the newest truck temp18.gets(hand); notebook.setPageNumber(1); // restore main notebook return this; // This robot has finished and will see if the box still matches his thoughts and try again. } } // Robot30806_1856241766: Box toText start class Robot30806_1856241766 extends TTRobot { Robot30806_1856241766(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; TTObject temp2; // move to the stack of boxes temp1 = new TTBox(1); // pick up a box hand = temp1; // drop it just right of his box given.sideGets(hand, true); // move to the stack of text temp2 = new TTText("A"); // pick up a text hand = temp2; // push Backspace key to change what he is holding hand.keyboard('\b', false); hand.stoppedTyping(); // drop it on the third hole inside his box given.holeGets(2, hand); return this; // This robot has finished and will see if the box still matches his thoughts and try again. } } // Robot52_1509785607: Box toText worker class Robot52_1509785607 extends TTRobot { Robot52_1509785607(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; TTObject temp2; // pick up what's in the third hole inside his box hand = given.pickUp(2); // drop it temp1 = hand; // pick up what's in the first hole inside the first hole of his box hand = given.hole(0).pickUp(0); // push '.' to change what he is holding hand.keyboard('.', false); hand.stoppedTyping(); // drop it just right of the first thing he made or found temp1.sideGets(hand, true); // pick up the first thing he made or found hand = temp1; // give it to the bird in the second hole inside his box given.hole(1).gets(hand); // move to the stack of bombs temp2 = TT.BOMB; // pick up a bomb hand = temp2; // use it throw new TTBombExplosion(); // bomb set off } } // Robot50_2094616614: Box toText done class Robot50_2094616614 extends TTRobot { Robot50_2094616614(TTNotebook n) { notebook = n; } public TTObject gets(TTObject given) throws TTException { if (!wants.matches(given)) return null; // If given a box that matches the box in his thought bubble (called "wants"), // this robot will do the following: TTObject hand; TTObject temp1; TTObject temp2; // pick up what's in the first hole inside his box hand = given.pickUp(0); // push '1' to change what he is holding temp1 = hand.keyboard('1', false); hand.stoppedTyping(); // drop it temp2 = hand; // pick up what's in the first hole inside the last thing he made or found hand = temp2.pickUp(0); // push the space bar to change what he is holding hand.keyboard(' ', false); hand.stoppedTyping(); // drop it just right of the third hole inside his box given.hole(2).sideGets(hand, true); // pick up the new box hand = temp1; // drop it on the first hole inside his box given.holeGets(0, hand); // grab a copy of Dusty TTVacuum vacuum = new TTVacuum(); hand = vacuum; // use Dusty to vacuum the last thing he made or found vacuum.suckUp(temp2); // release Dusty return this; // This robot has finished and will give the box to the first robot to try again. } } class TTNotebook85_0 extends TTNotebook { public TTNotebook85_0() { super(24); } protected void initialize() { super.initialize(); notebook85Page1(); notebook85Page2(); notebook85Page3(); notebook85Page4(); notebook85Page5(); notebook85Page6(); notebook85Page7(); notebook85Page8(); notebook85Page9(); notebook85Page10(); notebook85Page11(); notebook85Page12(); notebook85Page13(); notebook85Page14(); notebook85Page15(); notebook85Page16(); notebook85Page17(); notebook85Page18(); notebook85Page19(); notebook85Page20(); notebook85Page21(); notebook85Page22(); notebook85Page23(); notebook85Page24(); } private void notebook85Page1() { setPage(1, new TTText("make\rexample")); } private void notebook85Page2() { // Robot36_589883: MakeExamplestop TTRobot robot1 = new Robot36_589883(notebook); TTBox box2 = new TTBox(3); TTBox box3 = new TTBox(0); TTBox wants32 = box2; // This robot will only accept a box with 3 holes. The first hole contains a // box with 0 holes. The second hole contains a bird. The third hole contains // any box. wants32.setHole(0, box3); wants32.setHole(1, new TTBird()); wants32.setHole(2, TT.BLANK_BOX); robot1.setWants(wants32); // Robot35_3927187539: MakeExampleWorker TTRobot robot4 = new Robot35_3927187539(notebook); TTBox box5 = new TTBox(3); TTBox wants33 = box5; // This robot will only accept a box with 3 holes. The first hole contains // any box. The second hole contains a bird. The third hole contains any box. wants33.setHole(0, TT.BLANK_BOX); wants33.setHole(1, new TTBird()); wants33.setHole(2, TT.BLANK_BOX); robot4.setWants(wants33); robot1.setNextRobot(robot4); TTBox wants34 = box2; // This robot will only accept a box with 3 holes. The first hole contains a // box with 0 holes. The second hole contains a bird. The third hole contains // any box. robot1.setWants(wants34); // Robot34_2656239702: MakeExampleStart box TTRobot robot6 = new Robot34_2656239702(notebook); TTBox box7 = new TTBox(2); TTBox wants35 = box7; // This robot will only accept a box with 2 holes. The first hole contains // any box. The second hole contains a bird. wants35.setHole(0, TT.BLANK_BOX); wants35.setHole(1, new TTBird()); robot6.setWants(wants35); robot4.setNextRobot(robot6); TTBox wants36 = box5; // This robot will only accept a box with 3 holes. The first hole contains // any box. The second hole contains a bird. The third hole contains any box. robot4.setWants(wants36); // Robot33_589878: MakeExampleStart text TTRobot robot8 = new Robot33_589878(notebook); TTBox box9 = new TTBox(2); TTBox wants37 = box9; // This robot will only accept a box with 2 holes. The first hole contains a // text pad with anything on it. The second hole contains a bird. wants37.setHole(0, TT.BLANK_TEXT); wants37.setHole(1, new TTBird()); robot8.setWants(wants37); robot6.setNextRobot(robot8); TTBox wants38 = box7; // This robot will only accept a box with 2 holes. The first hole contains // any box. The second hole contains a bird. robot6.setWants(wants38); setPage(2, robot1); TTBox wants39 = box2; // This robot will only accept a box with 3 holes. The first hole contains a // box with 0 holes. The second hole contains a bird. The third hole contains // any box. page(2).setWants(wants39); } private void notebook85Page3() { setPage(3, new TTText("pick\rone")); } private void notebook85Page4() { // Robot99_632864822: PickOne TTRobot robot10 = new Robot99_632864822(notebook); TTBox box11 = new TTBox(2); TTBox wants40 = box11; // This robot will only accept a box with 2 holes. The first hole contains // any box. The second hole contains a bird. wants40.setHole(0, TT.BLANK_BOX); wants40.setHole(1, new TTBird()); robot10.setWants(wants40); setPage(4, robot10); TTBox wants41 = box11; // This robot will only accept a box with 2 holes. The first hole contains // any box. The second hole contains a bird. page(4).setWants(wants41); } private void notebook85Page5() { setPage(5, new TTText("flatten")); } private void notebook85Page6() { // Robot42_589877: Gi TTRobot robot12 = new Robot42_589877(notebook); TTBox box13 = new TTBox(3); TTBox box14 = new TTBox(0); TTBox wants42 = box13; // This robot will only accept a box with 3 holes. The first hole contains a // box with 0 holes. The second hole contains a bird. The third hole contains // any box. wants42.setHole(0, box14); wants42.setHole(1, new TTBird()); wants42.setHole(2, TT.BLANK_BOX); robot12.setWants(wants42); // Robot41_1155633194: Fi TTRobot robot15 = new Robot41_1155633194(notebook); TTBox box16 = new TTBox(4); TTBox wants43 = box16; // This robot will only accept a box with 4 holes. The first hole contains // any box. The second hole contains a bird. The third hole contains any box. // The fourth hole contains a text pad with anything on it. wants43.setHole(0, TT.BLANK_BOX); wants43.setHole(1, new TTBird()); wants43.setHole(2, TT.BLANK_BOX); wants43.setHole(3, TT.BLANK_TEXT); robot15.setWants(wants43); robot12.setNextRobot(robot15); TTBox wants44 = box13; // This robot will only accept a box with 3 holes. The first hole contains a // box with 0 holes. The second hole contains a bird. The third hole contains // any box. robot12.setWants(wants44); // Robot40_1157529677: Di TTRobot robot17 = new Robot40_1157529677(notebook); TTBox box18 = new TTBox(3); TTBox wants45 = box18; // This robot will only accept a box with 3 holes. The first hole contains // any box. The second hole contains a bird. The third hole contains any box. wants45.setHole(0, TT.BLANK_BOX); wants45.setHole(1, new TTBird()); wants45.setHole(2, TT.BLANK_BOX); robot17.setWants(wants45); robot15.setNextRobot(robot17); TTBox wants46 = box16; // This robot will only accept a box with 4 holes. The first hole contains // any box. The second hole contains a bird. The third hole contains any box. // The fourth hole contains a text pad with anything on it. robot15.setWants(wants46); // Robot39_2656239699: Ci TTRobot robot19 = new Robot39_2656239699(notebook); TTBox box20 = new TTBox(2); TTBox wants47 = box20; // This robot will only accept a box with 2 holes. The first hole contains // any box. The second hole contains a bird. wants47.setHole(0, TT.BLANK_BOX); wants47.setHole(1, new TTBird()); robot19.setWants(wants47); robot17.setNextRobot(robot19); TTBox wants48 = box18; // This robot will only accept a box with 3 holes. The first hole contains // any box. The second hole contains a bird. The third hole contains any box. robot17.setWants(wants48); // Robot38_251424825: Bi TTRobot robot21 = new Robot38_251424825(notebook); TTBox box22 = new TTBox(4); TTBox wants49 = box22; // This robot will only accept a box with 4 holes. The first hole contains // any box. The second hole contains a bird. The third hole contains any box. // The fourth hole contains any box. wants49.setHole(0, TT.BLANK_BOX); wants49.setHole(1, new TTBird()); wants49.setHole(2, TT.BLANK_BOX); wants49.setHole(3, TT.BLANK_BOX); robot21.setWants(wants49); robot19.setNextRobot(robot21); TTBox wants50 = box20; // This robot will only accept a box with 2 holes. The first hole contains // any box. The second hole contains a bird. robot19.setWants(wants50); setPage(6, robot12); TTBox wants51 = box13; // This robot will only accept a box with 3 holes. The first hole contains a // box with 0 holes. The second hole contains a bird. The third hole contains // any box. page(6).setWants(wants51); } private void notebook85Page7() { setPage(7, new TTText("sentences")); } private void notebook85Page8() { TTBox box23 = new TTBox(2); TTBox box24 = new TTBox(3); TTBox box25 = new TTBox(2); setPage(8, box23); page(8).setHole(0, box24); page(8).hole(0).setHole(0, new TTText("noun\rphrase")); page(8).hole(0).setHole(1, new TTText("verb")); page(8).hole(0).setHole(2, new TTText("noun\rphrase")); page(8).setHole(1, box25); page(8).hole(1).setHole(0, new TTText("noun\rphrase")); page(8).hole(1).setHole(1, new TTText("verb")); } private void notebook85Page9() { setPage(9, new TTText("Nouns")); } private void notebook85Page10() { TTBox box26 = new TTBox(4); setPage(10, box26); page(10).setHole(0, new TTText("girls")); page(10).setHole(1, new TTText("boys")); page(10).setHole(2, new TTText("dogs")); page(10).setHole(3, new TTText("cats")); } private void notebook85Page11() { setPage(11, new TTText("Verbs")); } private void notebook85Page12() { TTBox box27 = new TTBox(3); setPage(12, box27); page(12).setHole(0, new TTText("rule")); page(12).setHole(1, new TTText("kick")); page(12).setHole(2, new TTText("walk")); } private void notebook85Page13() { setPage(13, new TTText("Adjectives")); } private void notebook85Page14() { TTBox box28 = new TTBox(3); setPage(14, box28); page(14).setHole(0, new TTText("big")); page(14).setHole(1, new TTText("pink")); page(14).setHole(2, new TTText("silly")); } private void notebook85Page15() { setPage(15, new TTText("Noun\rphrases")); } private void notebook85Page16() { TTBox box29 = new TTBox(2); TTBox box30 = new TTBox(1); TTBox box31 = new TTBox(2); setPage(16, box29); page(16).setHole(0, box30); page(16).hole(0).setHole(0, new TTText("noun")); page(16).setHole(1, box31); page(16).hole(1).setHole(0, new TTText("adjective")); page(16).hole(1).setHole(1, new TTText("noun\rphrase")); } private void notebook85Page17() { setPage(17, new TTText("join")); } private void notebook85Page18() { // Robot43_3969057: Join TTRobot robot32 = new Robot43_3969057(notebook); TTBox box33 = new TTBox(3); TTBox wants52 = box33; // This robot will only accept a box with 3 holes. The first hole contains // any box. The second hole contains any box. The third hole contains a bird. wants52.setHole(0, TT.BLANK_BOX); wants52.setHole(1, TT.BLANK_BOX); wants52.setHole(2, new TTBird()); robot32.setWants(wants52); setPage(18, robot32); TTBox wants53 = box33; // This robot will only accept a box with 3 holes. The first hole contains // any box. The second hole contains any box. The third hole contains a bird. page(18).setWants(wants53); } private void notebook85Page19() { setPage(19, new TTText("Make\rSentences")); } private void notebook85Page20() { // Robot30812_2955313157: Lots ofSentences TTRobot robot34 = new Robot30812_2955313157(notebook); TTBox box35 = new TTBox(1); TTBox wants54 = box35; // This robot will only accept a box with one hole which contains a bird. wants54.setHole(0, new TTBird()); robot34.setWants(wants54); setPage(20, robot34); TTBox wants55 = box35; // This robot will only accept a box with one hole which contains a bird. page(20).setWants(wants55); } private void notebook85Page21() { setPage(21, new TTText("Random")); } private void notebook85Page22() { setPage(22, new TTRemoteInteger(132, null, TT.NO_NUMBER_OPERATION, TT.RANDOM_REMOTE, TT.GLOBAL_REMOTE, TT.BRITISH_ENGLISH)); } private void notebook85Page23() { setPage(23, new TTText("Box\rto\rText")); } private void notebook85Page24() { // Robot30806_1856241766: Box toText start TTRobot robot36 = new Robot30806_1856241766(notebook); TTBox box37 = new TTBox(2); TTBox wants56 = box37; // This robot will only accept a box with 2 holes. The first hole contains // any box. The second hole contains a bird. wants56.setHole(0, TT.BLANK_BOX); wants56.setHole(1, new TTBird()); robot36.setWants(wants56); // Robot52_1509785607: Box toText worker TTRobot robot38 = new Robot52_1509785607(notebook); TTBox box39 = new TTBox(3); TTBox box40 = new TTBox(1); TTBox wants57 = box39; // This robot will only accept a box with 3 holes. The first hole contains a // box with one hole which contains a text pad with anything on it. The // second hole contains a bird. The third hole contains a text pad with // anything on it. wants57.setHole(0, box40); wants57.hole(0).setHole(0, TT.BLANK_TEXT); wants57.setHole(1, new TTBird()); wants57.setHole(2, TT.BLANK_TEXT); robot38.setWants(wants57); robot36.setNextRobot(robot38); TTBox wants58 = box37; // This robot will only accept a box with 2 holes. The first hole contains // any box. The second hole contains a bird. robot36.setWants(wants58); // Robot50_2094616614: Box toText done TTRobot robot41 = new Robot50_2094616614(notebook); TTBox box42 = new TTBox(3); TTBox wants59 = box42; // This robot will only accept a box with 3 holes. The first hole contains // any box. The second hole contains a bird. The third hole contains a text // pad with anything on it. wants59.setHole(0, TT.BLANK_BOX); wants59.setHole(1, new TTBird()); wants59.setHole(2, TT.BLANK_TEXT); robot41.setWants(wants59); robot38.setNextRobot(robot41); TTBox wants60 = box39; // This robot will only accept a box with 3 holes. The first hole contains a // box with one hole which contains a text pad with anything on it. The // second hole contains a bird. The third hole contains a text pad with // anything on it. robot38.setWants(wants60); setPage(24, robot36); TTBox wants61 = box37; // This robot will only accept a box with 2 holes. The first hole contains // any box. The second hole contains a bird. page(24).setWants(wants61); } } public class SentenceMakerDemo extends TTApplet { public static void main(String args[]) { new TTFrame().begin(new SentenceMakerDemo()); } public void initialize() { intializeToonTalkImages(); intializeNests(); TTNotebook notebook = new TTNotebook85_0(); TTRobot next_robot; TTBox box44 = new TTBox(1); box44.setHole(0, new TTBird()); answer[answer_count] = new TTNest(); // Make a nest for a bird without one. box44.hole(0).setNest(answer[answer_count++]); // We just made a box with one hole which contains a bird. TTRobot robot43 = new Robot30812_2955313157(notebook); TTBox box45 = new TTBox(1); TTBox wants62 = box45; // This robot will only accept a box with one hole which contains a bird. wants62.setHole(0, new TTBird()); robot43.setWants(wants62); TTTeam team43 = new TTTeam(box44, robot43); setStartingTeam(team43); displayThis(team43.getBox()); } private void intializeNests() { } private void intializeToonTalkImages() { } }