<?xml version="1.0"?>

<st-source>
<time-stamp>From VisualWorks®, 8.3.1 of March 23, 2018 on December 31, 2018 at 9:08:32 PM</time-stamp>


<component-created>
<name>Competition</name> <type>bundle</type>
</component-created><!-- Bundle Competition(1.27,David)= -->


<component-property>
<name>Competition</name> <type>bundle</type>
<property>parcelName</property> <value>'Competition'</value>
</component-property>

<component-created>
<name>Competition</name> <type>package</type>
</component-created><!-- Package Competition(1.26,David)= -->


<component-created>
<name>Competition</name> <type>package</type>
</component-created>

<class>
<name>Strategy</name>
<environment>Smalltalk</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition</package>
</attributes>
</class>

<class>
<name>RandomWalkStrategy</name>
<environment>Smalltalk</environment>
<super>Strategy</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>random </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition</package>
</attributes>
</class>

<class>
<name>Robot</name>
<environment>Smalltalk</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>location score board direction strategyClass strategy isSetup navigatorClass </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition</package>
</attributes>
</class>

<class>
<name>Board</name>
<environment>Smalltalk</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>name size cells time robot endTime </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition</package>
</attributes>
</class>

<class>
<name>HorizontalScanStrategy</name>
<environment>Smalltalk</environment>
<super>Strategy</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>stepsToNextRow </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition</package>
</attributes>
</class>

<class>
<name>ImprovedRandomWalkStrategy</name>
<environment>Smalltalk</environment>
<super>Strategy</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>random lastDirection </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition</package>
</attributes>
</class>

<class>
<name>BestNeighborStrategy</name>
<environment>Smalltalk</environment>
<super>Strategy</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition</package>
</attributes>
</class>

<class>
<name>BoardNavigator</name>
<environment>Smalltalk</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>board location </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition</package>
</attributes>
</class>

<methods>
<class-id>Strategy class</class-id> <category>identification</category>

<body package="Competition" selector="teamName">teamName	^'Team name not provided'</body>
</methods>

<methods>
<class-id>Strategy class</class-id> <category>instance creation</category>

<body package="Competition" selector="new">new	"Answer a newly created and initialized instance."	^super new initialize</body>
</methods>


<methods>
<class-id>Strategy</class-id> <category>initialize-release</category>

<body package="Competition" selector="initialize">initialize</body>
</methods>

<methods>
<class-id>Strategy</class-id> <category>running</category>

<body package="Competition" selector="stepRobot:">stepRobot: aRobot	self subclassResponsibility</body>

<body package="Competition" selector="setupOn:">setupOn: aRobot</body>
</methods>


<methods>
<class-id>HorizontalScanStrategy class</class-id> <category>identification</category>

<body package="Competition" selector="teamName">teamName	^'Competition Organizer'</body>
</methods>


<methods>
<class-id>HorizontalScanStrategy</class-id> <category>accessing</category>

<body package="Competition" selector="stepsToNextRow:">stepsToNextRow: anObject	stepsToNextRow := anObject</body>

<body package="Competition" selector="stepsToNextRow">stepsToNextRow	^stepsToNextRow</body>
</methods>

<methods>
<class-id>HorizontalScanStrategy</class-id> <category>running</category>

<body package="Competition" selector="stepRobot:">stepRobot: aRobot	stepsToNextRow := stepsToNextRow - 1.	stepsToNextRow = 0		ifTrue: [			aRobot direction: #down.			stepsToNextRow := aRobot board size x + 1]		ifFalse: [aRobot direction: #right]</body>

<body package="Competition" selector="setupOn:">setupOn: aRobot	stepsToNextRow := aRobot board size y + 1.</body>
</methods>


<methods>
<class-id>ImprovedRandomWalkStrategy class</class-id> <category>identification</category>

<body package="Competition" selector="teamName">teamName	^'Competition Organizer'</body>
</methods>


<methods>
<class-id>ImprovedRandomWalkStrategy</class-id> <category>accessing</category>

<body package="Competition" selector="random:">random: anObject	random := anObject</body>

<body package="Competition" selector="random">random	^random</body>
</methods>

<methods>
<class-id>ImprovedRandomWalkStrategy</class-id> <category>running</category>

<body package="Competition" selector="stepRobot:">stepRobot: aRobot	| directions |	directions := #(#left #right #up #down) copyWithout: lastDirection.	aRobot direction: (directions at: (random next * directions size) truncated + 1).	aRobot direction = #left ifTrue: [lastDirection := #right].	aRobot direction = #right ifTrue: [lastDirection := #left].	aRobot direction = #up ifTrue: [lastDirection := #down].	aRobot direction = #down ifTrue: [lastDirection := #up].</body>
</methods>

<methods>
<class-id>ImprovedRandomWalkStrategy</class-id> <category>initialize-release</category>

<body package="Competition" selector="initialize">initialize	random := Random new</body>
</methods>


<methods>
<class-id>BestNeighborStrategy class</class-id> <category>identification</category>

<body package="Competition" selector="teamName">teamName	^'Competition Organizer'</body>
</methods>


<methods>
<class-id>BestNeighborStrategy</class-id> <category>running</category>

<body package="Competition" selector="stepRobot:">stepRobot: aRobot	| bestValue bestDirection thisValue |	bestValue := aRobot navigator left value.	bestDirection := #left.		thisValue := aRobot navigator right value.	thisValue &gt; bestValue ifTrue: [		bestValue := thisValue.		bestDirection := #right].	thisValue := aRobot navigator up value.	thisValue &gt; bestValue ifTrue: [		bestValue := thisValue.		bestDirection := #up].	thisValue := aRobot navigator down value.	thisValue &gt; bestValue ifTrue: [		bestValue := thisValue.		bestDirection := #down].	aRobot direction: bestDirection</body>
</methods>


<methods>
<class-id>RandomWalkStrategy class</class-id> <category>identification</category>

<body package="Competition" selector="teamName">teamName	^'Competition Organizer'</body>
</methods>


<methods>
<class-id>RandomWalkStrategy</class-id> <category>accessing</category>

<body package="Competition" selector="random:">random: anObject	random := anObject</body>

<body package="Competition" selector="random">random	^random</body>
</methods>

<methods>
<class-id>RandomWalkStrategy</class-id> <category>running</category>

<body package="Competition" selector="stepRobot:">stepRobot: aRobot	aRobot direction: (#(#left #right #up #down) at: (random next * 4) truncated + 1).</body>
</methods>

<methods>
<class-id>RandomWalkStrategy</class-id> <category>initialize-release</category>

<body package="Competition" selector="initialize">initialize	random := Random new</body>
</methods>


<methods>
<class-id>BoardNavigator</class-id> <category>navigating</category>

<body package="Competition" selector="right:">right: aNumber	aNumber timesRepeat: [self right]</body>

<body package="Competition" selector="down:">down: aNumber	aNumber timesRepeat: [self down]</body>

<body package="Competition" selector="up">up	self moveBy: 0 @ -1</body>

<body package="Competition" selector="left:">left: aNumber	aNumber timesRepeat: [self left]</body>

<body package="Competition" selector="right">right	self moveBy: 1 @ 0</body>

<body package="Competition" selector="up:">up: aNumber	aNumber timesRepeat: [self up]</body>

<body package="Competition" selector="value">value	^board at: location</body>

<body package="Competition" selector="left">left	self moveBy: -1 @ 0</body>

<body package="Competition" selector="down">down	self moveBy: 0 @ 1</body>
</methods>

<methods>
<class-id>BoardNavigator</class-id> <category>accessing</category>

<body package="Competition" selector="board">board	^board</body>

<body package="Competition" selector="location:">location: anObject	location := anObject</body>

<body package="Competition" selector="board:">board: anObject	board := anObject</body>

<body package="Competition" selector="location">location	^location</body>
</methods>

<methods>
<class-id>BoardNavigator</class-id> <category>navigating</category>

<body package="Competition" selector="moveBy:">moveBy: delta	location := board normalizePoint: location + delta.</body>
</methods>

<methods>
<class-id>BoardNavigator</class-id> <category>calculating</category>

<body package="Competition" selector="distanceTo:">distanceTo: aBoardNavigator	^(aBoardNavigator location x - self location x) abs + (aBoardNavigator location y - self location y) abs</body>
</methods>


<methods>
<class-id>Board class</class-id> <category>instance creation</category>

<body package="Competition" selector="readFrom:">readFrom: aFilename	| file result |	file := aFilename asFilename readStream.	[result := Compiler evaluate: file contents]		ensure: [file close].	^result</body>

<body package="Competition" selector="size:">size: aPoint	^self new		size: aPoint;		yourself</body>

<body package="Competition" selector="new">new	^super new initialize</body>
</methods>

<methods>
<class-id>Board class</class-id> <category>examples</category>

<body package="Competition" selector="board1">board1	^Board new		name: 'Board 1';		size: 20 @ 20;		endTime: 20.0s;		cells: #(			#(19 16 4 29 48 95 96 23 35 47 0 22 80 30 70 3 31 49 93 89)			#(51 62 47 74 70 17 21 78 57 89 52 0 20 58 47 3 4 87 84 22)			#(37 0 88 17 46 31 7 26 77 87 40 90 92 45 65 85 91 53 32 11)			#(26 45 19 62 2 18 13 80 84 79 19 94 10 8 67 51 36 59 64 81)			#(54 15 0 83 65 67 24 70 13 95 91 30 1 12 29 4 89 97 64 72)			#(46 18 68 94 38 11 50 2 53 7 20 90 55 39 68 35 57 39 3 55)			#(18 3 20 45 34 53 46 50 18 66 40 91 37 46 37 53 87 25 79 3)			#(80 18 38 96 97 55 98 49 89 94 11 12 4 47 53 41 58 24 19 63)			#(34 72 75 2 5 85 35 97 86 48 56 79 93 54 54 0 31 23 3 6)			#(19 37 75 52 87 42 25 70 60 37 56 75 18 28 61 45 90 94 25 6)			#(43 25 64 8 76 41 17 3 16 80 14 53 46 89 73 79 84 99 63 55)			#(67 6 55 56 3 37 58 85 49 96 51 26 75 63 14 25 6 20 76 25)			#(25 67 80 3 53 93 36 75 80 10 47 52 47 50 34 38 99 48 80 15)			#(19 73 57 23 40 51 16 40 41 3 89 29 67 53 43 69 35 72 93 28)			#(47 50 36 25 4 85 50 86 88 16 83 58 32 10 48 58 5 50 42 7)			#(11 46 9 36 98 28 78 15 96 67 92 4 30 66 35 21 31 2 98 60)			#(0 14 22 6 53 99 19 74 73 42 64 72 43 96 16 88 86 53 84 83)			#(48 97 49 52 49 87 10 45 60 86 38 29 73 85 40 70 89 71 23 16)			#(3 99 89 35 0 33 72 96 65 59 31 48 48 47 1 93 6 93 39 1)			#(30 97 73 57 99 58 17 32 88 87 77 49 29 38 16 5 86 32 41 13)	); 		placeRobot: (Robot new location: (Core.Point x: 2 y: 3); yourself)		yourself</body>

<body package="Competition" selector="board2">board2	^Board new		name: 'Board 2';		size: 50 @ 50;		endTime: 10;		cells: #(			#(5 6 17 29 14 15 18 25 26 23 23 28 23 25 17 26 23 21 22 20 19 14 29 24 13 17 22 11 13 24 28 10 21 28 20 9 16 6 24 27 29 14 5 16 22 7 27 23 22 10)			#(23 8 10 7 15 20 5 24 9 25 6 20 29 19 20 17 18 27 12 27 26 13 28 23 5 5 5 17 15 20 7 16 8 5 14 12 28 15 24 21 12 12 27 19 27 5 9 20 29 9)			#(26 23 6 10 27 20 6 28 24 23 22 19 28 21 28 20 16 20 29 21 15 7 24 12 14 19 13 23 25 6 14 8 21 28 29 22 16 19 29 11 23 22 5 11 11 9 20 5 10 22)			#(18 8 16 7 7 15 23 22 12 22 20 26 26 14 11 21 7 16 24 16 20 9 10 28 29 6 28 28 20 23 9 9 11 19 5 17 13 14 16 10 14 21 13 26 6 7 22 11 29 16)			#(19 13 12 27 8 18 13 13 5 26 29 13 28 25 24 19 23 9 22 11 12 16 28 17 11 18 8 7 10 20 7 22 21 14 29 10 13 8 8 22 9 19 29 24 7 24 5 13 22 26)			#(21 25 19 12 27 19 19 24 17 9 15 17 21 6 8 29 14 24 19 21 29 12 5 25 14 26 10 20 14 28 29 7 26 29 9 28 6 5 15 29 6 27 17 29 16 7 10 19 11 13)			#(16 10 14 7 16 18 26 19 6 24 29 16 20 16 10 25 15 10 19 19 25 29 28 22 27 14 21 22 7 27 16 13 24 18 10 28 14 28 7 28 21 6 22 20 16 21 18 10 15 9)			#(29 14 26 10 6 19 23 23 11 22 7 7 21 13 26 14 23 28 5 11 20 29 7 6 7 5 16 12 19 29 9 24 9 19 19 8 8 16 14 23 7 15 7 24 21 20 6 22 29 14)			#(8 15 19 10 27 7 14 6 10 23 18 7 27 13 26 25 29 17 19 16 16 17 21 25 17 10 19 15 26 23 16 24 14 9 10 29 24 23 16 27 15 7 14 9 14 12 24 22 16 7)			#(9 10 5 23 28 10 25 13 10 16 18 18 22 29 10 18 10 16 28 23 17 24 18 15 16 24 22 29 17 18 7 28 12 15 26 22 28 11 6 10 24 8 12 23 5 21 21 19 8 7)			#(21 11 25 9 21 26 7 11 25 20 12 22 8 12 28 18 27 11 27 5 14 23 9 13 10 5 12 27 12 16 29 7 28 21 17 14 9 28 15 11 21 10 24 26 14 11 14 7 21 28)			#(12 6 11 5 16 25 9 29 29 25 21 6 6 12 18 10 9 21 15 22 12 20 22 27 7 25 11 28 11 18 21 5 24 15 17 6 19 23 7 15 15 25 14 25 26 15 25 23 16 7)			#(7 20 21 6 8 9 26 29 24 22 5 17 18 19 7 24 29 27 8 27 24 29 11 5 14 12 21 7 20 20 26 15 22 11 18 10 8 15 17 22 7 10 15 26 5 6 28 16 24 23)			#(21 7 25 21 23 7 14 12 27 12 8 15 22 8 5 26 29 10 17 11 7 16 9 15 10 25 10 20 29 28 19 13 27 15 20 23 7 25 19 8 8 27 12 26 20 12 5 11 6 13)			#(21 17 25 20 27 6 20 13 28 24 9 22 5 12 8 6 17 17 8 6 12 16 29 16 25 23 28 26 26 5 27 27 10 29 18 28 23 14 13 29 5 12 27 13 28 16 7 9 19 18)			#(20 5 13 14 20 6 20 26 13 13 15 8 15 18 13 24 29 7 24 14 10 29 7 17 24 16 19 23 26 16 27 8 9 12 23 20 23 16 11 25 13 10 18 10 23 7 25 25 5 6)			#(16 16 23 8 15 9 24 9 12 13 20 5 7 13 6 12 7 26 13 12 11 24 27 20 29 9 5 14 9 6 11 24 28 16 16 10 22 19 16 10 8 5 24 7 28 6 24 26 29 11)			#(20 9 24 28 29 22 15 28 7 26 20 14 28 16 11 13 16 16 14 12 25 12 28 15 11 15 20 29 26 11 6 21 21 12 15 26 6 13 5 19 28 16 29 8 17 6 15 27 23 17)			#(17 27 20 11 22 6 10 26 11 7 15 26 8 26 16 23 10 24 10 26 25 19 10 29 8 14 13 15 28 10 11 8 17 17 25 7 15 13 17 14 16 16 23 28 9 6 13 8 17 19)			#(27 17 29 22 14 12 27 28 9 6 18 24 12 20 7 7 17 14 24 0 15 18 12 15 19 29 19 8 17 12 21 27 21 23 9 26 20 17 29 20 7 8 16 20 24 5 27 27 29 22)			#(11 14 27 15 25 18 12 15 6 21 15 29 19 18 23 14 17 15 14 22 21 15 17 10 27 24 24 19 24 8 10 16 17 13 9 14 14 15 17 19 19 10 10 24 10 19 6 7 26 12)			#(8 9 17 14 10 14 7 11 26 22 26 27 5 12 29 25 22 29 9 9 20 9 18 29 22 26 17 12 15 8 5 21 21 10 25 26 7 24 23 27 18 7 17 27 17 12 7 26 27 29)			#(26 6 16 20 19 7 14 27 21 9 5 19 22 5 16 22 10 19 7 15 8 7 29 7 21 17 12 23 26 16 14 10 9 5 14 19 6 6 26 15 19 12 13 16 27 24 20 22 25 23)			#(18 29 6 12 20 12 29 5 5 24 20 21 7 9 14 11 12 12 6 13 11 29 14 22 13 12 14 28 29 21 24 15 15 15 24 13 25 27 28 21 5 8 21 28 11 12 10 6 25 25)			#(14 7 12 28 29 24 17 24 24 24 19 10 25 22 18 20 26 19 28 6 14 12 24 16 6 12 11 10 15 8 19 11 13 12 8 21 6 27 11 9 25 12 13 11 15 8 14 7 21 29)			#(19 27 12 7 16 19 9 7 28 20 23 9 19 19 27 10 14 28 13 11 12 17 7 24 29 15 21 6 29 16 20 17 29 28 5 14 15 18 19 19 15 29 11 12 8 23 28 24 12 16)			#(16 23 11 28 29 18 13 27 8 19 16 8 5 19 25 16 17 13 5 13 16 23 13 21 6 28 11 18 8 29 24 26 17 24 15 15 6 19 6 6 22 17 22 28 28 16 22 5 28 22)			#(10 9 12 22 25 12 5 17 27 23 6 7 21 11 17 9 18 28 5 9 25 12 26 16 14 21 19 26 19 15 22 17 19 23 13 19 13 11 13 22 13 25 21 5 6 8 28 9 7 26)			#(27 10 9 14 13 15 6 28 7 24 24 19 10 26 5 18 24 28 28 23 8 21 18 16 16 8 9 17 23 28 23 6 11 10 23 5 21 16 27 9 24 12 7 25 16 6 13 8 29 24)			#(6 15 19 23 10 12 22 26 18 26 26 20 28 23 12 26 28 21 14 22 16 23 20 19 7 6 8 27 15 19 25 16 9 13 25 6 27 21 13 18 18 5 22 11 17 16 18 25 27 27)			#(25 6 8 24 10 26 10 10 23 29 16 21 9 11 16 27 18 14 6 25 28 5 26 24 18 21 24 13 15 18 17 24 19 23 10 22 19 12 6 28 12 12 20 13 28 24 5 25 10 13)			#(23 11 25 17 26 23 5 11 23 19 20 14 27 5 29 7 19 11 8 27 9 5 14 18 28 25 19 28 12 18 27 7 15 15 6 9 26 9 28 22 26 16 26 8 8 26 10 29 27 16)			#(21 10 13 6 29 22 19 14 29 27 9 25 5 27 6 24 7 11 19 22 6 18 5 6 19 25 28 19 28 20 17 27 23 25 18 20 26 14 16 14 5 19 16 9 10 27 25 22 6 22)			#(14 9 9 12 10 24 18 10 22 15 9 18 25 25 9 24 21 8 7 24 14 9 15 21 18 5 5 19 16 13 14 12 9 22 16 29 21 16 7 24 17 19 25 16 27 11 8 20 16 19)			#(5 13 10 27 20 28 26 24 25 10 12 22 22 26 29 8 13 17 13 17 15 14 29 28 14 18 12 22 25 14 21 25 28 29 5 20 16 15 20 14 11 10 22 25 18 9 17 17 21 6)			#(8 15 25 23 16 22 16 24 11 28 15 21 6 5 28 27 18 24 14 17 16 27 8 24 7 19 11 16 12 15 15 25 12 7 17 11 9 27 25 21 21 14 16 22 19 27 13 29 5 8)			#(5 10 6 20 28 10 10 18 13 28 11 19 27 23 19 16 6 27 20 23 28 25 11 11 9 25 14 14 17 9 19 29 22 18 20 12 15 7 8 23 10 22 10 15 22 12 25 19 16 17)			#(12 20 11 21 27 6 7 24 19 25 19 12 16 14 29 28 29 25 15 15 14 13 24 19 24 25 25 17 17 7 19 29 24 11 25 8 23 8 24 13 20 12 27 21 11 18 23 12 6 10)			#(14 9 12 6 9 7 18 15 29 12 12 9 11 28 7 21 13 9 17 8 24 16 28 28 29 16 25 13 25 26 12 9 24 15 16 21 8 17 12 10 12 17 20 16 5 9 24 19 11 12)			#(11 22 7 23 27 22 11 6 7 10 6 28 10 27 27 19 15 18 9 19 17 10 23 25 24 23 13 11 8 9 6 27 15 17 29 12 25 29 18 5 23 24 26 24 28 19 9 21 6 11)			#(13 6 15 28 29 14 14 15 22 12 29 17 22 21 16 22 19 22 6 29 16 17 22 17 14 6 17 15 10 5 8 11 10 11 29 6 11 15 21 26 7 10 6 20 15 20 5 19 17 23)			#(23 11 27 11 29 17 28 9 23 5 29 29 26 10 27 22 11 8 21 14 21 24 14 19 6 7 5 8 23 12 22 16 10 27 25 26 22 20 6 29 28 23 21 11 14 27 23 28 11 19)			#(15 27 18 9 14 27 26 19 16 20 17 21 24 26 24 27 25 17 20 28 19 9 11 10 28 5 15 22 6 7 29 25 11 16 6 10 27 29 12 5 19 12 22 22 14 24 16 28 24 19)			#(22 12 5 6 10 17 15 12 18 14 27 25 28 26 13 17 27 25 10 29 7 26 28 24 26 23 8 8 8 10 27 22 20 21 10 7 19 27 25 28 5 16 13 28 9 23 27 27 14 7)			#(13 14 8 10 17 16 20 8 13 5 20 16 18 23 13 11 20 11 27 25 11 10 23 6 8 8 29 29 21 6 22 11 20 11 11 27 6 26 10 16 8 29 22 10 7 21 23 20 12 24)			#(7 25 5 22 16 25 18 20 13 26 21 27 22 28 23 17 16 17 17 8 29 25 9 25 20 29 28 26 17 26 25 5 27 10 8 28 11 13 9 22 18 13 6 20 18 14 24 5 24 17)			#(26 6 6 15 26 14 27 6 10 22 10 20 29 22 26 22 21 22 11 15 19 24 12 21 12 16 14 11 22 29 17 23 29 6 18 12 18 13 15 8 16 29 14 5 21 12 24 15 25 6)			#(5 13 26 23 11 21 13 18 19 5 6 28 20 28 7 7 7 11 20 10 16 27 28 24 26 13 18 10 5 7 12 19 21 6 24 17 6 13 27 14 22 9 13 14 13 9 21 11 15 21)			#(24 23 27 11 5 12 5 10 27 13 28 6 23 22 11 14 12 12 16 13 22 20 11 6 18 12 29 27 10 17 14 14 23 28 12 20 13 17 10 12 23 7 25 27 13 21 26 23 10 19)			#(10 5 11 7 21 22 27 26 28 12 25 21 25 13 13 6 12 10 21 15 20 5 21 10 10 13 14 21 24 8 29 10 21 9 8 23 23 17 22 21 14 15 15 23 7 5 12 7 19 19)	); 		placeRobot: (Robot new location: (Core.Point x: 20 y: 20); yourself)		yourself</body>

<body package="Competition" selector="board5">board5	^Board new		name: 'Board 5';		size: 50 @ 50;		endTime: 20;		cells: #(			#(13 14 13 12 12 13 8 7 10 7 14 9 7 11 11 6 11 11 11 6 10 7 9 10 14 7 14 9 5 7 14 9 5 5 6 10 7 8 5 10 11 7 12 11 7 11 12 14 6 10)			#(14 13 6 11 6 13 8 14 11 12 6 12 13 7 14 11 6 10 6 11 5 14 7 13 14 11 0 0 0 0 0 0 0 14 14 12 9 14 9 6 5 9 7 12 9 10 10 13 10 13)			#(6 11 6 13 9 13 5 8 9 10 10 11 11 12 7 9 10 14 14 13 11 10 5 9 7 0 0 0 0 0 0 0 0 0 14 5 10 6 13 11 7 6 10 9 5 10 14 5 9 7)			#(6 10 12 7 14 13 14 8 5 9 11 12 14 13 9 14 7 8 9 10 13 13 7 0 0 0 0 0 0 0 0 0 0 0 0 0 6 7 14 8 5 11 11 14 10 10 13 8 11 5)			#(10 7 12 13 5 10 5 12 7 11 10 14 7 14 8 5 8 9 12 5 9 12 11 0 0 0 0 0 0 0 0 0 0 0 0 0 6 12 6 7 5 8 5 9 7 9 11 11 14 8)			#(11 14 5 14 12 14 10 11 12 14 5 6 5 13 11 5 9 7 14 9 9 12 0 0 0 0 0 0 30 34 30 0 0 0 0 0 0 9 8 9 12 9 13 6 12 6 5 8 8 12)			#(8 8 14 13 9 14 14 11 6 5 7 8 6 12 7 8 11 7 8 8 14 0 0 0 0 0 26 50 73 82 73 50 26 0 0 0 0 0 7 14 14 14 9 12 8 10 7 9 9 5)			#(7 10 5 11 12 10 10 7 8 6 12 11 7 5 6 12 7 12 13 11 10 0 0 0 0 0 50 93 136 154 136 93 50 0 0 0 0 0 8 5 5 8 12 13 9 5 14 6 13 12)			#(12 13 11 11 13 9 7 7 9 10 5 13 10 7 10 11 10 8 12 13 8 0 0 0 0 30 73 136 198 225 198 136 73 30 0 0 0 0 7 12 11 10 11 12 9 10 5 6 12 13)			#(7 7 7 8 14 8 5 11 14 5 14 14 13 5 12 9 6 14 6 8 14 0 0 0 0 34 82 154 225 255 225 154 82 34 0 0 0 0 12 5 11 7 9 10 6 5 6 6 14 11)			#(12 8 8 13 8 13 9 10 13 7 10 11 9 12 11 8 6 9 5 7 10 0 0 0 0 30 73 136 198 225 198 136 73 30 0 0 0 0 6 5 14 11 9 12 12 12 8 8 11 14)			#(6 11 11 8 7 6 9 9 11 11 6 7 5 9 10 12 6 9 6 8 7 0 0 0 0 0 50 93 136 154 136 93 50 0 0 0 0 0 13 6 9 7 14 14 12 12 8 11 9 12)			#(11 14 6 14 10 11 11 11 6 5 11 12 13 6 12 5 9 5 13 7 12 0 0 0 0 0 26 50 73 82 73 50 26 0 0 0 0 0 8 9 7 13 6 12 11 8 6 7 13 14)			#(8 6 13 7 7 5 11 8 6 10 7 10 14 11 9 9 12 6 13 10 6 8 0 0 0 0 0 0 30 34 30 0 0 0 0 0 0 13 6 12 7 6 6 6 5 10 7 8 9 5)			#(6 11 8 14 14 8 12 14 8 8 7 12 11 14 11 14 10 10 7 9 6 14 7 0 0 0 0 0 0 0 0 0 0 0 0 0 14 10 6 11 14 9 14 12 9 8 8 12 7 12)			#(10 8 13 7 9 5 5 12 6 12 6 8 9 9 11 7 7 6 6 7 14 8 14 0 0 0 0 0 0 0 0 0 0 0 0 0 9 7 9 14 5 14 13 13 5 14 12 10 6 14)			#(5 14 11 9 8 9 12 6 5 5 9 6 14 6 10 8 11 8 6 6 8 5 6 9 13 0 0 0 0 0 0 0 0 0 8 11 6 12 5 11 14 8 13 6 11 14 8 10 5 8)			#(11 12 12 8 5 13 9 14 14 9 9 13 7 9 9 6 5 7 12 14 9 6 13 9 7 10 0 0 0 0 0 0 0 7 9 7 14 12 5 9 7 14 9 9 9 6 13 11 14 5)			#(10 12 7 13 8 9 8 6 10 7 8 14 8 13 13 11 8 14 9 12 13 14 7 12 13 10 7 10 12 10 9 13 5 6 13 8 6 6 11 9 13 8 6 12 5 11 10 5 8 13)			#(10 12 7 12 5 12 9 13 5 10 13 10 12 5 11 12 8 14 5 13 5 8 12 10 12 13 11 14 14 12 12 7 7 10 8 5 12 11 12 9 5 14 11 14 14 13 8 7 12 5)			#(13 6 14 14 10 12 13 9 11 6 14 5 7 8 7 5 9 13 11 7 12 14 12 12 13 14 11 7 9 12 7 10 11 13 7 5 12 12 14 14 14 10 12 7 12 7 10 7 12 5)			#(12 6 14 8 14 7 8 11 11 5 6 10 14 16 14 10 6 4 5 6 6 6 5 4 5 12 12 7 12 10 6 9 11 13 12 8 5 14 13 6 9 6 9 8 9 14 10 5 9 10)			#(13 11 6 9 7 6 6 7 13 5 10 17 24 26 24 17 10 5 9 10 11 10 9 7 5 10 6 12 12 13 11 6 10 12 14 7 13 7 6 8 6 10 10 10 12 13 8 5 14 7)			#(6 8 8 9 6 14 8 5 13 7 14 24 35 36 32 40 14 20 20 7 8 7 5 11 8 5 14 7 5 5 5 5 11 13 14 6 5 13 8 5 14 12 13 10 9 5 12 6 14 12)			#(13 5 13 11 6 11 12 13 9 8 16 26 36 35 35 35 40 40 20 14 16 14 10 6 11 7 4 6 5 11 9 11 5 10 14 9 7 9 13 9 14 14 8 8 10 5 9 14 5 14)			#(14 5 9 8 6 5 7 8 13 7 14 24 32 36 35 35 35 40 20 20 20 20 17 10 5 9 5 10 13 14 9 7 14 11 5 14 7 13 6 12 5 13 14 6 8 14 8 5 8 6)			#(14 9 13 7 13 13 11 7 12 5 10 17 30 26 24 40 35 35 35 32 20 20 24 14 7 10 6 11 8 5 11 7 13 11 6 10 12 14 9 11 8 5 8 6 10 9 12 6 5 6)			#(13 9 10 5 6 11 12 11 9 12 6 10 30 16 14 10 35 35 35 36 40 20 26 16 8 11 6 6 8 7 9 13 13 14 6 7 8 5 14 7 10 10 8 14 10 14 5 14 6 6)			#(8 9 6 8 5 7 13 10 5 7 9 5 30 8 7 5 7 35 35 35 36 20 20 14 7 10 6 13 13 5 8 7 13 8 5 6 8 10 9 8 7 14 5 13 14 7 9 7 9 7)			#(10 5 8 6 13 8 5 6 7 12 11 8 0 11 5 9 5 10 35 35 40 20 20 10 5 9 5 8 8 8 6 13 8 14 8 11 8 6 10 5 13 14 13 9 10 7 7 6 12 10)			#(6 14 8 12 10 9 6 7 6 6 10 9 9 10 4 7 11 6 35 35 40 40 20 5 11 7 4 13 11 13 10 7 13 5 10 6 7 7 10 9 10 10 9 8 12 6 11 12 6 6)			#(12 6 10 12 6 13 7 13 7 12 8 6 12 6 13 5 8 11 6 35 35 40 14 10 6 5 5 6 10 9 13 7 6 12 12 13 8 9 11 14 8 14 9 8 7 6 5 5 9 13)			#(13 9 10 8 11 13 12 9 12 14 12 12 13 5 14 8 5 5 10 17 35 40 40 17 10 5 10 8 14 7 8 7 10 12 7 14 6 14 11 6 9 6 6 5 6 7 5 8 6 10)			#(9 10 14 7 10 13 12 13 14 8 6 11 5 8 9 14 9 7 14 20 32 36 40 24 14 7 7 14 6 11 11 12 13 7 5 12 7 8 11 14 11 8 8 10 13 7 13 12 12 13)			#(14 5 12 5 12 7 8 9 12 13 14 9 9 6 5 6 13 8 16 26 20 40 40 26 16 8 13 5 7 14 14 10 6 14 14 7 9 10 7 8 11 7 9 13 6 6 10 7 12 5)			#(13 8 13 7 12 10 9 10 7 8 13 12 5 7 14 9 6 7 14 24 20 20 40 40 7 8 7 5 9 13 7 12 12 11 14 10 6 12 6 11 9 14 6 11 6 9 5 10 5 13)			#(8 14 11 13 5 10 8 13 5 5 7 12 7 14 11 14 9 5 10 17 24 20 40 40 14 16 14 10 6 8 10 8 8 13 9 6 11 7 14 14 6 12 6 7 11 7 11 12 10 11)			#(6 11 13 8 13 10 10 11 10 8 7 10 12 5 6 12 12 14 6 10 14 20 10 40 40 26 24 17 10 5 12 11 11 10 11 11 9 13 13 12 10 11 6 9 8 8 10 12 7 8)			#(6 10 14 10 10 10 14 7 13 7 10 14 13 14 11 5 10 5 12 5 7 7 14 24 40 36 32 24 14 7 9 10 14 10 7 14 5 9 8 13 8 10 7 7 12 7 11 10 14 10)			#(10 12 8 7 12 11 13 9 14 5 7 5 10 14 5 14 7 14 5 9 11 8 16 26 36 40 40 40 16 8 7 6 10 12 12 14 9 9 11 0 6 11 9 13 12 5 11 12 5 6)			#(8 8 6 9 11 14 6 14 14 12 8 14 6 9 6 8 5 9 12 14 7 7 14 24 32 40 40 40 40 8 7 5 9 12 9 11 8 11 12 6 6 14 9 5 12 14 13 13 5 12)			#(5 5 11 12 11 9 14 7 5 13 11 8 14 11 13 9 5 9 14 7 14 5 10 17 24 26 35 40 35 35 14 10 6 13 11 5 14 12 10 6 5 8 7 5 13 12 6 11 10 13)			#(12 10 14 12 5 5 7 7 10 7 13 10 9 5 7 12 14 11 13 6 7 6 6 10 14 5 35 35 35 35 35 17 10 5 9 6 9 7 7 12 12 7 12 6 7 10 12 11 8 13)			#(5 9 11 8 9 9 10 11 8 6 11 6 6 7 8 12 10 6 7 6 13 8 9 5 7 7 14 35 35 36 35 24 14 7 11 14 10 10 11 6 10 12 14 7 6 7 13 7 12 9)			#(14 9 14 7 10 13 7 13 10 11 5 13 9 5 8 7 5 14 10 10 8 12 8 8 8 8 16 26 35 35 35 26 16 8 10 7 10 10 11 8 5 12 14 5 5 11 5 6 8 13)			#(10 9 12 5 5 9 5 12 7 8 9 5 5 8 12 9 10 11 14 12 9 5 7 7 14 7 14 24 35 36 32 24 14 7 14 7 7 10 7 11 13 13 14 7 14 5 12 5 12 9)			#(14 10 6 5 6 5 10 12 13 11 14 7 8 5 9 13 10 13 7 6 10 10 8 13 12 5 10 17 24 26 24 17 10 5 12 13 9 12 7 14 13 7 11 12 8 11 5 14 6 12)			#(12 10 8 7 12 8 10 9 11 10 12 9 8 12 14 9 14 14 10 6 10 13 14 7 10 5 6 10 14 16 14 10 6 12 9 13 8 8 12 8 12 10 5 8 6 8 11 14 14 9)			#(6 8 6 14 11 6 11 13 7 9 13 5 9 10 11 8 8 5 11 5 13 13 14 7 12 8 11 5 7 8 7 5 12 13 8 6 9 14 10 14 7 11 8 5 12 14 5 8 9 9)			#(11 9 8 11 12 7 8 5 9 9 11 9 13 14 8 13 14 11 12 8 12 8 10 6 6 13 12 14 6 14 12 13 13 9 12 5 7 5 13 8 11 14 10 7 5 11 10 6 10 7)	); 		placeRobot: (Robot new location: (Core.Point x: 13 y: 30); yourself)		yourself</body>

<body package="Competition" selector="board4">board4	^Board new		name: 'Board 4';		size: 50 @ 50;		endTime: 60;		cells: #(			#(13 5 11 14 11 18 8 11 13 9 18 9 8 8 13 14 15 24 12 24 22 19 21 21 6 19 17 18 18 6 7 19 5 5 19 6 5 8 9 22 13 9 18 12 16 20 24 13 7 10)			#(8 0 8 15 22 9 21 23 7 7 13 21 10 17 20 11 11 23 6 20 17 19 10 6 23 22 18 23 20 6 6 10 6 17 12 19 23 20 7 15 23 19 5 21 22 20 17 8 6 22)			#(21 15 16 6 7 8 20 13 11 19 24 22 7 19 17 24 10 7 12 20 23 16 8 7 19 7 11 14 7 8 5 20 12 12 12 5 20 21 15 7 20 14 19 9 6 14 23 6 16 22)			#(21 19 19 6 13 6 12 10 8 6 10 20 12 22 5 11 16 16 8 23 15 6 15 9 24 20 21 11 21 19 5 16 10 23 20 9 20 13 15 23 20 13 21 20 9 7 16 22 9 22)			#(18 14 8 11 19 21 6 15 9 19 5 24 23 15 15 23 5 19 10 7 12 8 7 20 18 10 17 7 18 7 13 11 8 23 10 18 14 19 9 8 21 13 17 9 17 11 9 8 16 7)			#(12 19 21 24 12 24 24 7 14 5 14 20 20 20 24 13 17 16 18 5 23 13 23 8 13 12 16 23 16 10 13 8 5 6 8 11 12 18 23 13 14 7 21 8 8 8 20 5 7 18)			#(10 23 13 23 7 18 13 16 23 9 13 16 22 18 20 18 7 12 22 24 14 5 11 24 19 13 11 12 18 22 24 13 15 13 23 18 13 12 18 13 7 20 5 21 20 7 17 21 17 7)			#(22 17 13 14 6 17 14 14 21 15 16 20 13 15 24 13 11 24 20 8 19 14 22 10 10 20 18 6 23 23 10 9 13 13 10 5 21 14 5 20 5 5 16 9 5 6 21 17 8 17)			#(13 8 17 9 13 11 12 6 6 17 24 22 12 14 13 16 17 9 11 5 6 16 17 5 12 13 23 14 19 19 13 24 17 18 24 14 6 10 21 21 11 15 15 7 13 23 11 24 5 22)			#(16 16 16 13 20 15 21 8 19 24 6 20 12 8 19 10 7 14 20 23 7 22 12 16 12 21 18 24 10 24 13 13 12 24 8 16 10 23 5 8 10 21 11 10 17 13 19 21 7 20)			#(17 5 21 5 21 17 17 17 24 24 22 23 7 6 7 10 19 16 20 7 17 8 21 8 13 10 16 19 24 24 18 11 9 24 12 23 24 14 13 12 8 15 20 12 18 18 24 20 12 21)			#(5 16 12 7 15 21 19 12 19 19 13 13 9 11 11 22 24 9 8 6 15 9 22 5 7 17 13 14 19 20 6 7 15 24 19 16 8 11 20 9 11 9 16 23 9 19 6 15 14 9)			#(23 16 22 21 16 22 16 6 12 16 24 14 18 20 22 8 16 20 18 5 10 13 23 22 20 15 6 12 23 17 22 14 14 16 22 6 12 10 15 6 21 18 19 22 16 23 8 5 5 11)			#(21 22 16 11 11 17 24 20 12 15 18 24 10 20 17 5 18 10 23 20 15 17 17 15 6 18 17 5 15 21 12 16 14 21 5 14 7 18 11 21 20 20 19 10 16 15 15 23 9 24)			#(14 21 7 10 10 20 7 19 15 9 17 20 9 9 8 11 13 20 10 22 13 12 22 5 8 14 24 15 6 9 24 14 8 19 14 21 21 16 6 14 22 14 6 12 8 9 24 20 12 15)			#(16 17 22 20 8 16 22 14 14 19 24 14 8 21 14 23 18 24 13 15 17 9 24 7 17 15 11 18 18 23 12 11 9 12 14 14 5 17 17 12 14 6 19 21 7 9 9 13 7 22)			#(17 16 12 13 8 18 16 16 11 19 9 18 19 5 17 17 11 13 6 12 7 23 10 24 11 8 7 23 10 22 23 7 11 22 8 14 13 20 6 24 6 12 11 19 22 24 10 11 10 10)			#(8 13 22 22 8 14 6 22 19 6 19 13 16 15 5 23 10 7 21 19 23 24 16 14 6 20 5 10 17 7 17 19 21 13 12 12 7 20 24 16 15 10 17 10 5 19 9 14 7 21)			#(9 22 12 20 10 21 11 18 16 6 12 15 23 23 21 9 7 23 16 11 17 5 14 17 19 23 15 24 13 18 24 12 16 24 7 21 12 15 23 21 5 19 20 15 11 13 12 19 8 13)			#(21 24 19 18 17 12 13 20 5 17 21 6 16 20 22 13 17 11 14 22 16 14 7 10 22 8 8 11 12 12 12 11 9 11 5 11 22 14 13 15 9 16 5 10 8 24 15 17 20 7)			#(24 14 17 8 22 21 7 8 15 16 6 16 11 24 7 8 15 17 8 15 12 8 17 14 11 13 15 17 18 18 18 17 15 13 11 9 10 9 22 18 8 7 13 22 24 10 12 12 12 22)			#(18 23 20 19 18 22 20 18 16 5 13 20 17 19 11 14 22 11 13 12 5 16 20 12 16 19 22 24 25 26 25 24 22 19 16 12 11 10 7 6 11 14 24 19 10 5 9 6 19 9)			#(7 6 22 11 5 23 19 19 23 15 19 19 11 13 24 24 18 20 10 16 11 13 13 17 21 25 29 32 34 35 34 32 29 25 21 17 13 7 16 17 20 16 18 16 23 16 14 9 19 22)			#(12 21 10 12 17 16 12 19 19 8 15 15 8 8 9 22 5 6 23 22 17 12 17 22 28 33 38 42 45 46 45 42 38 33 28 22 17 12 12 23 9 21 7 11 24 16 10 7 13 22)			#(9 17 24 11 9 8 5 18 7 15 11 19 20 7 5 17 19 23 13 19 11 16 21 28 34 41 48 53 56 57 56 53 48 41 34 28 21 16 11 24 23 24 16 14 17 22 12 15 16 20)			#(6 7 5 20 12 13 16 24 17 5 18 23 18 10 21 13 15 13 16 6 13 19 25 33 41 50 57 63 67 68 67 63 57 50 41 33 25 19 13 16 18 12 10 11 15 18 12 13 22 15)			#(14 7 24 18 23 12 9 21 11 16 10 11 21 19 24 20 13 19 13 8 15 22 29 38 48 57 66 73 77 79 77 73 66 57 48 38 29 22 15 20 6 12 8 12 14 22 23 18 9 23)			#(17 16 23 13 8 8 6 6 5 19 16 12 21 9 17 19 15 19 17 11 17 24 32 42 53 63 73 80 85 87 85 80 73 63 53 42 32 24 17 11 16 22 20 14 14 15 16 23 13 15)			#(11 23 9 17 13 7 20 8 15 21 14 15 12 7 19 17 6 7 22 12 18 25 34 45 56 67 77 85 91 93 91 85 77 67 56 45 34 25 18 12 5 14 8 15 15 12 9 14 18 8)			#(19 15 23 16 6 10 18 10 20 16 9 5 17 8 15 19 9 16 9 12 18 26 35 46 57 68 79 87 93 94 93 87 79 68 57 46 35 26 18 12 14 6 20 19 16 17 9 23 19 7)			#(7 6 17 5 18 17 12 23 17 23 13 9 17 14 13 5 18 20 24 12 18 25 34 45 56 67 77 85 91 93 91 85 77 67 56 45 34 25 18 12 12 8 24 5 18 20 13 8 5 17)			#(9 14 17 6 6 8 14 11 10 9 20 7 12 19 5 17 24 18 6 11 17 24 32 42 53 63 73 80 85 87 85 80 73 63 53 42 32 24 17 11 14 5 16 12 20 20 9 10 23 22)			#(14 7 8 13 14 22 23 21 16 24 18 18 5 14 13 12 24 14 5 16 15 22 29 38 48 57 66 73 77 79 77 73 66 57 48 38 29 22 15 22 9 22 22 10 9 5 12 23 23 7)			#(12 20 18 6 20 9 15 7 15 6 21 7 9 16 8 20 16 21 19 16 13 19 25 33 41 50 57 63 67 68 67 63 57 50 41 33 25 19 13 13 16 16 18 10 21 22 13 19 6 16)			#(23 24 16 5 18 13 7 22 9 9 19 9 5 24 6 14 24 14 8 6 11 16 21 28 34 41 48 53 56 57 56 53 48 41 34 28 21 16 11 16 16 10 8 5 6 20 12 14 20 16)			#(17 15 20 14 11 14 16 22 5 7 15 23 20 6 5 5 17 13 23 20 5 12 17 22 28 33 38 42 45 46 45 42 38 33 28 22 17 12 23 19 10 24 19 16 22 15 16 7 17 7)			#(19 6 12 13 24 7 8 8 17 20 24 14 17 22 5 15 21 8 13 13 11 14 13 17 21 25 29 32 34 35 34 32 29 25 21 17 13 10 21 20 11 6 12 10 20 9 18 12 12 19)			#(21 8 22 20 19 5 11 8 24 8 13 11 18 8 24 11 23 13 15 20 12 8 16 12 16 19 22 24 25 26 25 24 22 19 16 12 13 15 9 15 19 12 6 7 6 7 9 14 14 24)			#(9 7 19 18 17 9 22 12 6 20 12 7 22 7 21 16 8 5 6 9 5 9 17 24 11 13 15 17 18 18 18 17 15 13 11 20 23 7 20 16 18 6 7 20 5 21 24 21 5 13)			#(14 22 8 12 16 22 8 21 14 21 6 24 9 16 14 24 15 19 17 22 11 15 12 10 15 13 16 11 12 12 12 11 14 6 18 11 11 7 16 13 10 17 13 14 23 11 6 5 14 22)			#(16 23 5 7 24 17 14 11 6 12 17 17 24 21 15 10 20 11 15 12 21 20 5 21 19 10 22 21 21 6 12 11 5 10 14 5 19 12 19 21 19 24 12 6 11 21 9 24 12 23)			#(12 19 12 20 17 5 16 19 5 11 12 13 19 21 13 17 14 12 18 8 10 15 20 22 14 22 6 16 9 24 9 7 19 10 18 9 22 7 12 13 12 16 16 24 19 22 11 18 18 9)			#(5 8 18 17 5 22 15 9 7 5 15 24 22 7 23 24 6 7 14 19 14 7 12 8 14 12 17 18 6 12 11 9 23 23 16 12 21 23 6 14 5 11 7 9 18 6 8 16 21 5)			#(13 23 8 16 7 9 6 22 7 17 15 10 5 7 23 17 11 24 15 20 6 5 19 23 12 12 22 20 8 10 8 6 9 24 5 6 24 22 23 19 18 10 11 22 18 13 19 10 9 14)			#(21 23 6 5 6 20 19 11 24 20 16 10 9 16 16 11 12 11 12 8 15 18 5 14 16 20 7 15 21 11 9 14 12 12 18 5 14 12 23 20 10 22 24 20 8 23 18 18 9 19)			#(15 16 24 6 9 20 19 19 11 17 15 17 11 18 17 14 21 23 17 18 19 11 5 12 7 12 12 14 14 17 17 20 20 10 7 9 11 12 9 19 13 12 8 15 11 22 15 7 22 23)			#(17 11 15 23 16 6 15 10 6 20 10 20 16 8 5 9 23 21 7 6 9 11 17 15 10 6 14 24 5 16 16 8 7 7 11 18 19 9 12 13 6 21 18 23 18 23 13 13 7 9)			#(5 20 10 19 14 20 23 24 11 24 12 13 24 19 12 7 12 9 8 21 22 22 17 10 7 21 24 17 10 15 21 13 10 19 6 14 23 12 14 12 7 16 11 15 24 22 16 15 11 13)			#(8 24 13 15 11 17 17 21 12 14 7 14 8 7 14 21 10 19 7 23 9 22 22 14 20 21 20 11 21 23 17 15 14 12 10 7 8 24 11 8 12 19 18 5 5 13 10 22 12 21)			#(19 18 8 7 15 20 23 9 21 18 18 17 24 19 19 9 8 16 16 18 19 18 16 17 21 6 17 12 5 21 5 22 15 7 23 24 11 19 15 13 20 9 9 23 11 14 13 19 12 16)	); 		placeRobot: (Robot new location: (Core.Point x: 2 y: 2); yourself)		yourself</body>

<body package="Competition" selector="board3">board3	^Board new		name: 'Board 3';		size: 50 @ 50;		endTime: 60;		cells: #(			#(26 15 18 22 23 15 19 13 28 27 18 19 17 23 24 13 26 23 29 17 28 20 24 20 19 12 19 29 14 18 17 14 20 16 22 13 18 29 28 22 12 10 22 11 12 11 12 16 24 15)			#(21 13 19 23 13 18 15 28 17 29 18 10 24 20 29 18 28 23 28 15 29 11 15 20 26 23 18 29 13 16 20 13 17 27 22 10 14 12 10 14 12 18 18 28 23 11 26 28 19 16)			#(29 25 58 62 65 68 71 72 73 74 73 72 71 68 65 62 11 18 21 17 19 13 10 24 29 16 16 19 11 15 21 24 26 24 19 14 18 15 15 13 13 18 10 28 19 15 16 11 12 22)			#(19 28 62 66 70 73 75 77 78 79 78 77 75 73 70 66 28 27 29 23 23 22 15 21 11 16 22 18 25 11 24 19 26 27 27 16 29 27 10 21 13 29 20 17 18 17 15 19 18 12)			#(28 27 65 70 73 77 80 82 83 83 83 82 80 77 73 70 15 21 23 23 22 12 19 24 27 11 28 28 26 18 12 25 28 10 27 19 16 18 27 22 29 27 13 28 29 21 19 14 20 18)			#(25 19 68 73 77 80 83 85 87 87 87 85 83 80 77 73 16 13 24 28 23 23 21 10 11 16 27 28 14 13 17 21 12 25 23 13 18 28 13 16 12 24 15 13 24 10 19 24 23 20)			#(15 12 71 75 80 83 86 89 90 90 90 89 86 83 80 75 18 16 25 20 27 22 27 18 20 17 17 26 22 19 26 12 12 11 24 26 20 29 23 20 24 25 25 13 24 20 17 14 27 23)			#(12 20 72 77 82 85 89 91 92 93 92 91 89 85 82 77 20 11 24 23 11 19 29 23 24 24 29 16 22 26 27 26 18 21 14 23 15 28 10 19 14 27 21 26 16 10 14 13 16 27)			#(22 22 73 78 83 87 90 92 94 94 94 92 90 87 83 78 28 23 10 25 14 15 16 22 13 15 18 16 16 19 13 24 22 18 24 11 27 16 27 19 22 13 14 21 15 28 28 19 14 19)			#(20 12 74 79 83 87 90 93 94 94 94 93 90 87 83 79 19 24 11 25 26 25 15 15 28 28 10 26 20 21 11 21 10 15 23 12 20 19 24 11 27 24 28 20 28 22 29 28 12 18)			#(11 16 73 78 83 87 90 92 94 94 94 92 90 87 83 78 14 13 27 24 22 24 23 28 23 19 25 21 21 12 18 21 18 10 19 26 11 28 24 27 29 14 14 29 29 27 24 24 16 20)			#(21 12 72 77 82 85 89 91 92 93 92 91 89 85 82 77 27 18 28 29 19 26 13 14 13 22 29 26 28 23 18 15 19 27 19 25 19 12 10 21 21 21 24 27 14 20 23 17 26 11)			#(11 28 71 75 80 83 86 89 90 90 90 89 86 83 80 75 21 17 28 24 22 12 25 11 22 14 12 25 12 26 11 21 25 10 10 16 28 10 17 15 29 16 19 23 27 19 28 17 28 24)			#(29 10 68 73 77 80 83 85 87 87 87 85 83 80 77 73 14 27 24 15 19 20 21 27 24 26 17 22 23 19 10 18 26 17 18 10 14 16 12 19 12 10 22 17 11 17 16 12 14 10)			#(26 15 65 70 73 77 80 82 83 83 83 82 80 77 73 70 24 25 17 11 22 29 16 28 24 28 19 12 25 10 26 14 20 20 28 26 23 20 17 22 15 17 13 20 28 15 20 24 13 20)			#(29 14 62 66 70 73 75 77 78 79 78 77 75 73 70 66 19 26 19 20 18 24 22 28 24 11 22 19 15 27 28 13 26 28 23 24 18 23 27 25 15 13 17 19 14 15 26 23 12 23)			#(16 14 19 22 27 27 17 20 21 26 25 15 12 13 14 11 15 13 26 26 13 23 22 14 15 12 12 13 29 24 19 25 29 12 26 11 17 19 12 20 20 29 17 11 18 13 16 24 29 28)			#(11 25 16 27 26 14 11 10 12 14 10 19 26 27 15 24 21 19 11 27 10 28 13 15 20 14 11 21 13 15 12 10 17 27 13 21 16 21 15 20 16 27 28 27 22 23 14 24 28 25)			#(27 10 22 25 26 26 29 13 11 22 14 29 10 15 11 14 11 28 21 27 26 16 10 28 20 19 14 14 28 22 10 17 11 23 19 24 16 13 11 13 10 18 19 28 13 26 10 24 10 12)			#(12 21 18 25 13 11 21 12 22 22 24 12 27 11 20 24 14 14 15 0 10 10 26 29 21 24 29 27 28 22 21 13 12 16 11 21 24 19 26 29 21 22 21 15 28 29 15 10 22 15)			#(26 21 24 29 11 22 17 24 20 22 14 20 12 14 23 23 24 16 28 25 21 10 24 15 24 22 13 25 14 29 26 20 17 12 15 22 28 16 22 26 22 14 23 14 18 25 28 22 17 12)			#(23 29 26 15 27 23 21 28 25 26 26 26 27 16 24 27 22 10 28 22 10 27 11 19 15 24 23 24 27 20 20 26 16 29 20 24 11 11 13 17 20 13 20 13 11 26 24 20 11 10)			#(11 10 23 11 12 14 27 26 17 17 22 15 29 11 26 17 24 20 18 25 12 24 13 22 11 27 11 20 25 16 11 12 16 27 21 11 16 26 12 14 19 14 16 27 25 17 28 17 26 10)			#(25 29 20 20 21 29 27 21 18 21 19 19 27 23 15 11 23 22 14 29 28 12 14 24 15 26 23 18 13 26 10 28 28 23 16 26 15 14 12 11 21 17 23 29 11 18 14 24 10 16)			#(27 11 15 24 12 27 14 24 27 23 16 28 20 17 12 17 19 22 28 23 11 10 24 26 11 18 17 15 26 12 27 25 26 21 12 17 18 18 18 24 11 17 29 29 17 12 24 13 27 21)			#(29 25 28 22 28 11 28 19 25 29 27 22 18 29 17 11 23 20 18 12 29 21 21 13 29 11 27 28 15 14 21 22 13 18 11 27 13 12 26 22 14 20 28 10 29 11 16 21 13 22)			#(27 14 21 24 10 16 22 29 24 22 14 26 10 20 20 18 22 25 15 23 29 14 13 28 12 12 11 18 24 29 10 19 10 23 23 27 21 23 27 29 11 21 13 25 17 17 11 12 15 20)			#(26 12 12 26 24 19 16 17 29 12 21 13 16 23 10 12 23 28 28 25 11 19 10 29 28 22 16 12 24 27 28 12 24 18 26 25 19 17 14 22 20 15 13 11 13 25 14 29 29 14)			#(10 27 15 16 11 27 14 23 16 22 18 16 29 16 12 18 24 11 11 25 10 13 26 15 21 12 19 24 25 27 28 22 20 20 28 28 27 19 28 21 22 27 26 24 23 28 14 19 23 25)			#(14 14 23 16 20 24 26 18 18 19 15 13 20 20 12 20 18 22 14 18 16 25 16 27 14 15 27 23 13 20 24 26 19 19 23 28 17 13 18 23 27 20 19 18 26 20 27 23 29 24)			#(11 14 26 19 12 12 26 16 18 17 28 15 23 26 22 29 19 12 18 27 25 21 23 20 11 14 24 21 17 15 25 22 22 17 25 19 27 13 16 19 21 21 18 20 10 18 17 24 12 17)			#(19 27 22 18 16 25 10 19 13 18 20 11 16 16 16 21 27 19 17 17 22 23 15 26 11 10 14 20 14 21 17 13 17 23 25 23 19 17 12 27 12 13 19 10 15 20 16 14 20 28)			#(20 16 17 21 27 25 11 25 24 16 20 27 26 18 11 23 28 23 23 15 23 22 18 13 11 18 28 21 23 13 13 21 20 22 14 12 18 10 28 18 15 20 23 19 24 14 29 10 11 10)			#(20 15 13 20 10 24 20 21 21 29 25 19 10 21 24 27 21 17 24 21 15 14 10 16 18 19 21 28 25 14 16 19 16 14 12 11 20 15 21 27 24 28 28 25 19 28 20 14 16 24)			#(23 19 11 24 14 16 14 24 13 16 23 26 11 10 28 25 21 28 13 18 27 17 16 10 26 27 19 14 11 11 13 18 24 23 27 22 21 14 19 17 17 21 24 21 29 22 19 23 13 11)			#(14 17 19 28 16 13 13 18 11 28 10 18 18 29 22 22 12 24 24 20 14 26 15 12 28 27 26 15 20 12 23 15 22 12 27 21 12 23 27 19 17 23 11 26 15 29 10 12 10 28)			#(28 12 26 22 24 22 21 16 22 14 13 21 21 22 14 23 15 28 20 27 14 28 20 14 26 10 12 26 13 13 29 14 25 10 10 29 24 18 17 11 23 15 20 21 26 25 19 19 24 25)			#(19 12 28 23 15 24 13 20 23 13 26 13 12 24 10 22 18 25 11 21 12 14 19 15 16 20 16 22 11 22 13 15 11 24 20 12 22 27 28 13 24 21 24 25 15 11 10 10 25 23)			#(24 29 15 23 22 28 19 26 20 19 20 24 11 23 17 28 23 23 16 12 29 13 21 13 13 16 24 14 17 13 29 22 10 25 19 28 20 26 21 17 27 15 21 29 24 13 19 11 13 22)			#(10 21 24 11 12 25 10 18 25 19 14 17 11 22 11 27 23 12 10 19 29 29 12 20 11 27 23 11 10 21 18 22 22 28 20 17 22 12 15 27 27 15 17 22 15 21 16 28 14 21)			#(28 24 16 29 11 23 16 20 28 26 17 23 26 12 12 22 17 23 22 22 10 13 25 15 18 10 11 21 12 20 17 28 14 24 18 11 11 25 15 25 16 26 27 23 17 11 20 20 23 21)			#(25 17 28 13 19 14 19 20 13 16 10 29 28 12 24 25 11 28 12 15 28 23 28 21 10 28 10 18 10 28 29 21 26 26 13 18 21 21 12 25 18 11 28 22 24 21 29 29 23 24)			#(17 11 13 13 23 25 23 25 12 24 19 11 22 12 13 16 16 18 23 12 10 15 27 12 26 11 21 24 25 24 24 22 17 29 13 19 24 25 25 26 19 16 20 18 13 20 11 14 17 13)			#(21 28 22 13 22 21 19 19 11 26 13 21 12 22 22 26 20 25 14 15 12 20 10 28 17 19 23 20 19 23 14 21 15 28 28 25 21 19 25 27 16 27 21 17 19 22 14 23 28 10)			#(21 13 28 22 27 26 25 16 23 25 18 16 23 27 25 25 29 15 26 23 15 14 28 22 16 28 24 19 22 11 22 16 19 16 23 20 21 24 11 10 22 27 12 17 26 20 14 12 26 10)			#(19 23 11 23 25 17 15 24 10 23 24 26 25 22 15 13 16 18 23 28 12 14 17 23 20 19 10 22 20 26 16 25 28 24 18 26 11 26 15 26 13 16 19 20 19 13 28 14 22 22)			#(22 23 27 17 25 15 24 16 29 25 18 16 28 17 15 20 21 13 14 17 16 25 26 15 24 24 22 25 19 20 13 16 13 19 14 19 17 14 21 22 21 22 13 11 10 14 12 25 13 19)			#(19 14 15 13 26 29 20 19 13 12 19 14 29 21 24 12 20 23 12 15 13 29 27 16 18 25 29 16 22 24 12 13 12 20 29 19 13 11 22 27 15 22 14 27 22 11 10 12 11 27)			#(20 26 10 21 10 10 23 29 19 28 27 24 27 11 17 17 10 23 24 16 28 10 10 29 16 24 28 26 13 27 26 26 21 24 18 16 25 14 28 18 23 13 17 11 23 27 19 29 29 24)			#(14 17 21 22 12 11 19 19 17 12 21 15 25 29 26 13 11 17 10 11 11 11 25 19 28 16 19 14 21 28 26 18 17 29 14 26 19 21 22 28 12 28 18 15 16 10 11 18 11 14)	); 		placeRobot: (Robot new location: (Core.Point x: 20 y: 20); yourself)		yourself</body>

<body package="Competition" selector="boardPhase3Sample1">boardPhase3Sample1	^Board new		name: 'Phase 4 Sample 1';		size: 50 @ 50;		endTime: 20;		cells: #(			#(6 5 10 14 5 10 8 9 6 8 11 8 9 11 6 12 5 12 5 7 6 13 9 9 5 10 14 12 14 7 10 12 11 7 10 12 5 12 8 7 11 5 12 11 6 9 13 14 6 7)			#(12 14 9 11 12 12 8 6 10 10 8 14 9 7 10 14 11 12 11 5 13 11 9 7 7 9 13 5 8 5 10 7 14 5 7 5 10 6 5 6 11 9 6 14 13 11 11 8 9 10)			#(6 7 7 12 9 10 9 10 9 10 10 11 9 14 8 9 8 13 14 14 9 14 9 5 12 11 5 14 10 12 14 14 11 14 6 5 14 5 9 11 8 11 13 10 10 14 10 6 14 9)			#(8 13 13 9 9 13 10 11 8 9 9 9 12 5 9 10 6 13 6 6 11 5 5 11 14 12 14 6 6 9 11 11 7 13 6 11 6 13 8 9 10 8 6 7 11 12 9 12 6 10)			#(13 7 9 5 14 14 13 14 6 7 9 10 14 9 7 14 11 13 10 7 10 9 14 7 11 6 14 6 10 11 7 12 16 18 19 18 16 12 6 13 5 6 14 7 6 9 8 13 7 9)			#(14 12 12 7 5 12 12 11 14 11 12 9 11 6 8 7 9 10 7 6 11 6 14 5 12 14 13 14 12 14 15 21 28 32 34 32 28 21 15 13 12 12 11 12 9 5 12 5 12 12)			#(10 11 14 14 11 #(#die) #(#die) #(#die) #(#die) 14 6 7 5 12 13 14 9 13 11 14 7 7 8 11 13 6 11 9 12 15 24 34 44 51 53 51 44 34 24 15 7 8 11 8 5 9 5 9 14 8)			#(6 13 5 6 13 #(#die) #(#warp 13 34) 2000 #(#die) 8 8 8 6 11 6 10 7 14 9 10 5 10 8 10 9 8 9 11 12 21 34 48 62 72 76 72 62 48 34 21 12 12 7 8 10 10 6 9 14 13)			#(9 12 6 9 13 #(#die) 2000 2000 #(#die) 12 9 8 10 12 13 6 5 10 14 12 13 10 10 8 13 6 9 8 16 28 44 62 80 93 98 93 80 62 44 28 16 9 12 14 6 12 10 8 11 5)			#(8 13 9 8 8 #(#die) 2000 2000 #(#die) 7 8 8 9 7 8 12 5 11 6 8 11 9 8 11 5 11 12 11 18 32 51 72 93 108 114 108 93 72 51 32 18 6 5 10 6 8 13 8 14 7)			#(8 11 11 7 11 #(#die) #(#die) #(#die) #(#die) 10 5 9 5 0 9 12 13 11 11 9 13 10 9 6 13 9 13 5 19 34 53 76 98 114 120 114 98 76 53 34 19 12 11 5 14 14 8 6 5 14)			#(10 10 7 9 7 10 13 7 6 14 9 8 7 6 5 14 7 11 5 12 13 7 11 11 7 13 8 7 18 32 51 72 93 108 114 108 93 72 51 32 18 8 8 6 13 7 14 9 6 14)			#(11 11 5 14 5 12 13 13 12 6 6 9 6 9 5 5 7 5 13 9 12 14 7 7 9 10 14 7 16 28 44 62 80 93 98 93 80 62 44 28 16 12 12 9 6 8 8 13 6 6)			#(12 6 12 9 9 5 11 6 12 8 8 9 8 12 5 10 6 12 5 5 8 14 7 12 6 9 5 12 12 21 34 48 62 72 76 72 62 48 34 21 12 10 9 13 11 12 11 7 11 5)			#(14 5 9 8 8 12 9 5 7 7 13 8 9 5 9 7 14 11 7 5 8 13 10 9 13 11 12 5 10 15 24 34 44 51 53 51 44 34 24 15 12 13 7 13 6 10 13 9 13 9)			#(8 13 12 11 10 14 13 6 12 13 14 11 8 10 14 6 11 12 8 5 9 6 5 7 11 6 9 14 8 14 15 21 28 32 34 32 28 21 15 14 7 8 6 11 14 9 7 6 12 5)			#(12 11 11 14 8 7 9 6 5 14 6 9 10 14 12 14 10 10 5 0 13 10 11 10 6 5 8 7 12 14 7 12 16 18 19 18 16 12 11 14 5 14 14 14 6 14 11 13 7 8)			#(12 11 11 12 14 9 7 8 10 12 7 7 11 14 10 5 7 8 5 8 13 11 8 6 9 6 11 13 10 13 14 6 8 10 11 10 12 7 12 7 6 13 6 10 9 6 5 9 9 6)			#(7 9 14 14 12 14 5 9 13 14 9 11 7 12 5 12 9 11 14 13 13 10 6 6 11 8 10 14 8 8 10 13 6 14 12 13 7 6 9 7 6 10 14 10 6 13 14 6 9 5)			#(14 5 11 6 5 5 8 13 13 8 7 13 14 12 7 14 12 8 13 11 10 6 5 10 6 12 5 13 7 9 14 9 12 6 10 7 13 7 7 8 10 13 10 7 8 11 8 14 5 8)			#(7 9 6 9 8 11 12 12 9 13 9 7 5 14 8 12 12 14 14 7 9 9 6 9 7 10 13 7 6 13 10 5 6 8 10 5 13 11 12 6 10 7 13 6 8 7 10 12 10 7)			#(14 10 10 10 6 6 10 11 12 6 11 14 10 5 11 6 9 14 12 12 12 9 14 8 11 14 12 11 8 8 8 10 10 7 12 9 14 9 10 11 8 13 6 14 13 13 8 11 9 10)			#(9 8 8 13 6 10 12 5 6 6 11 11 14 11 6 14 5 6 10 10 7 11 10 13 7 11 9 14 11 14 5 13 7 12 5 7 14 10 12 10 10 11 6 11 13 8 12 6 7 11)			#(13 7 7 6 5 13 8 13 10 9 8 8 13 10 12 11 8 14 10 6 6 11 14 11 9 13 14 9 8 10 8 11 7 6 9 11 11 12 13 6 8 9 8 8 14 5 7 13 12 6)			#(9 5 9 14 8 7 5 5 8 10 12 12 7 14 10 12 14 6 13 13 7 10 6 14 12 12 6 14 14 8 9 10 11 11 12 6 6 13 13 7 12 13 7 12 6 6 7 14 7 5)			#(12 5 10 12 13 6 7 13 5 12 5 14 7 12 8 14 10 14 10 10 7 9 6 8 7 12 8 11 6 10 11 5 11 6 10 5 14 12 13 10 10 8 9 9 11 6 8 7 7 9)			#(5 12 7 13 6 11 5 5 5 11 11 -12 -14 -15 -15 -15 -14 -12 11 6 6 7 5 9 9 5 6 14 9 5 10 8 7 8 12 9 5 11 5 12 7 11 8 14 8 9 14 5 9 8)			#(8 9 13 6 5 7 7 5 11 -12 -16 -19 -21 -23 -24 -23 -21 -19 -16 -12 8 6 12 14 13 10 5 9 12 8 14 5 12 14 14 12 8 13 10 12 12 9 10 8 5 14 10 9 9 12)			#(8 9 5 13 11 6 10 8 -14 -18 -23 -28 -31 -34 -35 -34 -31 -28 -23 -18 -14 13 8 9 8 8 5 5 13 14 10 13 6 14 10 11 5 10 5 10 7 10 7 12 7 11 8 10 7 13)			#(5 11 14 11 5 8 13 -14 -19 -26 -32 -38 -44 -47 -48 -47 -44 -38 -32 -26 -19 -14 12 5 9 7 11 10 12 11 8 12 13 7 8 6 5 14 7 14 11 10 5 9 9 12 8 7 7 11)			#(11 10 7 14 8 14 -12 -18 -26 -34 -43 -51 -58 -62 -64 -62 -58 -51 -43 -34 -26 -18 -12 6 6 12 7 6 10 6 8 12 12 11 6 11 6 10 6 13 9 11 10 10 9 14 9 10 12 7)			#(7 13 11 8 5 14 -16 -23 -32 -43 -53 -64 #(#jump 10) 39 43 39 29 -64 -53 -43 -32 -23 -16 13 5 9 6 6 10 11 12 9 5 12 11 9 5 10 10 12 11 8 6 12 6 6 6 10 11 9)			#(7 8 5 6 11 -12 -19 -28 -38 -51 -64 35 58 79 87 79 58 35 -64 -51 -38 -28 -19 -12 5 7 14 9 5 13 14 14 8 12 8 6 14 13 13 12 10 5 6 13 14 9 5 11 13 9)			#(6 8 14 11 7 -14 -21 -31 -44 -58 29 58 #(#warp 7 8) 130 144 130 96 58 29 -58 -44 -31 -21 -14 14 12 6 13 9 11 9 7 5 10 12 14 12 9 10 12 7 11 8 14 6 11 6 9 10 10)			#(13 8 9 12 6 -15 -23 -34 -47 -62 39 79 130 176 194 176 130 79 39 -62 -47 -34 -23 -15 6 6 7 13 10 13 5 9 8 9 14 12 12 8 13 8 12 10 13 5 7 10 14 7 8 6)			#(11 13 8 8 12 -15 -24 -35 -48 -64 43 87 144 194 215 194 144 87 43 -64 -48 -35 -24 -15 6 9 9 7 5 12 7 14 9 14 10 6 5 7 5 10 14 14 13 7 12 12 9 14 13 14)			#(10 11 13 11 13 -15 -23 -34 -47 -62 39 79 130 176 194 176 130 79 39 -62 -47 -34 -23 -15 7 9 14 11 12 12 5 10 11 8 13 11 13 5 13 12 13 9 13 5 12 8 7 6 14 13)			#(10 5 10 8 9 -14 -21 -31 -44 -58 29 58 96 130 144 130 96 58 29 -58 -44 -31 -21 -14 12 10 9 7 5 5 9 11 9 10 10 13 14 8 10 12 12 5 6 12 7 9 14 8 8 13)			#(13 8 6 13 11 -12 -19 -28 -38 -51 -64 35 58 79 87 79 58 35 -64 -51 -38 -28 -19 -12 11 13 5 10 13 10 7 9 6 5 7 13 11 9 8 11 7 11 6 9 14 5 8 6 10 8)			#(10 12 14 9 13 9 -16 -23 -32 -43 -53 -64 29 39 43 39 29 -64 -53 -43 -32 -23 -16 5 8 10 5 13 11 11 8 8 8 11 13 13 9 13 12 13 9 6 12 5 10 8 5 13 12 12)			#(8 11 8 6 6 10 -12 -18 -26 -34 -43 -51 -58 -62 -64 -62 -58 -51 -43 -34 -26 -18 -12 8 5 9 11 7 9 6 6 10 9 8 5 5 11 5 11 5 5 8 13 8 10 5 9 5 11 14)			#(6 11 9 5 11 11 7 -14 -19 -26 -32 -38 -44 -47 -48 -47 -44 -38 -32 -26 -19 -14 12 10 11 11 10 10 9 14 13 9 11 9 8 14 8 12 12 5 7 8 5 6 6 14 6 7 9 10)			#(10 14 6 14 14 9 12 11 -14 -18 -23 -28 -31 -34 -35 -34 -31 -28 -23 -18 -14 8 11 11 14 5 7 14 13 12 10 12 8 14 6 6 8 6 5 5 11 6 13 7 7 8 13 14 7 12)			#(8 12 10 14 10 14 5 9 11 -12 -16 -19 -21 -23 -24 -23 -21 -19 -16 -12 12 8 7 14 12 5 11 12 13 13 7 11 6 14 13 12 5 10 5 13 10 9 10 10 9 14 14 10 13 7)			#(10 10 13 7 8 11 13 14 11 8 13 -12 -14 -15 -15 -15 -14 -12 7 14 6 13 10 5 7 10 7 10 11 6 10 6 8 11 13 11 12 8 14 8 13 10 8 10 8 14 12 5 8 9)			#(13 5 8 8 14 9 12 7 10 8 7 13 10 13 8 6 8 12 7 11 8 8 11 13 10 6 7 7 5 11 8 6 9 6 6 12 8 5 7 8 14 9 9 6 11 9 8 7 6 13)			#(7 7 8 8 8 11 11 9 7 6 14 7 14 12 7 7 12 6 7 6 11 13 7 14 5 9 5 8 8 10 10 10 12 10 10 10 9 11 5 9 9 5 6 6 7 9 6 10 12 11)			#(9 13 13 8 8 12 14 9 10 9 12 9 12 5 14 9 7 10 13 14 9 12 12 5 13 11 9 9 5 7 12 8 6 11 5 13 13 13 11 11 6 7 14 9 5 12 8 5 9 7)			#(14 5 6 13 9 6 8 10 5 11 7 13 11 5 8 13 13 5 5 9 12 8 6 11 13 5 6 5 11 8 10 6 6 12 11 12 12 6 8 14 14 10 7 10 11 13 5 8 13 6)			#(8 13 6 11 14 6 10 5 5 9 7 13 10 11 12 8 14 5 11 11 8 5 14 10 10 10 5 11 11 5 8 12 12 11 10 10 10 9 11 7 14 11 7 6 13 13 10 10 11 5)	); 		placeRobot: (Robot new location: (Core.Point x: 14 y: 11); yourself)		yourself</body>

<body package="Competition" selector="board6">board6	^Board new		name: 'Board 6';		size: 50 @ 50;		endTime: 20;		cells: #(			#(14 11 28 26 15 18 18 10 10 28 20 20 14 15 10 20 11 21 11 20 26 26 24 12 29 15 11 17 26 27 29 22 15 13 14 22 26 27 10 29 17 16 13 26 21 20 13 11 11 26)			#(12 27 27 15 15 13 24 17 28 28 24 23 23 23 17 18 24 13 23 18 23 23 28 18 11 17 29 20 25 22 18 29 11 22 12 11 15 28 18 12 23 26 13 29 11 18 18 29 17 25)			#(19 23 12 10 20 20 28 12 24 24 15 22 19 23 20 21 18 23 10 28 17 19 28 23 25 18 21 21 27 13 12 22 11 16 19 18 18 20 27 25 12 19 12 28 25 27 23 29 12 15)			#(25 14 15 25 20 12 12 22 15 22 14 28 16 15 16 22 15 20 25 20 14 20 21 11 21 16 13 27 25 18 21 17 12 27 14 25 22 18 10 27 20 26 21 29 28 23 19 25 27 25)			#(16 23 17 13 23 23 29 21 26 22 29 13 15 22 22 12 25 22 27 16 19 16 21 15 13 10 24 14 24 10 17 29 23 28 23 12 27 29 20 29 15 26 23 21 29 23 28 28 26 28)			#(29 28 12 22 27 14 23 12 26 28 20 17 13 23 12 24 24 11 12 10 11 27 20 13 18 27 11 13 17 11 15 27 12 15 11 29 18 18 26 11 13 28 15 29 15 22 16 18 26 21)			#(10 10 23 10 22 15 24 26 20 18 25 14 20 14 13 27 14 27 16 23 28 15 16 12 10 20 11 17 23 12 11 23 23 10 20 24 16 19 20 12 25 18 20 14 22 26 11 29 20 18)			#(21 24 17 25 11 22 12 25 11 27 13 14 20 26 23 18 16 10 13 23 10 19 11 18 23 25 9 10 10 10 10 10 9 19 28 11 16 29 11 16 19 28 11 22 18 27 28 20 18 24)			#(29 27 11 26 26 16 19 20 18 16 12 22 23 28 11 29 10 25 15 10 13 21 16 11 10 12 13 14 14 15 14 14 13 12 10 12 23 17 23 15 13 10 12 25 26 25 20 12 29 13)			#(10 26 13 15 28 29 27 23 16 25 20 18 21 28 12 21 13 14 24 20 28 13 10 12 14 16 18 19 20 20 20 19 18 16 14 12 10 25 11 13 22 19 22 25 19 11 15 18 21 22)			#(14 21 25 20 16 10 15 16 19 15 16 20 14 23 11 18 15 29 20 24 10 10 13 16 18 21 23 25 26 27 26 25 23 21 18 16 13 10 19 20 14 24 18 14 26 26 29 19 18 15)			#(10 19 19 20 19 11 12 23 29 12 17 13 26 29 29 22 19 25 26 20 10 13 17 20 24 27 30 33 34 35 34 33 30 27 24 20 17 13 10 28 11 28 22 11 28 25 13 20 13 23)			#(28 14 25 25 29 22 20 15 18 20 14 27 24 28 20 12 13 22 11 10 13 17 21 25 30 34 38 41 43 43 43 41 38 34 30 25 21 17 13 10 23 17 17 18 12 13 15 28 26 11)			#(14 11 24 20 28 14 23 23 29 75 75 75 20 20 27 29 21 12 24 12 16 20 25 31 36 41 46 49 52 53 52 49 46 41 36 31 25 20 16 12 10 13 17 26 21 24 18 10 13 23)			#(20 26 24 26 15 26 13 14 75 75 3000 75 75 27 19 26 26 23 10 14 18 24 30 36 43 49 54 58 61 62 61 58 54 49 43 36 30 24 18 14 10 12 14 25 24 12 28 27 24 18)			#(11 28 12 25 11 15 21 23 75 75 3000 75 75 11 16 17 20 16 12 16 21 27 34 41 49 56 62 67 70 71 70 67 62 56 49 41 34 27 21 16 12 10 12 13 15 20 13 21 24 15)			#(18 18 23 24 18 23 21 22 14 75 75 75 28 26 22 21 21 9 13 18 23 30 38 46 54 62 69 74 77 78 77 74 69 62 54 46 38 30 23 18 13 9 28 26 20 15 27 18 29 19)			#(18 21 17 19 27 29 15 25 17 19 15 14 24 25 27 18 11 10 14 19 25 33 41 49 58 67 74 80 83 84 83 80 74 67 58 49 41 33 25 19 14 10 19 28 17 26 25 27 17 17)			#(14 17 18 15 22 21 10 24 25 13 23 19 28 16 20 15 24 10 14 20 26 34 43 52 61 70 77 83 87 88 87 83 77 70 61 52 43 34 26 20 14 10 13 27 29 14 12 19 21 16)			#(24 16 19 15 24 12 20 28 11 28 22 26 10 20 12 18 26 10 15 20 27 35 43 53 62 71 78 84 88 89 88 84 78 71 62 53 43 35 27 20 15 10 16 18 24 23 19 15 18 24)			#(11 26 13 13 22 28 29 21 25 25 10 13 24 28 18 13 28 10 14 20 26 34 43 52 61 70 77 83 87 88 87 83 77 70 61 52 43 34 26 20 14 10 21 26 24 13 27 14 16 23)			#(28 14 11 21 11 21 11 13 25 18 24 21 19 28 11 20 23 10 14 19 25 33 41 49 58 67 74 80 83 84 83 80 74 67 58 49 41 33 25 19 14 10 24 28 24 14 13 10 12 11)			#(11 23 17 20 22 19 26 26 26 25 12 12 16 28 17 17 27 9 13 18 23 30 38 46 54 62 69 74 77 78 77 74 69 62 54 46 38 30 23 18 13 9 24 22 17 29 22 23 25 19)			#(27 23 27 28 19 23 23 13 16 26 22 14 11 28 16 25 14 19 12 16 21 27 34 41 49 56 62 67 70 71 70 67 62 56 49 41 34 27 21 16 12 29 18 17 24 26 14 14 19 10)			#(25 25 24 10 24 26 16 24 18 18 14 18 10 27 14 10 17 24 10 14 18 24 30 36 43 49 54 58 61 62 61 58 54 49 43 36 30 24 18 14 10 10 24 20 19 23 10 22 19 13)			#(21 18 16 20 20 18 15 21 21 11 24 29 10 19 20 10 21 10 23 12 16 20 25 31 36 41 46 49 52 53 52 49 46 41 36 31 25 20 16 12 10 25 26 13 27 16 25 24 12 17)			#(15 20 16 12 25 21 22 10 24 13 29 27 11 16 27 28 18 28 16 10 13 17 21 25 30 34 38 41 43 43 43 41 38 34 30 25 21 17 13 10 21 14 21 25 11 22 20 23 22 19)			#(10 15 18 19 29 19 19 26 27 18 17 17 26 23 27 19 14 14 22 12 10 13 17 20 24 27 30 33 34 35 34 33 30 27 24 20 17 13 10 12 28 11 21 29 18 22 17 11 26 26)			#(12 19 24 27 16 28 24 23 19 15 19 15 21 26 17 11 11 26 27 26 11 10 13 16 18 21 23 25 26 27 26 25 23 21 18 16 13 10 27 21 10 12 26 15 29 12 12 22 25 22)			#(15 11 14 28 13 22 22 14 27 27 15 24 13 12 17 27 24 14 12 14 26 15 10 12 14 16 18 19 20 20 20 19 18 16 14 12 10 27 26 15 17 28 12 18 11 22 18 10 17 18)			#(29 28 17 13 22 25 22 11 18 26 23 17 26 19 28 16 17 22 10 29 10 16 29 25 10 12 13 14 14 15 14 14 13 12 10 15 25 22 10 22 26 23 23 27 16 15 12 28 26 28)			#(11 22 22 27 13 28 28 24 13 20 15 17 28 21 10 13 11 19 26 19 23 17 23 23 21 25 9 10 10 10 10 10 9 17 10 11 11 26 22 19 23 15 27 28 17 18 29 10 18 21)			#(25 20 14 26 15 11 20 19 23 27 19 12 13 20 25 26 17 29 22 26 17 26 21 21 10 10 19 29 16 25 18 17 10 23 25 18 25 11 0 17 11 14 21 10 11 22 17 23 17 20)			#(18 13 21 23 19 24 10 12 19 20 19 15 28 23 14 15 21 10 11 20 19 15 25 10 19 12 12 25 23 27 29 22 15 17 14 12 26 13 25 24 16 20 26 18 28 21 24 16 28 14)			#(29 28 28 29 11 29 23 18 15 12 17 12 23 28 20 18 21 23 26 26 20 14 25 21 19 29 26 18 15 14 17 9 12 14 14 14 12 9 21 26 15 10 20 19 14 20 13 26 14 16)			#(26 10 20 25 21 20 15 19 23 25 15 25 26 22 14 13 14 22 29 12 19 13 14 16 21 15 17 28 12 25 11 16 21 24 25 24 21 16 11 22 28 16 19 19 26 27 25 12 10 23)			#(13 28 29 13 10 17 22 17 24 29 23 19 14 26 29 27 17 23 23 17 18 12 24 23 15 20 29 20 25 11 18 25 33 38 40 38 33 25 18 11 20 20 23 24 18 27 20 22 20 28)			#(12 29 22 27 13 17 21 24 22 23 29 16 29 17 25 16 17 22 20 20 18 24 11 19 11 16 25 21 9 16 25 36 46 54 57 54 46 36 25 16 9 21 28 27 15 21 24 26 19 25)			#(22 25 24 25 13 27 15 16 28 14 12 28 15 24 26 19 16 28 21 13 24 23 14 20 14 18 20 12 12 21 33 46 60 70 73 70 60 46 33 21 12 18 15 15 16 18 29 23 20 20)			#(26 27 23 10 23 20 22 11 29 16 20 27 19 16 23 27 20 15 16 16 19 27 26 20 22 17 12 17 14 24 38 54 70 81 85 81 70 54 38 24 14 23 22 27 24 28 21 14 11 13)			#(18 13 20 24 22 16 12 27 28 25 25 22 24 26 29 13 15 12 19 18 26 22 19 18 21 16 28 23 14 25 40 57 73 85 90 85 73 57 40 25 14 24 26 18 15 16 23 16 20 16)			#(14 29 29 15 25 17 13 27 27 29 22 11 20 13 18 22 23 11 12 11 24 21 20 14 21 16 21 16 14 24 38 54 70 81 85 81 70 54 38 24 14 17 27 16 10 20 15 24 24 10)			#(18 28 15 27 27 29 10 28 23 14 26 27 10 16 26 24 19 20 15 14 12 16 20 12 10 22 17 12 12 21 33 46 60 70 73 70 60 46 33 21 12 24 24 10 29 14 11 24 29 16)			#(27 13 12 25 10 19 29 25 20 27 25 11 10 21 28 26 22 18 17 15 20 26 11 26 28 14 28 19 9 16 25 36 46 54 57 54 46 36 25 16 9 14 24 23 21 27 20 19 29 22)			#(26 29 26 13 26 15 13 12 19 28 24 25 25 12 10 15 12 14 28 27 22 27 27 26 14 24 25 20 29 11 18 25 33 38 40 38 33 25 18 11 10 23 17 29 16 17 14 20 25 24)			#(20 15 23 29 21 27 23 27 17 15 13 22 12 11 15 21 26 14 14 15 15 21 26 23 27 17 11 25 25 10 11 16 21 24 25 24 21 16 11 13 15 18 29 18 19 13 21 16 11 21)			#(12 29 15 20 26 15 19 28 27 26 16 28 25 21 16 24 10 16 17 28 10 10 15 17 29 14 29 10 28 27 28 9 12 14 14 14 12 9 25 14 25 16 16 11 10 25 16 12 25 26)			#(29 17 10 27 15 18 29 19 13 14 22 16 24 18 20 28 29 16 17 13 18 18 29 19 25 20 26 20 27 21 13 13 18 14 20 20 20 14 19 29 10 21 25 12 15 23 18 15 10 29)			#(25 26 13 25 21 22 12 10 28 11 12 28 27 26 15 20 24 25 19 21 12 27 17 27 14 11 27 11 20 18 29 22 25 22 13 28 26 25 26 21 22 27 24 25 28 18 26 16 12 19)			#(21 11 15 27 15 14 23 21 16 19 28 29 13 10 26 29 19 11 18 14 16 18 18 21 28 11 15 16 21 18 23 14 17 23 22 21 13 17 16 23 21 13 22 28 17 18 28 10 11 28)	); 		placeRobot: (Robot new location: (Core.Point x: 39 y: 33); yourself)		yourself</body>
</methods>


<methods>
<class-id>Board</class-id> <category>setup</category>

<body package="Competition" selector="placeRobot:">placeRobot: aRobot	self robot: aRobot</body>
</methods>

<methods>
<class-id>Board</class-id> <category>accessing</category>

<body package="Competition" selector="claimCell:">claimCell: aPoint	| value |	value := self at: aPoint.	self at: aPoint put: 0.	^value</body>
</methods>

<methods>
<class-id>Board</class-id> <category>accessing</category>

<body package="Competition" selector="name">name	^name</body>

<body package="Competition" selector="size">size	^size</body>

<body package="Competition" selector="robot:">robot: anObject	robot := anObject.	robot ifNotNil: [robot board: self]</body>

<body package="Competition" selector="cells">cells	^cells</body>

<body package="Competition" selector="normalizePoint:">normalizePoint: aPoint	^(aPoint x - 1 \\ size x + 1) @ (aPoint y - 1 \\ size y + 1)</body>

<body package="Competition" selector="at:">at: aPoint	| normalizedPoint |	normalizedPoint := self normalizePoint: aPoint.	^(cells at: normalizedPoint y) at: normalizedPoint x</body>

<body package="Competition" selector="at:put:">at: aPoint put: value	| normalizedPoint |	normalizedPoint := self normalizePoint: aPoint.	^(cells at: normalizedPoint y)		at: normalizedPoint x		put: value</body>

<body package="Competition" selector="time:">time: anObject	time := anObject</body>

<body package="Competition" selector="robot">robot	^robot</body>

<body package="Competition" selector="strategyClass:">strategyClass: aClass	self robot strategyClass: aClass</body>

<body package="Competition" selector="time">time	^time</body>

<body package="Competition" selector="endTime:">endTime: anObject	endTime := anObject</body>

<body package="Competition" selector="strategy:">strategy: aStrategy	self robot strategy: aStrategy</body>

<body package="Competition" selector="name:">name: anObject	name := anObject</body>

<body package="Competition" selector="endTime">endTime	^endTime</body>

<body package="Competition" selector="cells:">cells: anObject	cells := anObject collect: [:each | each copy]</body>
</methods>

<methods>
<class-id>Board</class-id> <category>testing</category>

<body package="Competition" selector="hasRobotAt:">hasRobotAt: aPoint	robot ifNil: [^false].	^robot isAt: aPoint</body>
</methods>

<methods>
<class-id>Board</class-id> <category>copying</category>

<body package="Competition" selector="postCopy">postCopy	^self		cells: (self cells collect: [:row | row copy]);		robot: robot copy;		yourself</body>
</methods>

<methods>
<class-id>Board</class-id> <category>actions</category>

<body package="Competition" selector="isFinished">isFinished	^self time &gt;= self endTime</body>
</methods>

<methods>
<class-id>Board</class-id> <category>enumerating</category>

<body package="Competition" selector="cellLocationsDo:">cellLocationsDo: aBlock	1 to: size x do: [:column |		1 to: size y do: [:row |			aBlock value: column @ row value: (self at: column @ row)]]</body>
</methods>

<methods>
<class-id>Board</class-id> <category>initialize-release</category>

<body package="Competition" selector="size:">size: aPoint	size := aPoint.	cells := (1 to: aPoint y) collect: [:each | Array new: aPoint x withAll: 0]</body>
</methods>

<methods>
<class-id>Board</class-id> <category>running</category>

<body package="Competition" selector="step:">step: stepSize	time := time + stepSize.	self robot step</body>

<body package="Competition" selector="step">step	self robot step</body>
</methods>

<methods>
<class-id>Board</class-id> <category>running</category>

<body package="Competition" selector="moveRobot">moveRobot	robot move.</body>
</methods>

<methods>
<class-id>Board</class-id> <category>initialize-release</category>

<body package="Competition" selector="initialize">initialize	time := 0.0s</body>
</methods>


<methods>
<class-id>Robot class</class-id> <category>instance creation</category>

<body package="Competition" selector="new">new	^super new initialize</body>
</methods>


<methods>
<class-id>Robot</class-id> <category>accessing</category>

<body package="Competition" selector="location:">location: anObject	location := anObject</body>

<body package="Competition" selector="strategyClass">strategyClass	^strategyClass</body>

<body package="Competition" selector="navigatorClass">navigatorClass	^navigatorClass ifNil: [BoardNavigator]</body>

<body package="Competition" selector="direction">direction	^direction</body>

<body package="Competition" selector="location">location	^location</body>

<body package="Competition" selector="strategyClass:">strategyClass: anObject	strategyClass := anObject</body>

<body package="Competition" selector="strategy:">strategy: aStrategy	strategy := aStrategy.</body>

<body package="Competition" selector="isSetup">isSetup	^isSetup</body>

<body package="Competition" selector="strategy">strategy	^strategy</body>

<body package="Competition" selector="score">score	^score</body>

<body package="Competition" selector="board">board	^board</body>

<body package="Competition" selector="score:">score: anObject	score := anObject</body>

<body package="Competition" selector="navigatorClass:">navigatorClass: aClass	navigatorClass := aClass</body>

<body package="Competition" selector="direction:">direction: anObject	direction := anObject</body>

<body package="Competition" selector="board:">board: anObject	board := anObject.	board at: self location put: 0</body>
</methods>

<methods>
<class-id>Robot</class-id> <category>testing</category>

<body package="Competition" selector="isAt:">isAt: aPoint	^location = aPoint</body>
</methods>

<methods>
<class-id>Robot</class-id> <category>moving</category>

<body package="Competition" selector="move:">move: aSymbol	aSymbol = #left ifTrue: [^self moveLeft].	aSymbol = #right ifTrue: [^self moveRight].	aSymbol = #up ifTrue: [^self moveUp].	aSymbol = #down ifTrue: [^self moveDown].	^nil</body>

<body package="Competition" selector="move">move	self move: self direction</body>

<body package="Competition" selector="claimCell">claimCell	score := score + (self board claimCell: location).</body>
</methods>

<methods>
<class-id>Robot</class-id> <category>moving</category>

<body package="Competition" selector="moveUp">moveUp	location := self navigator up location.	self claimCell</body>

<body package="Competition" selector="moveLeft">moveLeft	location := self navigator left location.	self claimCell</body>

<body package="Competition" selector="moveDown">moveDown	location := self navigator down location.	self claimCell</body>

<body package="Competition" selector="moveRight">moveRight	location := self navigator right location.	self claimCell</body>
</methods>

<methods>
<class-id>Robot</class-id> <category>initialize-release</category>

<body package="Competition" selector="initialize">initialize	location := 0@0.	score := 0.	isSetup := false</body>
</methods>

<methods>
<class-id>Robot</class-id> <category>running</category>

<body package="Competition" selector="step">step	strategy stepRobot: self.</body>
</methods>

<methods>
<class-id>Robot</class-id> <category>running</category>

<body package="Competition" selector="setup">setup	self isSetup ifTrue: [^self].	strategy isNil ifTrue: [strategy := self strategyClass new].	self strategy setupOn: self.	isSetup := true</body>

<body package="Competition" selector="navigator">navigator	^self navigatorClass new		location: location;		board: board;		yourself</body>
</methods>

<methods>
<class-id>Robot</class-id> <category>printing</category>

<body package="Competition" selector="storeOn:">storeOn: aStream	aStream		nextPut: $(;		nextPutAll: self class name;		nextPutAll: ' new location: ', self location storeString;		nextPutAll: '; yourself)'</body>
</methods>



<component-created>
<name>Competition UI</name> <type>package</type>
</component-created><!-- Package Competition UI(1.17,David)= -->


<component-created>
<name>Competition UI</name> <type>package</type>
</component-created>

<class>
<name>BoardController</name>
<environment>Smalltalk</environment>
<super>UI.Controller</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition UI</package>
</attributes>
</class>

<class>
<name>BoardUI</name>
<environment>Smalltalk</environment>
<super>UI.ApplicationModel</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>board view scoreHolder timeHolder running originalBoard filename file printConverter teamNameHolder hoverValueHolder </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition UI</package>
</attributes>
</class>

<class>
<name>BoardView</name>
<environment>Smalltalk</environment>
<super>UI.SimpleView</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>hoverValue hoverLocation </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition UI</package>
</attributes>
</class>

<methods>
<class-id>BoardUI class</class-id> <category>interface specs</category>

<body package="Competition UI" selector="windowSpec">windowSpec	"Tools.UIPainter new openOnClass: self andSelector: #windowSpec"	&lt;resource: #canvas&gt;	^#(#{UI.FullSpec} 		#window: 		#(#{UI.WindowSpec} 			#label: 'Robot Board UI' 			#min: #(#{Core.Point} 20 20 ) 			#max: #(#{Core.Point} 0 0 ) 			#bounds: #(#{Graphics.Rectangle} 468 62 1068 762 ) ) 		#component: 		#(#{UI.SpecCollection} 			#collection: #(				#(#{UI.ActionButtonSpec} 					#layout: #(#{Graphics.LayoutFrame} 2 0 37 0 54 0 58 0 ) 					#name: #stepButton 					#model: #step 					#label: 'Step' 					#defaultable: true ) 				#(#{UI.ArbitraryComponentSpec} 					#layout: #(#{Graphics.LayoutFrame} 0 0 60 0 0 1 0 1 ) 					#name: #boardView 					#component: #boardView ) 				#(#{UI.ActionButtonSpec} 					#layout: #(#{Graphics.LayoutFrame} 59 0 37 0 111 0 58 0 ) 					#name: #startButton 					#model: #start 					#label: 'Start' 					#defaultable: true ) 				#(#{UI.ActionButtonSpec} 					#layout: #(#{Graphics.LayoutFrame} 115 0 37 0 167 0 58 0 ) 					#name: #stopButton 					#model: #stop 					#label: 'Stop' 					#defaultable: true ) 				#(#{UI.ActionButtonSpec} 					#layout: #(#{Graphics.LayoutFrame} 171 0 37 0 223 0 58 0 ) 					#name: #resetButton 					#model: #reset 					#label: 'Reset' 					#defaultable: true ) 				#(#{UI.LabelSpec} 					#layout: #(#{Graphics.LayoutOrigin} 255 0 38 0 ) 					#name: #scoreLabel 					#label: 'Score' ) 				#(#{UI.InputFieldSpec} 					#layout: #(#{Graphics.LayoutFrame} 292 0 38 0 339 0 53 0 ) 					#name: #score 					#flags: 32 					#model: #scoreHolder 					#tabable: false 					#isReadOnly: true 					#type: #number 					#formatString: '0' ) 				#(#{UI.LabelSpec} 					#layout: #(#{Graphics.LayoutOrigin} 348 0 38 0 ) 					#name: #timeLabel 					#label: 'Time' ) 				#(#{UI.InputFieldSpec} 					#layout: #(#{Graphics.LayoutFrame} 382 0 35 0 455 0 50 0 ) 					#name: #timeField 					#flags: 32 					#model: #timeHolder 					#tabable: false 					#isReadOnly: true ) 				#(#{UI.InputFieldSpec} 					#layout: #(#{Graphics.LayoutFrame} -200 0.5 3 0 200 0.5 33 0 ) 					#name: #teamName 					#flags: 0 					#model: #teamNameHolder 					#tabable: false 					#alignment: #center 					#style: #large 					#isReadOnly: false ) 				#(#{UI.InputFieldSpec} 					#layout: #(#{Graphics.LayoutFrame} 496 0 37 0 597 0 52 0 ) 					#name: #hoverValue 					#flags: 32 					#model: #hoverValueHolder 					#alignment: #center 					#isReadOnly: true 					#type: #string ) 				#(#{UI.LabelSpec} 					#layout: #(#{Graphics.LayoutOrigin} 469 0 38 0 ) 					#name: #Label1 					#label: 'Cell' ) ) ) )</body>
</methods>


<methods>
<class-id>BoardUI</class-id> <category>accessing</category>

<body package="Competition UI" selector="boardView">boardView	^view ifNil: [view := BoardView new		model: board;		when: #changedHoverValue send: #updateHoverValue to: self;		yourself]</body>

<body package="Competition UI" selector="board:">board: anObject	originalBoard := anObject.	board := anObject copy</body>

<body package="Competition UI" selector="board">board	^board</body>
</methods>

<methods>
<class-id>BoardUI</class-id> <category>interface closing</category>

<body package="Competition UI" selector="noticeOfWindowClose:">noticeOfWindowClose: aWindow	running := false</body>
</methods>

<methods>
<class-id>BoardUI</class-id> <category>actions</category>

<body package="Competition UI" selector="reset">reset	board := originalBoard copy.	view model: board.	self update</body>

<body package="Competition UI" selector="startRunningProcess">startRunningProcess	[[running] whileTrue: 			[self timedStep]]			forkAt: Processor userInterruptPriority</body>

<body package="Competition UI" selector="recordOnFilename:">recordOnFilename: aFilename	filename := aFilename.</body>

<body package="Competition UI" selector="start">start	running := true.	filename ifNotNil: [		file := filename asFilename writeStream.		printConverter := PrintConverter for: #timestamp withFormatString: 'yyyy/dd/mm hh:mm:ss.ffff'.		file nextPutAll: board name;			nextPutAll: ' - ';			nextPutAll: board robot strategyClass teamName;			cr; nextPutAll: (printConverter formatStringFor: Timestamp now) asString;			cr].	self startRunningProcess</body>

<body package="Competition UI" selector="timedSetup">timedSetup	| setupProcess |	setupProcess := [		[board robot setup]				ifCurtailed: [self stop]] forkAt: Processor userBackgroundPriority - 1.	(Delay forMilliseconds: 1000) wait.	running ifTrue: [setupProcess terminate]</body>

<body package="Competition UI" selector="record:">record: aSymbol	file ifNotNil: [		file			nextPutAll: (printConverter formatStringFor: Timestamp now) asString;			nextPutAll: ' * ';			print: aSymbol;			cr].</body>

<body package="Competition UI" selector="timedStep">timedStep	| strategyProcess |	board robot isSetup ifFalse: [self timedSetup].	running		ifTrue: 			[strategyProcess := [[board step: 0.1s] ifCurtailed: [self stop]]						forkAt: Processor userInterruptPriority - 1.			(Delay forMicroseconds: 100000) wait.			running				ifTrue: 					[strategyProcess terminate.					board moveRobot.					self record: board robot direction.					[self update] uiEventFor: self builder window.					board isFinished ifTrue: [self stop]]]</body>

<body package="Competition UI" selector="step">step	board robot setup.	board step: 0.1s.	board robot setup; move.	self update</body>

<body package="Competition UI" selector="stop">stop	running := false.	file ifNotNil: [file close]</body>
</methods>

<methods>
<class-id>BoardUI</class-id> <category>interface opening</category>

<body package="Competition UI" selector="postBuildWith:">postBuildWith: aBuilder	running := false.	self update</body>
</methods>

<methods>
<class-id>BoardUI</class-id> <category>aspects</category>

<body package="Competition UI" selector="scoreHolder">scoreHolder	"This method was generated by UIDefiner.  Any edits made here	may be lost whenever methods are automatically defined.  The	initialization provided below may have been preempted by an	initialize method."	^scoreHolder isNil		ifTrue:			[scoreHolder := 0 asValue]		ifFalse:			[scoreHolder]</body>

<body package="Competition UI" selector="hoverValueHolder">hoverValueHolder	"This method was generated by UIDefiner.  Any edits made here	may be lost whenever methods are automatically defined.  The	initialization provided below may have been preempted by an	initialize method."	^hoverValueHolder isNil		ifTrue:			[hoverValueHolder := String new asValue]		ifFalse:			[hoverValueHolder]</body>

<body package="Competition UI" selector="teamNameHolder">teamNameHolder	"This method was generated by UIDefiner.  Any edits made here	may be lost whenever methods are automatically defined.  The	initialization provided below may have been preempted by an	initialize method."	^teamNameHolder isNil		ifTrue:			[teamNameHolder := String new asValue]		ifFalse:			[teamNameHolder]</body>

<body package="Competition UI" selector="timeHolder">timeHolder	"This method was generated by UIDefiner.  Any edits made here	may be lost whenever methods are automatically defined.  The	initialization provided below may have been preempted by an	initialize method."	^timeHolder isNil		ifTrue:			[timeHolder := String new asValue]		ifFalse:			[timeHolder]</body>
</methods>

<methods>
<class-id>BoardUI</class-id> <category>updating</category>

<body package="Competition UI" selector="updateHoverValue">updateHoverValue	self boardView hoverValue ifNil: [		self hoverValueHolder value: ''.		^self].	self hoverValueHolder value: self boardView hoverLocation printString, ' : ', self boardView hoverValue printString.</body>

<body package="Competition UI" selector="update">update	self teamNameHolder value: board robot strategyClass teamName.	self scoreHolder value: board robot score.	self timeHolder value: (board time printString copyWithout: $s), ' of ', (board endTime printString copyWithout: $s).	(self builder componentAt: #boardView) invalidate</body>
</methods>


<methods>
<class-id>BoardView class</class-id> <category>private-events</category>

<body package="Competition UI" selector="constructEventsTriggered">constructEventsTriggered	^super constructEventsTriggered		add: #changedHoverValue;		yourself</body>
</methods>


<methods>
<class-id>BoardView</class-id> <category>accessing</category>

<body package="Competition UI" selector="hoverLocation:">hoverLocation: anObject	^hoverLocation := anObject</body>

<body package="Competition UI" selector="hoverLocation">hoverLocation	^hoverLocation</body>

<body package="Competition UI" selector="hoverValue">hoverValue	^hoverValue</body>
</methods>

<methods>
<class-id>BoardView</class-id> <category>hovering</category>

<body package="Competition UI" selector="hoverLocationFor:">hoverLocationFor: aPoint	| innerBounds |	innerBounds := self bounds insetBy: self boardInset.	(innerBounds containsPoint: aPoint) ifFalse: [^nil].	^(((aPoint - innerBounds origin) / (innerBounds width asFloat @ innerBounds height asFloat)) * self model size) truncated + (1 @ 1).</body>

<body package="Competition UI" selector="hoverAtLocation:">hoverAtLocation: aPoint	| newHoverValue newHoverLocation |	self model isNil ifTrue: [^self].	newHoverLocation := self hoverLocationFor: aPoint.	newHoverLocation isNil ifTrue: [		self triggerEvent: #changedHoverValue.		^hoverValue := nil].		newHoverValue := self model at: newHoverLocation.	(newHoverValue = hoverValue and: [newHoverLocation = hoverLocation]) ifTrue: [^self].	hoverValue := newHoverValue.	hoverLocation := newHoverLocation.	self triggerEvent: #changedHoverValue</body>
</methods>

<methods>
<class-id>BoardView</class-id> <category>displaying</category>

<body package="Competition UI" selector="boxForCellAt:">boxForCellAt: aPoint	| innerBounds box |	innerBounds := self bounds insetBy: self boardInset.	box := ((aPoint x - 1) * innerBounds width // model size x)				@ ((aPoint y - 1) * innerBounds height // model size y)					+ innerBounds origin					corner: (aPoint x * innerBounds width // model size x)							@ (aPoint y * innerBounds height // model size y) + innerBounds origin.	^box</body>

<body package="Competition UI" selector="boardInset">boardInset	^20 @ 20</body>

<body package="Competition UI" selector="displayOn:">displayOn: aGraphicsContext	model isNil ifTrue: [^self].	model cellLocationsDo: [:point :value |		self displayCellOn: aGraphicsContext copy at: point color: (self colorOfCell: point value: value)]</body>
</methods>

<methods>
<class-id>BoardView</class-id> <category>displaying</category>

<body package="Competition UI" selector="colorOfCell:value:">colorOfCell: point value: value	(model hasRobotAt: point) ifTrue: [^ColorValue green].	value &gt; 100.0 ifTrue: [^ColorValue yellow].	^ColorValue red: 1.0 green: 1.0  - (value / 100.0) blue: 1.0  - (value / 100.0)</body>

<body package="Competition UI" selector="displayCellOn:at:color:">displayCellOn: aGraphicsContext at: aPoint color: aColor	| box |	box := self boxForCellAt: aPoint.	aGraphicsContext		paint: aColor;		displayRectangle: box;		paint: ColorValue black;		displayRectangularBorder: box.		(model hasRobotAt: aPoint)		ifTrue: 			[aGraphicsContext				paint: ColorValue black;				displayDotOfDiameter: box width * 0.6 at: box center]</body>
</methods>

<methods>
<class-id>BoardView</class-id> <category>initialize-release</category>

<body package="Competition UI" selector="initialize">initialize	super initialize.	hoverValue := 0</body>
</methods>

<methods>
<class-id>BoardView</class-id> <category>controller accessing</category>

<body package="Competition UI" selector="defaultControllerClass">defaultControllerClass	^BoardController</body>
</methods>


<methods>
<class-id>BoardController</class-id> <category>events</category>

<body package="Competition UI" selector="mouseMovedEvent:">mouseMovedEvent: event	view hoverAtLocation: (view globalPointToLocal: event point).</body>
</methods>



<component-created>
<name>Competition Administration</name> <type>package</type>
</component-created><!-- Package Competition Administration(1.11,David)= -->


<component-created>
<name>Competition Administration</name> <type>package</type>
</component-created>

<class>
<name>HighValueRegionStrategy</name>
<environment>Smalltalk</environment>
<super>Strategy</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>highValueRegions </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Administration</package>
</attributes>
</class>

<class>
<name>BoardPaintTracker</name>
<environment>Smalltalk</environment>
<super>UI.SelectionTracker</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Administration</package>
</attributes>
</class>

<class>
<name>BoardEditorView</name>
<environment>Smalltalk</environment>
<super>BoardView</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>paintValueHolder line value </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Administration</package>
</attributes>
</class>

<class>
<name>BoardEditorController</name>
<environment>Smalltalk</environment>
<super>BoardController</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>trackerClass </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Administration</package>
</attributes>
</class>

<class>
<name>BoardRobotTracker</name>
<environment>Smalltalk</environment>
<super>UI.SelectionTracker</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Administration</package>
</attributes>
</class>

<class>
<name>BoardHillTracker</name>
<environment>Smalltalk</environment>
<super>UI.SelectionTracker</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>location targetLocation value </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Administration</package>
</attributes>
</class>

<class>
<name>BoardDieTracker</name>
<environment>Smalltalk</environment>
<super>UI.SelectionTracker</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars></inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Administration</package>
</attributes>
</class>

<class>
<name>BoardWarpTracker</name>
<environment>Smalltalk</environment>
<super>UI.SelectionTracker</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>warp1 warp2 </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Administration</package>
</attributes>
</class>

<class>
<name>BoardJumpTracker</name>
<environment>Smalltalk</environment>
<super>UI.SelectionTracker</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>jumpValue </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Administration</package>
</attributes>
</class>

<class>
<name>ReplayFileStrategy</name>
<environment>Smalltalk</environment>
<super>Strategy</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>stream </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Administration</package>
</attributes>
</class>

<class>
<name>BoardEditorUI</name>
<environment>Smalltalk</environment>
<super>UI.ApplicationModel</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>valueHolder view board nameHolder endTimeHolder hoverValueHolder warpJumpHolder </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Administration</package>
</attributes>
</class>

<methods>
<class-id>BoardRobotTracker</class-id> <category>private</category>

<body package="Competition Administration" selector="setUpFor:">setUpFor: aMouseMovedEvent	| location |	location := controller view hoverLocationFor: aMouseMovedEvent point - controller view parent bounds origin.	(self controller view model hasRobotAt: location)		ifTrue: [self removeRobotAt: location]		ifFalse: [self addRobotAt: location].	self view invalidate</body>

<body package="Competition Administration" selector="addRobotAt:">addRobotAt: location	| robot |	robot := self controller view model robot.	robot isNil		ifTrue: [self controller view model placeRobot: (Robot new location: location; yourself)]		ifFalse: [			(robot isKindOf: Robot)				ifTrue: [self controller model						placeRobot: (CompositeRobot new							addRobot: robot;							yourself)].				self controller model robot addRobot: (Robot new location: location; yourself)].</body>

<body package="Competition Administration" selector="removeRobotAt:">removeRobotAt: location	| robot |	robot := self controller view model robot.	robot isNil ifTrue: [^self].	(robot isKindOf: Robot) ifTrue: [^self controller model robot: nil].		robot removeRobot: (robot robotAtLocation: location).	robot robots size = 1 ifTrue: [		self controller model placeRobot: robot robots first]</body>
</methods>


<methods>
<class-id>BoardHillTracker</class-id> <category>accessing</category>

<body package="Competition Administration" selector="value">value	^value</body>

<body package="Competition Administration" selector="value:">value: anObject	value := anObject</body>
</methods>

<methods>
<class-id>BoardHillTracker</class-id> <category>actions</category>

<body package="Competition Administration" selector="normalAt:mean:radius:">normalAt: x mean: mean radius: standardDeviation	^(1.0 / (standardDeviation * (2.0 * Float pi) sqrt) )		* ((x - mean) squared / (2.0 * standardDeviation squared)) negated exp</body>
</methods>

<methods>
<class-id>BoardHillTracker</class-id> <category>private</category>

<body package="Competition Administration" selector="trackSelectionFor:">trackSelectionFor: aPoint	targetLocation := controller view hoverLocationFor: aPoint.	controller view line: (LineSegment				from: (controller view boxForCellAt: location) center rounded				to: (controller view boxForCellAt: targetLocation) center rounded).	self view invalidate</body>

<body package="Competition Administration" selector="setUpFor:">setUpFor: aMouseMovedEvent	location := controller view hoverLocationFor: aMouseMovedEvent point - controller view parent bounds origin.	self view invalidate</body>

<body package="Competition Administration" selector="finishSelectionFor:">finishSelectionFor: aPoint	| radius board |	board := self controller view model.	radius := (targetLocation - location) r.	self controller view line: nil.	board size x negated // 2 to: board size x // 2 do: [:x |		board size y negated // 2 to: board size y // 2 do: [:y |			| normal |			normal := (self normalAt: (location dist: (x @ y + location)) mean: 0.0 radius: radius) * (2.0 * Float pi) sqrt * radius.			normal &gt; 0.1 ifTrue: [				board at: location + (x @ y) put: (normal * self controller view value) truncated]]].	self controller view invalidate.	super finishSelectionFor: aPoint</body>
</methods>


<methods>
<class-id>BoardDieTracker</class-id> <category>private</category>

<body package="Competition Administration" selector="trackSelectionFor:">trackSelectionFor: aPoint	| location |	location := controller view hoverLocationFor: aPoint.	self controller view model at: location put: #(die).	self view invalidate</body>
</methods>


<methods>
<class-id>BoardWarpTracker</class-id> <category>private</category>

<body package="Competition Administration" selector="setUpFor:">setUpFor: aMouseMovedEvent	| location |	location := controller view hoverLocationFor: aMouseMovedEvent point - controller view parent bounds origin.	self controller view model at: location put: (warp1 := Array with: #warp with: location x with: location y).	self view invalidate</body>
</methods>

<methods>
<class-id>BoardWarpTracker</class-id> <category>events</category>

<body package="Competition Administration" selector="redButtonPressedEvent:">redButtonPressedEvent: aMouseButtonEvent 	| location |	warp1 isNil ifTrue: [^super redButtonPressedEvent: aMouseButtonEvent].	location := controller view hoverLocationFor: aMouseButtonEvent point - controller view parent bounds origin.	self controller view model at: location put: (warp2 := Array with: #warp with: (warp1 at: 2) with: (warp1 at: 3)).	warp1 at: 2 put: location x.	warp1 at: 3 put: location y.		self view invalidate</body>

<body package="Competition Administration" selector="redButtonReleasedEvent:">redButtonReleasedEvent: aMouseButtonEvent	(warp1 notNil and: [warp2 notNil]) ifTrue: [^super redButtonReleasedEvent: aMouseButtonEvent]</body>
</methods>


<methods>
<class-id>BoardJumpTracker</class-id> <category>private</category>

<body package="Competition Administration" selector="setUpFor:">setUpFor: aMouseMovedEvent	| location |	location := controller view hoverLocationFor: aMouseMovedEvent point - controller view parent bounds origin.	self controller view model at: location put: (jumpValue := Array with: #jump with: nil).	self view invalidate</body>

<body package="Competition Administration" selector="finishSelectionFor:">finishSelectionFor: aPoint	| value |	super finishSelectionFor: aPoint.	value := Dialog request: 'Distance?' initialAnswer: '10'.	jumpValue at: 2 put: (value asNumber)</body>
</methods>

<methods>
<class-id>BoardJumpTracker</class-id> <category>accessing</category>

<body package="Competition Administration" selector="jumpValue">jumpValue	^jumpValue</body>

<body package="Competition Administration" selector="jumpValue:">jumpValue: anObject	jumpValue := anObject</body>
</methods>


<methods>
<class-id>ReplayFileStrategy class</class-id> <category>instance creation</category>

<body package="Competition Administration" selector="on:">on: filename	^self new		on: filename asFilename;		yourself</body>
</methods>


<methods>
<class-id>ReplayFileStrategy</class-id> <category>running</category>

<body package="Competition Administration" selector="stepRobot:">stepRobot: aRobot	| direction index |	stream atEnd ifTrue: [^aRobot direction: nil].	direction := stream peek.	(direction isKindOf: Array) ifFalse: [^aRobot direction: stream next].	aRobot direction: (direction at: (index := aRobot board robot robots indexOf: aRobot)).	index = aRobot board robot robots size ifTrue: [stream next]</body>
</methods>

<methods>
<class-id>ReplayFileStrategy</class-id> <category>instance creation</category>

<body package="Competition Administration" selector="on:">on: aFilename	| fileStream instructionStream |	fileStream := aFilename readStream.	instructionStream := WriteStream on: (Array new: 1000).	fileStream upTo: Character cr.	[fileStream atEnd] whileFalse: [		| direction |		fileStream upTo: $*.		direction := Compiler evaluate: (fileStream upTo: Character cr) trimSeparators.		instructionStream nextPut: direction ].	fileStream close.	^stream := ReadStream on: instructionStream contents</body>
</methods>


<methods>
<class-id>BoardEditorUI class</class-id> <category>interface specs</category>

<body package="Competition Administration" selector="windowSpec">windowSpec	"Tools.UIPainter new openOnClass: self andSelector: #windowSpec"	&lt;resource: #canvas&gt;	^#(#{UI.FullSpec} 		#window: 		#(#{UI.WindowSpec} 			#label: 'Board Editor' 			#min: #(#{Core.Point} 887 658 ) 			#max: #(#{Core.Point} 0 0 ) 			#bounds: #(#{Graphics.Rectangle} 517 191 1404 849 ) ) 		#component: 		#(#{UI.SpecCollection} 			#collection: #(				#(#{UI.ActionButtonSpec} 					#layout: #(#{Graphics.LayoutFrame} 11 0 6 0 63 0 27 0 ) 					#name: #newButton 					#model: #newBoard 					#label: 'New' 					#defaultable: true ) 				#(#{UI.ActionButtonSpec} 					#layout: #(#{Graphics.LayoutFrame} 11 0 31 0 63 0 52 0 ) 					#name: #loadButton 					#model: #load 					#label: 'Load' 					#defaultable: true ) 				#(#{UI.ActionButtonSpec} 					#layout: #(#{Graphics.LayoutFrame} 11 0 57 0 63 0 78 0 ) 					#name: #installButton 					#model: #install 					#label: 'Install' 					#defaultable: true ) 				#(#{UI.ActionButtonSpec} 					#layout: #(#{Graphics.LayoutFrame} 11 0 82 0 63 0 103 0 ) 					#name: #randomButton 					#model: #random 					#label: 'Random' 					#defaultable: true ) 				#(#{UI.ActionButtonSpec} 					#layout: #(#{Graphics.LayoutFrame} 11 0 108 0 63 0 129 0 ) 					#name: #hillButton 					#model: #hill 					#label: 'Hill' 					#defaultable: true ) 				#(#{UI.ActionButtonSpec} 					#layout: #(#{Graphics.LayoutFrame} 11 0 133 0 63 0 154 0 ) 					#name: #paintButton 					#model: #paint 					#label: 'Paint' 					#defaultable: true ) 				#(#{UI.ActionButtonSpec} 					#layout: #(#{Graphics.LayoutFrame} 11 0 159 0 63 0 180 0 ) 					#name: #robotButton 					#model: #placeRobot 					#label: 'Robot' 					#defaultable: true ) 				#(#{UI.ActionButtonSpec} 					#layout: #(#{Graphics.LayoutFrame} 11 0 184 0 63 0 205 0 ) 					#name: #dieButton 					#model: #dieCell 					#label: 'Die' 					#defaultable: true ) 				#(#{UI.ActionButtonSpec} 					#layout: #(#{Graphics.LayoutFrame} 11 0 210 0 63 0 231 0 ) 					#name: #warpButton 					#model: #warp 					#label: 'Warp' 					#defaultable: true ) 				#(#{UI.ActionButtonSpec} 					#layout: #(#{Graphics.LayoutFrame} 11 0 236 0 63 0 257 0 ) 					#name: #jumpButton 					#model: #jump 					#label: 'Jump' 					#defaultable: true ) 				#(#{UI.ArbitraryComponentSpec} 					#layout: #(#{Graphics.LayoutFrame} 80 0 60 0 -1 1 -1 1 ) 					#name: #boardEditor 					#component: #boardEditorView ) 				#(#{UI.SliderSpec} 					#layout: #(#{Graphics.LayoutFrame} 28 0 378 0 48 0 649 0 ) 					#name: #Slider1 					#model: #valueHolder 					#orientation: #vertical 					#start: 255 					#stop: -255 					#step: -5 ) 				#(#{UI.InputFieldSpec} 					#layout: #(#{Graphics.LayoutFrame} 13 0 351 0 65 0 372 0 ) 					#name: #value 					#model: #valueHolder 					#type: #number ) 				#(#{UI.InputFieldSpec} 					#layout: #(#{Graphics.LayoutFrame} 150 0 3 0 350 0 24 0 ) 					#name: #name 					#model: #nameHolder ) 				#(#{UI.LabelSpec} 					#layout: #(#{Graphics.LayoutOrigin} 105 0 5 0 ) 					#name: #name 					#label: 'Name' ) 				#(#{UI.LabelSpec} 					#layout: #(#{Graphics.LayoutOrigin} 373 0 5 0 ) 					#name: #Label1 					#label: 'End Time' ) 				#(#{UI.InputFieldSpec} 					#layout: #(#{Graphics.LayoutFrame} 429 0 3 0 529 0 24 0 ) 					#name: #endTime 					#model: #endTimeHolder 					#type: #number ) 				#(#{UI.LabelSpec} 					#layout: #(#{Graphics.LayoutOrigin} 333 0 39 0 ) 					#name: #cellValueLabel 					#label: 'Cell Value' ) 				#(#{UI.InputFieldSpec} 					#layout: #(#{Graphics.LayoutFrame} 390 0 35 0 540 0 56 0 ) 					#name: #hoverValueField 					#model: #hoverValueHolder ) ) ) )</body>
</methods>


<methods>
<class-id>BoardEditorUI</class-id> <category>aspects</category>

<body package="Competition Administration" selector="valueHolder">valueHolder	"This method was generated by UIDefiner.  Any edits made here	may be lost whenever methods are automatically defined.  The	initialization provided below may have been preempted by an	initialize method."	^valueHolder isNil		ifTrue:			[valueHolder := 0 asValue.			valueHolder onChangeSend: #changedValue to: self]		ifFalse:			[valueHolder]</body>

<body package="Competition Administration" selector="nameHolder">nameHolder	"This method was generated by UIDefiner.  Any edits made here	may be lost whenever methods are automatically defined.  The	initialization provided below may have been preempted by an	initialize method."	^nameHolder isNil		ifTrue:			[nameHolder := String new asValue]		ifFalse:			[nameHolder]</body>

<body package="Competition Administration" selector="boardEditorView">boardEditorView	^view ifNil: [view := BoardEditorView new		paintValueHolder: self valueHolder;		when: #changedHoverValue send: #updateHoverValue to: self;		yourself]</body>

<body package="Competition Administration" selector="hoverValueHolder">hoverValueHolder	"This method was generated by UIDefiner.  Any edits made here	may be lost whenever methods are automatically defined.  The	initialization provided below may have been preempted by an	initialize method."	^hoverValueHolder isNil		ifTrue:			[hoverValueHolder := String new asValue]		ifFalse:			[hoverValueHolder]</body>

<body package="Competition Administration" selector="updateHoverValue">updateHoverValue	self boardEditorView hoverValue ifNil: [		self hoverValueHolder value: ''.		^self].	self hoverValueHolder value: self boardEditorView hoverLocation printString, ' : ', self boardEditorView hoverValue printString.</body>

<body package="Competition Administration" selector="warpJumpHolder">warpJumpHolder	"This method was generated by UIDefiner.  Any edits made here	may be lost whenever methods are automatically defined.  The	initialization provided below may have been preempted by an	initialize method."	^warpJumpHolder isNil		ifTrue:			[warpJumpHolder := String new asValue]		ifFalse:			[warpJumpHolder]</body>

<body package="Competition Administration" selector="endTimeHolder">endTimeHolder	"This method was generated by UIDefiner.  Any edits made here	may be lost whenever methods are automatically defined.  The	initialization provided below may have been preempted by an	initialize method."	^endTimeHolder isNil		ifTrue:			[endTimeHolder := 0 asValue]		ifFalse:			[endTimeHolder]</body>
</methods>

<methods>
<class-id>BoardEditorUI</class-id> <category>accessing</category>

<body package="Competition Administration" selector="board:">board: anObject	board := anObject</body>

<body package="Competition Administration" selector="board">board	^board</body>
</methods>

<methods>
<class-id>BoardEditorUI</class-id> <category>actions</category>

<body package="Competition Administration" selector="random">random	| range rangeString random |	rangeString := Dialog request: 'Range' initialAnswer: '10 to: 30'.	rangeString isEmpty ifTrue: [^self].	range := Compiler evaluate: rangeString.	random := Random new.	1 to: board size x do: [:x |		1 to: board size y do: [:y |			board at: x @ y put: (random next * (range last - range first)) truncated + range first]].	self update</body>

<body package="Competition Administration" selector="dieCell">dieCell	self boardEditorView controller trackerClass: BoardDieTracker.</body>

<body package="Competition Administration" selector="hill">hill	self boardEditorView value: self valueHolder value.	self boardEditorView controller trackerClass: BoardHillTracker.</body>

<body package="Competition Administration" selector="update">update	self boardEditorView model: board.	self nameHolder value: board name.	self endTimeHolder value: board endTime.	(self builder componentAt: #boardEditor) invalidate.</body>

<body package="Competition Administration" selector="warp">warp	self boardEditorView controller trackerClass: BoardWarpTracker.</body>

<body package="Competition Administration" selector="load">load	| className selector |	className := Dialog request: 'Class?' initialAnswer: 'Board'.	className isEmpty ifTrue: [^self].	selector := Dialog request: 'Selector?' initialAnswer: 'boardXX'.	selector isEmpty ifTrue: [^self].	board := (Smalltalk at: className asSymbol) perform: selector asSymbol.	self update</body>

<body package="Competition Administration" selector="jump">jump	self boardEditorView controller trackerClass: BoardJumpTracker.</body>

<body package="Competition Administration" selector="newBoard">newBoard	| sizeString size |	sizeString := Dialog request: 'Size' initialAnswer: '20 @ 20'.	sizeString isEmpty ifTrue: [^self].	size := Compiler evaluate: sizeString.	(size isMemberOf: Point) ifFalse: [^self].	board := Board size: size.	self update</body>

<body package="Competition Administration" selector="install">install	| className selector stream |	board robot isNil ifTrue: [		Dialog warn: 'You need to add a robot first'.		^self].	board name: self nameHolder value.	board endTime: self endTimeHolder value.		className := Dialog request: 'Class?' initialAnswer: 'Board'.	className isEmpty ifTrue: [^self].	selector := Dialog request: 'Selector?' initialAnswer: 'boardXX'.	selector isEmpty ifTrue: [^self].	stream := WriteStream on: (String new: 1000).	stream nextPutAll: '&lt;?xml version="1.0"?&gt;&lt;st-source&gt;&lt;time-stamp&gt;From VisualWorksÂ®, 8.2.1 of 19 January, 2017 on 1 December, 2018 at 10:56:59 PM&lt;/time-stamp&gt;&lt;methods&gt;&lt;class-id&gt;', className, ' class&lt;/class-id&gt; &lt;category&gt;examples&lt;/category&gt;&lt;body package="Competition" selector="', selector, '"&gt;', selector, '	^', board storeString, '&lt;/body&gt;&lt;/methods&gt;&lt;/st-source&gt;'.	stream contents readStream fileIn</body>

<body package="Competition Administration" selector="paint">paint	self boardEditorView controller trackerClass: BoardPaintTracker.</body>

<body package="Competition Administration" selector="placeRobot">placeRobot	self boardEditorView controller trackerClass: BoardRobotTracker.</body>

<body package="Competition Administration" selector="new">new	| sizeString size |	sizeString := Dialog request: 'Size' initialAnswer: '20 @ 20'.	sizeString isEmpty ifTrue: [^self].	size := Compiler evaluate: sizeString.	(size isMemberOf: Point) ifFalse: [^self].	board := Board size: size.	self update</body>
</methods>

<methods>
<class-id>BoardEditorUI</class-id> <category>changing</category>

<body package="Competition Administration" selector="changedValue">changedValue	self boardEditorView value: self valueHolder value</body>
</methods>


<methods>
<class-id>HighValueRegionStrategy class</class-id> <category>identification</category>

<body package="Competition Administration" selector="teamName">teamName	^'David Buck'</body>
</methods>


<methods>
<class-id>HighValueRegionStrategy</class-id> <category>running</category>

<body package="Competition Administration" selector="setupOn:">setupOn: aRobot	highValueRegions := SortedCollection new.	self findHighValueRegionsFor: aRobot.</body>
</methods>


<methods>
<class-id>BoardPaintTracker</class-id> <category>private</category>

<body package="Competition Administration" selector="trackSelectionFor:">trackSelectionFor: aPoint	| location |	location := controller view hoverLocationFor: aPoint.	self controller view model at: location put: self controller view paintValueHolder value.	self view invalidate</body>
</methods>


<methods>
<class-id>BoardEditorView</class-id> <category>accessing</category>

<body package="Competition Administration" selector="line:">line: anObject	line := anObject</body>

<body package="Competition Administration" selector="paintValueHolder:">paintValueHolder: anObject	paintValueHolder := anObject</body>

<body package="Competition Administration" selector="paintValueHolder">paintValueHolder	^paintValueHolder</body>

<body package="Competition Administration" selector="line">line	^line</body>

<body package="Competition Administration" selector="value:">value: anObject	value := anObject</body>

<body package="Competition Administration" selector="value">value	^value</body>
</methods>

<methods>
<class-id>BoardEditorView</class-id> <category>controller accessing</category>

<body package="Competition Administration" selector="defaultControllerClass">defaultControllerClass	^BoardEditorController</body>
</methods>

<methods>
<class-id>BoardEditorView</class-id> <category>displaying</category>

<body package="Competition Administration" selector="displayOn:">displayOn: aGraphicsContext	super displayOn: aGraphicsContext.	line ifNotNil: [		aGraphicsContext paint: ColorValue black.		line displayStrokedOn: aGraphicsContext]</body>
</methods>


<methods>
<class-id>BoardEditorController</class-id> <category>events</category>

<body package="Competition Administration" selector="redButtonPressedEvent:">redButtonPressedEvent: event	trackerClass ifNil: [^self].	self selectEvent: event</body>
</methods>

<methods>
<class-id>BoardEditorController</class-id> <category>accessing</category>

<body package="Competition Administration" selector="trackerClass">trackerClass	^trackerClass</body>

<body package="Competition Administration" selector="trackerClass:">trackerClass: anObject	trackerClass := anObject</body>
</methods>

<methods>
<class-id>BoardEditorController</class-id> <category>event driven</category>

<body package="Competition Administration" selector="selectionTracker">selectionTracker	^trackerClass on: self</body>
</methods>


<methods>
<class-id>Board</class-id> <category>printing</category>

<body package="Competition Administration" selector="storeOn:">storeOn: aStream	aStream		nextPutAll: self class name;		nextPutAll: ' new'; cr;		tab; tab; nextPutAll: 'name: ', self name printString, ';'; cr;		tab; tab; nextPutAll: 'size: ', self size printString, ';'; cr;		tab; tab; nextPutAll: 'endTime: ', endTime printString, ';'; cr;		tab; tab; nextPutAll: 'cells: #('; cr.	self cells do: [:row |		aStream tab; tab; tab; store: row; cr].	aStream tab nextPutAll: '); ';	tab; tab; nextPutAll: 'placeRobot: ', robot storeString; cr;	tab; tab; nextPutAll: 'yourself'</body>
</methods>

<methods>
<class-id>Board</class-id> <category>running</category>

<body package="Competition Administration" selector="scoreFile:">scoreFile: aFilename	| file |	file := aFilename asFilename readStream.	[file atEnd] whileFalse: [		| direction |		file upTo: $*.		direction := Compiler evaluate: (file upTo: Character cr) trimSeparators.		self robot move: direction ].	file close.	^self robot score</body>
</methods>



<component-created>
<name>Competition Phase 2</name> <type>package</type>
</component-created><!-- Package Competition Phase 2(1.6,David)= -->


<component-created>
<name>Competition Phase 2</name> <type>package</type>
</component-created>

<class>
<name>Board</name>
<environment>Smalltalk</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>name size cells time robot endTime finishFlag </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Phase 2</package>
</attributes>
</class>

<methods>
<class-id>Board class</class-id> <category>examples</category>

<body package="Competition Phase 2" selector="boardPhase2Sample1">boardPhase2Sample1	^Board new		name: 'Phase 2 Sample 1';		size: 50 @ 50;		endTime: 30;		cells: #(			#(18 15 15 27 22 12 24 15 28 13 11 26 11 22 17 13 21 29 25 11 14 18 15 15 27 16 17 22 29 20 12 10 24 22 25 13 16 16 18 18 29 20 10 10 18 28 15 18 21 28)			#(16 26 20 23 22 13 22 16 14 25 12 28 28 11 27 11 17 17 29 14 10 28 20 14 11 17 11 24 20 23 23 10 10 14 16 20 25 14 12 18 29 29 23 29 29 15 17 10 27 26)			#(12 24 22 18 22 25 12 11 11 15 19 15 20 15 10 14 18 28 21 19 18 16 10 14 21 29 23 19 18 15 24 19 29 22 10 24 21 29 17 27 18 13 26 26 19 13 16 23 12 13)			#(17 12 18 17 24 21 17 11 27 10 23 25 12 17 18 16 16 12 24 26 29 20 27 28 12 24 17 27 24 29 26 18 19 15 22 15 21 12 16 28 14 14 20 28 27 27 19 26 18 18)			#(10 21 21 20 26 13 22 23 16 27 22 20 21 11 21 22 15 21 10 25 19 29 14 27 25 23 27 29 18 24 12 27 23 15 25 29 27 14 29 18 26 29 29 24 27 19 23 22 21 29)			#(29 24 27 27 21 26 27 17 26 25 16 18 18 22 21 15 10 20 22 24 12 23 16 12 21 16 18 22 13 23 14 15 16 24 14 16 19 15 25 12 21 15 15 19 22 11 24 25 27 11)			#(20 12 26 18 18 19 23 12 29 12 14 26 13 24 18 23 14 27 10 10 24 24 20 15 29 15 11 15 14 19 13 24 20 24 20 12 27 24 14 19 16 28 18 20 11 15 22 24 17 22)			#(20 20 29 15 26 16 26 25 22 16 11 15 15 19 18 27 24 25 12 12 23 20 28 18 15 15 25 28 15 15 19 11 10 18 22 21 11 22 25 24 26 27 17 18 12 25 20 11 17 22)			#(24 15 20 28 19 12 28 18 17 24 10 27 25 19 17 27 19 18 25 20 29 16 13 25 20 22 13 17 24 20 11 14 28 29 14 21 27 29 20 28 12 16 18 28 15 19 28 28 10 11)			#(25 19 29 0 13 12 26 11 16 14 24 23 12 24 12 10 29 19 -10 -11 -12 -12 -12 -11 -10 26 21 20 14 24 14 10 23 23 18 21 18 19 23 25 16 18 15 28 27 27 29 14 22 17)			#(17 23 12 24 12 10 12 11 28 28 11 20 14 25 15 23 -11 -13 -15 -16 -17 20 -17 -16 -15 -13 -11 22 21 22 16 23 14 27 22 13 11 20 28 23 26 23 28 13 22 13 12 20 24 18)			#(23 19 14 24 14 11 19 20 25 17 13 11 19 12 -10 -13 -16 -18 -21 -23 -24 20 -24 -23 -21 -18 -16 -13 -10 10 13 16 14 10 24 14 25 27 18 15 23 17 14 29 15 26 18 11 18 21)			#(18 16 19 26 19 10 29 20 29 23 27 29 27 -11 -14 -17 -21 -25 -28 -30 -32 20 -32 -30 -28 -25 -21 -17 -14 -11 13 17 29 11 28 29 19 27 27 26 27 14 25 12 13 20 29 27 25 29)			#(12 25 13 29 11 24 12 15 17 14 23 25 -10 -14 -18 -23 -27 -32 27 33 37 38 37 33 27 -32 -27 -23 -18 -14 -10 18 21 28 20 28 24 21 18 12 27 27 13 14 23 13 10 18 26 20)			#(26 14 22 12 29 28 10 13 19 25 10 22 -13 -17 -23 -28 -34 34 45 54 61 63 61 54 45 34 -34 -28 -23 -17 -13 19 24 27 27 23 11 27 27 11 26 18 24 12 19 21 21 16 29 12)			#(20 12 11 15 17 12 23 11 26 16 17 -11 -16 -21 -27 -34 37 52 68 83 93 97 93 83 68 52 37 -34 -27 -21 -16 -11 21 12 11 12 24 12 18 21 11 28 22 23 14 28 17 18 22 25)			#(24 28 20 17 28 14 22 10 29 17 21 -13 -18 -25 -32 34 52 74 97 118 132 137 132 118 97 74 52 34 -32 -25 -18 -13 19 19 11 15 25 16 16 16 11 22 25 15 28 22 11 14 22 17)			#(10 12 29 20 19 22 14 27 18 12 -10 -15 -21 -28 27 45 68 97 127 154 173 180 173 154 127 97 68 45 27 -28 -21 -15 -10 10 20 14 12 14 22 15 17 14 19 18 12 19 16 14 16 13)			#(11 29 19 10 23 12 12 19 11 14 -11 -16 -23 -30 33 54 83 118 154 187 210 218 210 187 154 118 83 54 33 -30 -23 -16 -11 17 22 17 22 11 20 10 28 25 26 28 25 18 27 22 18 13)			#(16 16 25 12 27 15 24 16 12 23 -12 -17 -24 -32 37 61 93 132 173 210 236 245 236 210 173 132 93 61 37 -32 -24 -17 -12 19 14 17 15 15 21 13 26 16 25 10 11 26 22 16 22 29)			#(14 24 23 24 27 15 26 14 20 22 -12 -17 -24 -33 38 63 97 137 180 218 245 255 245 218 180 137 97 63 38 -33 -24 -17 -12 21 16 23 22 26 17 16 11 13 28 25 19 15 18 12 15 27)			#(29 28 18 16 13 15 19 29 10 19 -12 -17 -24 -32 37 61 93 132 173 210 236 245 236 210 173 132 93 61 37 -32 -24 -17 -12 16 14 25 19 19 16 24 13 10 22 10 25 15 14 10 27 15)			#(18 14 14 27 20 29 24 17 25 18 -11 -16 -23 -30 33 54 83 118 154 187 210 218 210 187 154 118 83 54 33 -30 -23 -16 -11 24 21 14 24 24 11 22 13 17 14 25 16 22 25 29 25 14)			#(19 24 28 15 25 26 12 22 26 28 -10 -15 -21 -28 27 45 68 97 127 154 173 180 173 154 127 97 68 45 27 -28 -21 -15 -10 18 16 28 26 20 10 23 27 14 18 19 11 22 20 15 23 16)			#(20 18 22 14 28 23 24 28 20 10 14 -13 -18 -25 -32 34 52 74 97 118 132 137 132 118 97 74 52 34 -32 -25 -18 -13 12 15 15 29 16 28 28 13 16 24 16 20 19 24 25 25 16 13)			#(10 14 27 20 14 23 15 16 13 22 11 -11 -16 -21 -27 -34 37 52 68 83 93 97 93 83 68 52 37 -34 -27 -21 -16 -11 25 24 28 23 12 23 15 23 25 17 23 18 19 29 11 20 17 28)			#(25 26 17 19 23 22 10 26 28 15 18 29 -13 -17 -23 -28 -34 34 45 54 61 63 61 54 45 34 -34 -28 -23 -17 -13 14 11 15 19 19 27 11 26 13 19 10 16 27 29 28 21 17 17 26)			#(10 29 25 13 27 24 17 21 26 22 15 26 -10 -14 -18 -23 -27 -32 27 33 37 38 37 33 27 -32 -27 -23 -18 -14 -10 16 27 27 20 20 21 23 21 15 27 21 19 21 15 16 20 28 15 10)			#(14 23 20 19 22 28 13 12 24 19 21 29 24 -11 -14 -17 -21 -25 -28 -30 -32 -33 -32 -30 -28 -25 -21 -17 -14 -11 12 24 23 10 14 16 24 27 29 28 16 15 14 11 23 22 16 18 11 12)			#(12 26 20 11 21 11 19 20 11 21 21 23 12 23 -10 -13 -16 -18 -21 -23 -24 -24 -24 -23 -21 -18 -16 -13 -10 15 29 19 22 12 16 21 12 22 26 11 29 11 21 16 28 27 19 26 24 17)			#(18 27 16 24 27 12 14 26 19 22 18 26 18 16 25 14 -11 -13 -15 -16 -17 -17 -17 -16 -15 -13 -11 26 18 27 14 11 14 13 10 28 13 17 13 17 18 29 26 25 15 24 15 12 11 27)			#(18 21 15 18 13 10 28 14 20 15 28 18 29 18 17 13 24 14 -10 -11 -12 -12 -12 -11 -10 10 17 21 15 20 10 12 17 27 25 17 22 21 29 16 18 17 28 27 19 25 20 14 21 22)			#(12 14 19 23 13 11 11 12 24 19 10 22 29 12 26 18 12 21 20 19 29 21 10 18 26 29 24 29 13 13 20 18 16 22 26 13 27 14 23 29 14 18 29 24 14 26 11 28 15 26)			#(10 14 10 29 27 21 27 27 24 23 19 26 19 28 10 16 25 10 10 19 21 26 19 13 17 25 25 24 25 18 26 13 22 16 10 14 15 21 22 20 24 26 26 24 17 23 20 22 10 12)			#(27 19 24 18 24 26 17 15 27 21 12 12 12 10 26 18 12 20 14 10 25 19 23 12 17 20 16 16 28 10 22 15 15 19 13 27 15 23 28 22 28 11 27 26 25 20 14 11 12 27)			#(26 11 14 20 26 21 26 17 28 13 21 12 23 23 22 24 17 28 25 10 11 16 16 10 24 24 12 12 21 17 21 28 14 23 15 16 18 23 11 27 17 27 19 14 21 21 22 26 12 27)			#(26 12 29 29 14 20 27 27 21 15 11 20 23 18 27 26 17 22 12 19 13 12 17 11 29 17 25 18 27 27 23 13 15 21 21 20 21 27 11 12 22 19 16 20 29 21 21 15 25 25)			#(23 20 23 23 13 24 17 11 22 24 25 12 29 20 20 29 29 13 28 16 17 16 18 11 21 12 21 11 11 28 26 18 14 27 29 26 19 14 11 22 26 23 16 13 22 27 18 11 16 23)			#(11 17 17 17 14 13 29 21 23 29 23 11 22 28 29 13 18 22 13 27 19 14 29 14 29 27 21 28 19 18 25 24 19 27 27 10 14 15 12 25 14 18 27 12 12 13 11 28 29 22)			#(28 20 28 25 28 29 28 18 24 26 12 16 22 23 18 20 14 14 18 22 27 29 20 24 23 19 10 20 12 18 19 26 12 14 13 19 29 20 26 19 11 23 17 19 14 23 27 24 27 27)			#(14 16 21 17 14 23 12 16 12 18 15 10 12 20 10 18 14 25 22 15 24 21 29 17 28 15 24 25 19 18 15 24 11 26 14 12 13 25 29 29 21 28 23 24 18 27 16 21 16 13)			#(13 14 14 17 22 19 28 28 18 19 12 13 10 11 25 27 11 29 20 24 14 13 15 12 15 29 26 23 14 16 25 16 19 12 21 17 17 15 22 20 23 26 25 26 18 20 22 12 13 23)			#(25 17 16 23 17 15 23 11 23 22 17 17 17 15 12 29 28 26 18 23 28 14 28 27 11 24 17 27 17 26 13 28 23 25 22 25 16 13 10 20 27 10 24 16 15 29 26 11 18 27)			#(10 25 28 24 29 15 28 28 21 12 17 14 13 16 21 24 21 21 13 13 15 18 12 12 14 10 12 18 22 27 27 13 20 22 20 11 14 26 27 23 17 18 10 26 16 14 15 22 15 13)			#(25 14 23 10 23 17 29 20 21 21 26 15 14 27 26 21 25 25 11 22 28 12 29 19 25 28 27 28 16 24 23 18 27 17 12 10 10 20 15 27 25 12 19 13 27 23 16 11 21 18)			#(19 13 29 13 27 26 19 16 26 26 29 20 27 15 22 18 28 14 17 20 10 22 26 12 24 22 12 12 21 15 25 21 15 28 12 11 21 15 10 28 10 18 29 23 19 17 27 22 24 12)			#(20 22 13 11 17 29 17 24 27 12 11 23 14 17 10 29 28 23 27 15 28 18 19 10 15 15 25 11 17 17 16 20 19 11 20 25 13 15 24 20 11 22 22 11 19 19 25 12 16 23)			#(23 21 27 21 18 10 17 12 17 21 25 12 13 10 23 23 28 29 16 22 15 28 12 13 21 23 18 21 25 18 11 29 29 22 19 17 27 28 22 24 21 27 28 27 23 17 27 13 26 24)			#(12 23 13 19 22 12 25 11 24 21 22 15 16 12 20 17 10 18 22 22 24 18 29 21 12 13 14 17 24 16 18 13 22 11 24 25 18 23 16 14 19 28 13 22 24 23 10 24 24 13)			#(12 27 11 22 19 24 29 18 23 16 28 23 27 22 29 23 24 12 19 21 26 11 10 22 16 23 10 26 19 24 14 17 21 14 12 16 29 15 14 25 28 23 17 13 25 15 25 15 18 14)	); 		placeRobot: (Robot new location: (Core.Point x: 4 y: 10); yourself)		yourself</body>
</methods>


<methods>
<class-id>Board</class-id> <category>actions</category>

<body package="Competition Phase 2" selector="isFinished">isFinished	^finishFlag		or: [self time &gt;= self endTime		or: [self robot score &lt; 0]]</body>

<body package="Competition Phase 2" selector="markFinished">markFinished	finishFlag := true</body>
</methods>

<methods>
<class-id>Board</class-id> <category>initialize-release</category>

<body package="Competition Phase 2" selector="initialize">initialize	time := 0.0s.	finishFlag := false</body>
</methods>


<methods>
<class-id>BoardView</class-id> <category>displaying</category>

<body package="Competition Phase 2" selector="colorOfCell:value:">colorOfCell: point value: value	(model hasRobotAt: point) ifTrue: [^ColorValue green].	value isInteger ifFalse: [^ColorValue black].	value &gt; 100.0 ifTrue: [^ColorValue yellow].	value &lt; -100.0 ifTrue: [^ColorValue blue].	value &lt; 0 ifTrue: [^ColorValue red: 1.0  - (value negated / 100.0) green: 1.0  - (value negated / 100.0) blue: 1.0].	^ColorValue red: 1.0 green: 1.0  - (value / 100.0) blue: 1.0  - (value / 100.0)</body>
</methods>


<methods>
<class-id>Robot</class-id> <category>moving</category>

<body package="Competition Phase 2" selector="hasDied">hasDied	^score &lt; 0 </body>
</methods>

<methods>
<class-id>Robot</class-id> <category>moving</category>

<body package="Competition Phase 2" selector="claimCell">claimCell	score := score + (self board claimCell: location).	self hasDied ifTrue: [self markDead].</body>

<body package="Competition Phase 2" selector="move:">move: aSymbol	aSymbol = #left ifTrue: [^self moveLeft].	aSymbol = #right ifTrue: [^self moveRight].	aSymbol = #up ifTrue: [^self moveUp].	aSymbol = #down ifTrue: [^self moveDown].	aSymbol = #stop ifTrue: [^self board markFinished].	^nil</body>
</methods>



<component-created>
<name>Competition Phase 3</name> <type>package</type>
</component-created><!-- Package Competition Phase 3(1.10,David)= -->


<component-created>
<name>Competition Phase 3</name> <type>package</type>
</component-created>

<class>
<name>Robot</name>
<environment>Smalltalk</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>location score board direction strategyClass strategy isSetup navigatorClass isDead </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Phase 3</package>
</attributes>
</class>

<class>
<name>BoardNavigator</name>
<environment>Smalltalk</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>board location dead action </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Phase 3</package>
</attributes>
</class>

<methods>
<class-id>Robot</class-id> <category>moving</category>

<body package="Competition Phase 3" selector="move">move	self isDead ifTrue: [^self].	self move: self direction</body>
</methods>

<methods>
<class-id>Robot</class-id> <category>accessing</category>

<body package="Competition Phase 3" selector="markDead">markDead	isDead := true</body>
</methods>

<methods>
<class-id>Robot</class-id> <category>testing</category>

<body package="Competition Phase 3" selector="isDead">isDead	^isDead</body>
</methods>

<methods>
<class-id>Robot</class-id> <category>running</category>

<body package="Competition Phase 3" selector="hasDied">hasDied	^score &lt; 0 or: [(board at: location) = #(die)]</body>

<body package="Competition Phase 3" selector="step">step	self isDead ifTrue: [		direction := nil.		^self].	strategy stepRobot: self.</body>
</methods>

<methods>
<class-id>Robot</class-id> <category>initialize-release</category>

<body package="Competition Phase 3" selector="initialize">initialize	location := 0@0.	score := 0.	isSetup := false.	isDead := false</body>
</methods>


<methods>
<class-id>BoardNavigator</class-id> <category>accessing</category>

<body package="Competition Phase 3" selector="action:">action: anObject	action := anObject</body>

<body package="Competition Phase 3" selector="action">action	^action</body>

<body package="Competition Phase 3" selector="markDead">markDead	dead := true</body>

<body package="Competition Phase 3" selector="markAlive">markAlive	dead := false</body>
</methods>

<methods>
<class-id>BoardNavigator</class-id> <category>testing</category>

<body package="Competition Phase 3" selector="isDead">isDead	^dead ifNil: [false]</body>
</methods>

<methods>
<class-id>BoardNavigator</class-id> <category>navigating</category>

<body package="Competition Phase 3" selector="moveBy:">moveBy: delta	location := board normalizePoint: location + delta.	action := board at: location.	(action isKindOf: Array) ifFalse: [^self].	action first = #warp ifTrue: [^location := (action at: 2) @ (action at: 3) ].	action first = #die ifTrue: [self markDead].	action first = #jump ifTrue: [		action last timesRepeat: [location := board normalizePoint: location + delta]		]</body>
</methods>


<methods>
<class-id>Board class</class-id> <category>examples</category>

<body package="Competition Phase 3" selector="boardPhase3Sample2">boardPhase3Sample2	^Board new		name: 'Phase 3 Sample 2';		size: 50 @ 50;		endTime: 20;		cells: #(			#(9 14 7 7 9 5 6 12 7 12 14 10 7 12 14 11 5 10 13 6 12 9 11 10 13 9 9 8 14 12 9 7 10 6 9 7 6 8 8 9 11 10 10 13 14 12 14 9 11 9)			#(10 12 6 10 14 7 6 11 12 8 8 11 11 8 11 11 8 11 11 7 12 12 11 14 11 12 11 11 7 13 7 8 9 13 5 14 14 5 6 7 7 10 10 14 8 10 13 6 8 8)			#(5 11 13 14 8 9 11 13 9 5 8 8 12 13 14 14 5 5 14 5 9 13 8 9 9 5 7 9 12 5 8 6 12 5 13 13 9 6 7 5 14 14 12 13 14 10 12 10 9 11)			#(5 11 7 5 #(#die) #(#die) #(#die) 10 12 8 12 6 6 11 9 11 5 11 6 6 11 7 11 5 13 12 6 9 12 13 7 5 14 13 6 11 8 6 7 7 8 12 12 11 12 9 12 11 10 9)			#(6 11 10 6 #(#die) 2000 #(#die) 8 14 14 7 10 11 12 5 14 10 13 8 5 10 8 12 10 13 14 6 8 14 6 13 8 11 12 11 9 5 8 5 5 9 7 9 13 5 12 5 12 12 13)			#(7 13 5 7 #(#die) 2000 #(#die) 9 11 14 12 12 5 9 11 9 10 12 7 9 5 8 11 14 13 6 8 14 12 7 10 7 8 9 14 11 6 7 7 12 10 9 9 9 12 9 7 6 8 10)			#(14 11 8 12 #(#die) #(#die) #(#die) 13 11 8 7 8 7 13 11 14 8 14 5 11 8 5 8 6 11 11 7 7 13 10 6 14 10 9 7 9 12 7 8 13 12 7 14 10 11 6 9 5 9 10)			#(14 8 5 9 6 13 14 9 13 8 10 11 5 9 5 5 5 8 6 7 14 5 7 11 14 14 7 14 13 11 9 12 13 13 11 13 10 14 7 8 9 12 6 6 7 10 10 14 11 12)			#(5 12 7 5 #(#die) #(#die) #(#die) 6 9 6 8 14 10 9 14 6 7 11 9 12 13 12 14 7 8 12 7 9 6 5 5 11 12 12 8 6 6 7 10 14 14 10 10 11 14 12 7 14 11 7)			#(9 7 11 13 #(#die) #(#jump 4) #(#die) 8 6 13 5 6 6 6 6 12 12 5 5 6 13 9 7 7 14 7 12 11 8 9 5 9 13 10 11 12 12 6 6 11 5 14 14 14 8 7 9 9 8 13)			#(7 9 13 6 #(#die) 2000 #(#die) 8 12 6 11 13 7 14 8 13 10 9 8 11 6 7 6 14 10 14 12 5 5 5 7 12 12 11 6 12 7 12 9 8 11 5 9 10 9 13 10 13 11 10)			#(6 7 5 5 #(#die) #(#warp 6 16) #(#die) 5 9 8 9 11 12 11 11 14 9 9 12 7 7 6 8 7 6 5 5 8 6 10 9 6 13 9 9 12 8 12 13 10 8 14 5 13 14 12 14 10 9 8)			#(14 8 9 9 #(#die) #(#die) #(#die) 14 10 8 6 8 9 7 10 9 8 13 14 9 5 12 12 10 10 14 10 11 14 6 9 14 11 9 11 12 13 14 7 13 13 10 8 5 7 8 11 11 7 13)			#(5 12 14 9 6 5 5 10 8 14 8 5 12 5 10 6 14 10 11 11 7 10 14 13 6 12 10 11 12 6 11 11 5 5 13 8 12 8 11 6 8 6 8 11 12 9 6 13 5 11)			#(14 9 7 5 #(#die) #(#die) #(#die) 5 10 8 8 12 6 14 6 5 14 12 11 10 11 7 11 7 11 12 5 5 11 8 8 7 5 10 8 14 14 8 7 7 9 6 11 8 13 10 14 9 12 11)			#(6 12 13 14 #(#die) #(#warp 6 12) #(#die) 7 12 12 8 14 13 11 13 11 8 12 9 12 9 13 6 10 6 9 6 8 5 13 14 8 9 11 7 9 14 14 14 11 10 7 14 7 9 14 5 12 11 9)			#(13 9 13 7 #(#die) -40 #(#die) 7 14 7 10 8 7 13 14 9 13 6 10 9 7 12 11 6 14 6 14 8 5 10 5 14 7 11 8 14 9 11 12 12 10 13 9 8 7 8 11 10 5 9)			#(6 14 6 5 #(#die) -40 #(#die) 7 10 7 12 11 10 9 5 7 13 12 10 12 12 8 10 8 12 8 10 10 10 10 9 5 13 10 12 11 8 11 10 12 8 8 9 6 6 8 6 8 9 12)			#(6 5 12 12 13 6 7 13 6 7 12 9 11 12 12 14 8 11 10 6 14 10 10 13 9 7 14 6 6 5 5 9 12 13 11 7 8 14 12 14 8 10 11 14 9 9 8 12 7 13)			#(11 14 13 8 10 13 9 14 5 12 7 14 14 12 9 8 10 9 11 9 5 6 5 10 8 9 12 9 5 12 10 9 9 5 6 8 9 6 5 10 8 10 13 12 8 8 8 11 10 10)			#(8 7 7 13 8 13 14 14 10 13 6 9 10 14 14 13 11 13 10 9 11 5 11 13 8 11 9 10 9 5 5 10 6 8 6 11 11 14 11 11 6 6 10 6 14 9 12 14 10 10)			#(7 5 6 14 5 0 11 12 6 14 6 11 12 13 13 12 8 11 13 10 12 12 7 7 8 12 8 7 5 11 8 7 8 7 5 5 14 14 12 6 14 8 12 13 7 7 14 14 14 5)			#(8 7 7 9 11 14 7 13 11 14 9 7 13 8 12 8 13 9 9 10 12 13 14 6 7 7 7 7 5 7 7 12 6 12 11 7 10 13 9 11 6 9 10 13 11 11 10 5 6 14)			#(8 9 12 6 14 5 7 6 5 8 5 14 12 11 5 8 11 12 13 14 10 12 11 10 9 7 13 9 11 11 5 8 12 12 5 5 14 12 13 8 10 10 11 13 13 6 5 9 12 7)			#(9 9 14 14 12 14 14 6 5 11 7 5 9 10 8 10 12 8 14 8 7 13 14 8 14 8 9 10 14 11 6 9 8 12 5 13 11 8 12 8 7 5 14 12 12 6 12 14 10 13)			#(14 5 12 8 14 8 11 10 9 5 7 12 11 6 13 13 6 12 10 13 10 5 10 10 12 5 11 13 9 5 5 12 5 11 8 13 12 8 7 11 14 5 9 9 12 10 10 6 13 10)			#(5 13 5 7 9 9 12 12 8 8 12 14 9 6 9 11 8 13 9 13 13 13 6 14 9 8 8 6 12 6 9 13 10 5 6 11 5 12 5 13 5 6 11 10 14 14 7 7 9 8)			#(11 6 10 5 7 6 12 10 6 10 5 8 9 7 13 6 6 11 5 7 6 14 11 9 10 8 10 9 7 5 6 9 7 5 9 10 10 6 10 9 11 12 9 13 9 10 10 9 8 11)			#(6 10 12 6 7 8 10 8 7 9 7 8 14 11 10 10 8 11 14 6 14 9 7 12 7 5 6 8 7 8 7 7 8 5 8 11 12 12 5 7 6 5 7 6 11 8 5 6 12 13)			#(8 9 11 11 10 10 12 7 10 13 12 7 10 12 14 10 12 10 5 8 11 14 10 9 13 9 10 5 9 6 5 8 12 10 6 10 5 9 7 10 12 6 7 13 14 6 5 14 6 10)			#(8 14 13 8 14 11 10 14 13 5 7 11 9 14 11 10 6 8 12 5 11 6 10 13 14 7 11 5 12 14 14 13 6 14 5 12 6 5 14 8 10 13 10 5 10 8 9 9 10 10)			#(13 10 6 11 14 9 8 7 11 6 5 10 10 7 7 5 10 6 10 10 11 7 8 6 5 8 12 14 14 10 8 9 13 6 14 14 11 9 13 14 14 11 11 8 6 8 7 8 9 12)			#(6 13 11 11 11 8 6 14 7 13 8 10 7 6 5 13 14 13 10 13 9 12 9 9 7 10 11 13 13 10 9 9 14 14 12 13 12 7 9 13 13 10 13 9 13 13 13 12 7 9)			#(6 10 8 14 10 9 14 8 9 8 8 8 5 13 12 11 14 8 8 5 7 10 12 5 12 8 8 14 13 7 12 12 8 5 5 8 9 5 12 5 11 14 6 8 7 5 12 9 14 13)			#(7 7 13 12 8 14 8 6 9 8 13 11 14 7 5 13 12 14 9 6 10 8 14 7 5 13 13 10 11 12 10 14 7 11 12 10 5 9 5 5 11 7 12 9 5 8 9 6 11 8)			#(8 14 9 8 11 12 8 6 12 6 14 10 13 11 7 13 10 10 13 5 14 7 6 8 7 7 6 11 5 7 12 13 11 9 5 11 9 6 6 12 9 9 12 6 8 7 12 7 11 14)			#(14 11 9 5 11 14 6 5 8 10 14 6 12 13 7 6 7 5 14 10 10 7 11 12 13 13 8 14 11 9 13 6 11 12 10 14 9 14 6 13 11 11 14 12 8 11 8 10 10 13)			#(8 10 5 13 7 9 14 13 11 8 9 10 8 5 14 7 12 5 5 9 10 13 13 12 7 7 5 10 14 6 12 8 8 6 11 11 5 7 13 14 10 9 13 7 8 8 11 12 14 12)			#(12 10 6 14 9 11 10 6 6 11 7 6 12 6 8 9 13 5 13 11 13 14 5 14 14 6 14 12 6 13 5 14 7 11 10 14 12 5 7 6 5 9 8 10 5 7 11 12 5 12)			#(14 8 11 13 12 5 12 6 6 11 14 14 6 11 11 11 8 12 12 12 11 13 13 13 10 14 8 14 5 12 6 8 14 10 13 13 14 14 6 9 14 6 13 5 11 12 10 12 12 8)			#(14 13 7 7 14 5 5 8 12 7 5 9 12 12 10 11 9 13 6 5 9 5 7 12 12 10 7 12 10 10 5 13 14 14 7 7 9 11 5 9 10 12 9 12 8 8 5 12 10 13)			#(6 11 6 13 9 14 8 11 6 13 11 9 10 6 5 11 13 7 12 11 6 14 8 10 7 6 6 10 8 9 12 12 11 14 10 11 8 12 7 10 10 9 9 12 11 8 13 5 11 9)			#(11 10 12 10 10 11 9 13 10 13 14 11 5 11 13 8 5 13 12 14 7 5 10 12 5 8 13 13 9 8 11 7 14 7 13 6 12 9 10 8 6 14 9 13 13 11 5 11 14 7)			#(11 9 9 10 12 10 5 6 14 6 8 8 12 9 13 9 7 11 13 6 13 10 11 8 13 11 11 10 12 13 12 6 6 11 9 9 13 10 8 9 11 7 14 8 12 14 9 12 12 7)			#(13 5 5 13 12 8 10 6 14 13 8 8 10 8 6 11 12 11 10 10 5 5 5 8 11 10 13 8 11 7 12 6 7 6 5 11 11 11 14 7 11 13 14 14 5 8 6 5 13 5)			#(10 8 6 11 12 11 5 13 5 8 14 7 9 12 13 6 14 5 13 5 6 7 12 11 6 14 5 11 14 11 13 9 9 12 8 13 8 9 12 11 7 12 7 9 6 12 14 13 9 14)			#(11 9 12 13 13 8 10 14 11 13 7 13 14 11 8 7 14 6 8 7 7 8 9 6 7 8 12 10 12 12 5 11 13 14 7 13 9 10 12 5 6 10 6 5 9 11 14 12 8 14)			#(11 10 11 14 13 7 8 12 7 13 7 10 11 5 8 7 5 13 5 5 14 7 10 14 9 5 14 7 6 5 9 5 8 5 13 6 11 14 12 9 8 9 6 10 14 14 9 6 8 6)			#(10 7 11 12 13 14 13 5 5 12 12 8 11 6 9 13 7 10 5 14 6 5 5 14 10 11 9 14 10 8 7 12 10 14 5 6 11 5 14 11 9 6 10 14 13 14 7 11 5 8)			#(12 10 6 12 10 14 7 11 8 10 8 7 11 5 5 7 5 7 14 9 12 8 10 13 10 13 7 10 12 13 9 14 8 14 7 11 6 13 12 6 6 7 6 6 13 11 14 6 12 8)	); 		placeRobot: (Robot new location: (Core.Point x: 6 y: 22); yourself)		yourself</body>
</methods>


<methods>
<class-id>Board</class-id> <category>accessing</category>

<body package="Competition Phase 3" selector="claimCell:">claimCell: aPoint	| value |	value := self at: aPoint.	(value isKindOf: Array) ifTrue: [		^0].	self robot isDead ifTrue: [		self markFinished].	value isInteger ifFalse: [^0].	self at: aPoint put: 0.	^value</body>
</methods>

<methods>
<class-id>Board</class-id> <category>running</category>

<body package="Competition Phase 3" selector="moveRobot">moveRobot	robot move.	robot isDead ifTrue: [self markFinished]</body>
</methods>


<methods>
<class-id>BestNeighborStrategy</class-id> <category>running</category>

<body package="Competition Phase 3" selector="stepRobot:">stepRobot: aRobot	| bestValue bestDirection thisValue |	bestValue := 0.	bestDirection := #left.	thisValue := aRobot navigator left value.	(thisValue isInteger and: [thisValue &gt; bestValue]) ifTrue: [		bestValue := thisValue.		bestDirection := #left].		thisValue := aRobot navigator right value.	(thisValue isInteger and: [thisValue &gt; bestValue]) ifTrue: [		bestValue := thisValue.		bestDirection := #right].	thisValue := aRobot navigator up value.	(thisValue isInteger and: [thisValue &gt; bestValue]) ifTrue: [		bestValue := thisValue.		bestDirection := #up].	thisValue := aRobot navigator down value.	(thisValue isInteger and: [thisValue &gt; bestValue]) ifTrue: [		bestValue := thisValue.		bestDirection := #down].	aRobot direction: bestDirection</body>
</methods>


<methods>
<class-id>BoardView</class-id> <category>displaying</category>

<body package="Competition Phase 3" selector="drawDieOn:in:">drawDieOn: aGraphicsContext in: box		| insideBox |	insideBox := box insetBy: (box width / 6).	aGraphicsContext		paint: ColorValue white;		lineWidth: 2;		displayLineFrom: insideBox topLeft to: insideBox bottomRight;		displayLineFrom: insideBox topRight to: insideBox bottomLeft</body>

<body package="Competition Phase 3" selector="displayCellOn:at:color:">displayCellOn: aGraphicsContext at: aPoint color: aColor	| box value |	box := self boxForCellAt: aPoint.	aGraphicsContext		paint: aColor;		displayRectangle: box;		paint: ColorValue black;		displayRectangularBorder: box.		(model hasRobotAt: aPoint)		ifTrue: 			[aGraphicsContext				paint: ColorValue black;				displayDotOfDiameter: box width * 0.6 at: box center].	((value := model at: aPoint) isKindOf: Array) ifTrue: [		value first = #die ifTrue: [self drawDieOn: aGraphicsContext in: box].		value first = #warp ifTrue: [self drawWarpOn: aGraphicsContext in: box].		value first = #jump ifTrue: [self drawJumpOn: aGraphicsContext in: box]]</body>

<body package="Competition Phase 3" selector="drawWarpOn:in:">drawWarpOn: aGraphicsContext in: box		| insideBox |	insideBox := box insetBy: (box width / 6).	aGraphicsContext copy		paint: ColorValue white;		lineWidth: 2;		displayRectangularBorder: insideBox</body>

<body package="Competition Phase 3" selector="drawJumpOn:in:">drawJumpOn: aGraphicsContext in: box		| insideBox |	insideBox := box insetBy: (box width / 6).	aGraphicsContext copy		paint: ColorValue white;		lineWidth: 2;		displayPolyline: (Array			with: insideBox topCenter			with: insideBox bottomLeft			with: insideBox bottomRight			with: insideBox topCenter)</body>
</methods>



<component-created>
<name>Competition Phase 4</name> <type>package</type>
</component-created><!-- Package Competition Phase 4(1.4,David)= -->


<component-created>
<name>Competition Phase 4</name> <type>package</type>
</component-created>

<class>
<name>CompositeRobot</name>
<environment>Smalltalk</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>robots </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Phase 4</package>
</attributes>
</class>

<methods>
<class-id>CompositeRobot class</class-id> <category>instance creation</category>

<body package="Competition Phase 4" selector="new">new	"Answer a newly created and initialized instance."	^super new initialize</body>
</methods>


<methods>
<class-id>CompositeRobot</class-id> <category>accessing</category>

<body package="Competition Phase 4" selector="strategy:">strategy: aStrategy	robots do: [:each | each strategy: aStrategy]</body>

<body package="Competition Phase 4" selector="direction:">direction: anArray	^robots with: anArray do: [:robot :direction | robot direction: direction]</body>

<body package="Competition Phase 4" selector="board:">board: anObject	robots do: [:robot | robot board: anObject]</body>

<body package="Competition Phase 4" selector="robots:">robots: anObject	robots := anObject</body>

<body package="Competition Phase 4" selector="score">score	^robots inject: 0 into: [:total :robot | total + robot score]</body>

<body package="Competition Phase 4" selector="robots">robots	^robots</body>

<body package="Competition Phase 4" selector="strategyClass:">strategyClass: aClass	robots do: [:each | each strategyClass: aClass]</body>

<body package="Competition Phase 4" selector="direction">direction	^(robots collect: #direction) asArray</body>

<body package="Competition Phase 4" selector="strategyClass">strategyClass	^robots first strategyClass</body>
</methods>

<methods>
<class-id>CompositeRobot</class-id> <category>testing</category>

<body package="Competition Phase 4" selector="isAt:">isAt: aPoint	^robots anySatisfy: [:robot | robot isAt: aPoint]</body>

<body package="Competition Phase 4" selector="isDead">isDead	^robots allSatisfy: #isDead</body>

<body package="Competition Phase 4" selector="isSetup">isSetup	^robots allSatisfy: #isSetup</body>
</methods>

<methods>
<class-id>CompositeRobot</class-id> <category>copying</category>

<body package="Competition Phase 4" selector="postCopy">postCopy	robots := robots collect: #copy</body>
</methods>

<methods>
<class-id>CompositeRobot</class-id> <category>initialize-release</category>

<body package="Competition Phase 4" selector="initialize">initialize	robots := OrderedCollection new</body>
</methods>

<methods>
<class-id>CompositeRobot</class-id> <category>running</category>

<body package="Competition Phase 4" selector="step">step	robots do: #step</body>

<body package="Competition Phase 4" selector="setup">setup	robots do: #setup</body>

<body package="Competition Phase 4" selector="claimCell">claimCell	robots do: #claimCell</body>

<body package="Competition Phase 4" selector="move">move	robots do: #move</body>

<body package="Competition Phase 4" selector="move:">move: anArray	robots with: anArray do: [:robot :direction |  robot move: direction]</body>
</methods>

<methods>
<class-id>CompositeRobot</class-id> <category>printing</category>

<body package="Competition Phase 4" selector="storeOn:">storeOn: aStream	aStream		nextPut: $(;		nextPutAll: self class name;		nextPutAll: ' new robots: ';		nextPutAll: robots storeString;		nextPutAll: '; yourself)'</body>
</methods>

<methods>
<class-id>CompositeRobot</class-id> <category>adding</category>

<body package="Competition Phase 4" selector="removeRobot:">removeRobot: aRobot	robots remove: aRobot</body>

<body package="Competition Phase 4" selector="addRobot:">addRobot: aRobot	robots add: aRobot</body>

<body package="Competition Phase 4" selector="robotAtLocation:">robotAtLocation: aLocation	^robots detect: [:each | each location = aLocation]</body>
</methods>


<methods>
<class-id>Board class</class-id> <category>examples</category>

<body package="Competition Phase 4" selector="boardPhase4Sample1">boardPhase4Sample1	^Board new		name: 'Phase 4 Sample 1';		size: 50 @ 50;		endTime: 20;		cells: #(			#(6 5 10 14 5 10 8 9 6 8 11 8 9 11 6 12 5 12 5 7 6 13 9 9 5 10 14 12 14 7 10 12 11 7 10 12 5 12 8 7 11 5 12 11 6 9 13 14 6 7)			#(12 14 9 11 12 12 8 6 10 10 8 14 9 7 10 14 11 12 11 5 13 11 9 7 7 9 13 5 8 5 10 7 14 5 7 5 10 6 5 6 11 9 6 14 13 11 11 8 9 10)			#(6 7 7 12 9 10 9 10 9 10 10 11 9 14 8 9 8 13 14 14 9 14 9 5 12 11 5 14 10 12 14 14 11 14 6 5 14 5 9 11 8 11 13 10 10 14 10 6 14 9)			#(8 13 13 9 9 13 10 11 8 9 9 9 12 5 9 10 6 13 6 6 11 5 5 11 14 12 14 6 6 9 11 11 7 13 6 11 6 13 8 9 10 8 6 7 11 12 9 12 6 10)			#(13 7 9 5 14 14 13 14 6 7 9 10 14 9 7 14 11 13 10 7 10 9 14 7 11 6 14 6 10 11 7 12 16 18 19 18 16 12 6 13 5 6 14 7 6 9 8 13 7 9)			#(14 12 12 7 5 12 12 11 14 11 12 9 11 6 0 7 9 10 7 6 11 6 14 5 12 14 13 14 12 14 15 21 28 32 34 32 28 21 15 13 12 12 11 12 9 5 12 5 12 12)			#(10 11 14 14 11 #(#die) #(#die) #(#die) #(#die) 14 6 7 5 12 13 14 9 13 11 14 7 7 8 11 13 6 11 9 12 15 24 34 44 51 53 51 44 34 24 15 7 8 11 8 5 9 5 9 14 8)			#(6 13 5 6 13 #(#die) #(#warp 13 34) 2000 #(#die) 8 8 8 6 11 6 10 7 14 9 10 5 10 8 10 9 8 9 11 12 21 34 48 62 72 76 72 62 48 34 21 12 12 7 8 10 10 6 9 14 13)			#(9 12 6 9 13 #(#die) 2000 2000 #(#die) 12 9 8 10 12 13 6 5 10 14 12 13 10 10 8 13 6 9 8 16 28 44 62 80 93 98 93 80 62 44 28 16 9 12 14 6 12 10 8 11 5)			#(8 13 9 8 8 #(#die) 2000 2000 #(#die) 7 8 8 9 7 8 12 5 11 6 8 11 9 8 11 5 11 12 11 18 32 51 72 93 108 114 108 93 72 51 32 18 6 5 10 6 8 13 8 14 7)			#(8 11 11 7 11 #(#die) #(#die) #(#die) #(#die) 10 5 9 5 0 9 12 13 11 11 9 13 10 9 6 13 9 13 5 19 34 53 76 98 114 120 114 98 76 53 34 19 12 11 5 14 14 8 6 5 14)			#(10 10 7 9 7 10 13 7 6 14 9 8 7 6 5 14 7 11 5 12 13 7 11 11 7 13 8 7 18 32 51 72 93 108 114 108 93 72 51 32 18 8 8 6 13 7 14 9 6 14)			#(11 11 5 14 5 12 13 13 12 6 6 9 6 9 5 5 7 5 13 9 12 14 7 7 9 10 14 7 16 28 44 62 80 93 98 93 80 62 44 28 16 12 12 9 6 8 8 13 6 6)			#(12 6 12 9 9 5 11 6 12 8 8 9 8 12 5 10 6 12 5 5 8 14 7 12 6 9 5 12 12 21 34 48 62 72 76 72 62 48 34 21 12 10 9 13 11 12 11 7 11 5)			#(14 5 9 8 8 12 9 5 7 7 13 8 9 5 9 7 14 11 7 5 8 13 10 9 13 11 12 5 10 15 24 34 44 51 53 51 44 34 24 15 12 13 7 13 6 10 13 9 13 9)			#(8 13 12 11 10 14 13 6 12 13 14 11 8 10 14 6 11 12 8 5 9 6 5 7 11 6 9 14 8 14 15 21 28 32 34 32 28 21 15 14 7 8 6 11 14 9 7 6 12 5)			#(12 11 11 14 8 7 9 6 5 14 6 9 10 14 12 14 10 10 5 0 13 10 11 10 6 5 8 7 12 14 7 12 16 18 19 18 16 12 11 14 5 14 14 14 6 14 11 13 7 8)			#(12 11 11 12 14 9 7 8 10 12 7 7 11 14 10 5 7 8 5 8 13 11 8 6 9 6 11 13 10 13 14 6 8 10 11 10 12 7 12 7 6 13 6 10 9 6 5 9 9 6)			#(7 9 14 14 12 14 5 9 13 14 9 11 7 12 5 12 9 11 14 13 13 10 6 6 11 8 10 14 8 8 10 13 6 14 12 13 7 6 9 7 6 10 14 10 6 13 14 6 9 5)			#(14 5 11 6 5 5 8 13 13 8 7 13 14 12 7 14 12 8 13 11 10 6 5 10 6 12 5 13 7 9 14 9 12 6 10 7 13 7 7 8 10 13 10 7 8 11 8 14 5 8)			#(7 9 6 9 8 11 12 12 9 13 9 7 5 14 8 12 12 14 14 7 9 9 6 9 7 10 13 7 6 13 10 5 6 8 10 5 13 11 12 6 10 7 13 6 8 7 10 12 10 7)			#(14 10 10 10 6 6 10 11 12 6 11 14 10 5 11 6 9 14 12 12 12 9 14 8 11 14 12 11 8 8 8 10 10 7 12 9 14 9 10 11 8 13 6 14 13 13 8 11 9 10)			#(9 8 8 13 6 10 12 5 6 6 11 11 14 11 6 14 5 6 10 10 7 11 10 13 7 11 9 14 11 14 5 13 7 12 5 7 14 10 12 10 10 11 6 11 13 8 12 6 7 11)			#(13 7 7 6 5 13 8 13 10 9 8 8 13 10 12 11 8 14 10 6 6 11 14 11 9 13 14 9 8 10 8 11 7 6 9 11 11 12 13 6 8 9 8 8 14 5 7 13 12 6)			#(9 5 9 14 8 7 5 5 8 10 12 12 7 14 10 12 14 6 13 13 7 10 6 14 12 12 6 14 14 8 9 10 11 11 12 6 6 13 13 7 12 13 7 12 6 6 7 14 7 5)			#(12 5 10 12 13 6 7 13 5 12 5 14 7 12 8 14 10 14 10 10 7 9 6 8 7 12 8 11 6 10 11 5 11 6 10 5 14 12 13 10 10 8 9 9 11 6 8 7 7 9)			#(5 12 7 13 6 11 5 5 5 11 11 -12 -14 -15 -15 -15 -14 -12 11 6 6 7 5 9 9 5 6 14 9 5 10 8 7 8 12 9 5 11 5 12 7 11 8 14 8 9 14 5 9 8)			#(8 9 13 6 5 7 7 5 11 -12 -16 -19 -21 -23 -24 -23 -21 -19 -16 -12 8 6 12 14 13 10 5 9 12 8 14 5 12 14 14 12 8 13 10 12 12 9 10 8 5 14 10 9 9 12)			#(8 9 5 13 11 6 10 8 -14 -18 -23 -28 -31 -34 -35 -34 -31 -28 -23 -18 -14 13 8 9 8 8 5 5 13 14 10 13 6 14 10 11 5 10 5 10 7 10 7 12 7 11 8 10 7 13)			#(5 11 14 11 5 8 13 -14 -19 -26 -32 -38 -44 -47 -48 -47 -44 -38 -32 -26 -19 -14 12 5 9 7 11 10 12 11 8 12 13 7 8 6 5 14 7 14 11 10 5 9 9 12 8 7 7 11)			#(11 10 7 14 8 14 -12 -18 -26 -34 -43 -51 -58 -62 -64 -62 -58 -51 -43 -34 -26 -18 -12 6 6 12 7 6 10 6 8 12 12 11 6 11 6 10 6 13 9 11 10 10 9 14 9 10 12 7)			#(7 13 11 8 5 14 -16 -23 -32 -43 -53 -64 #(#jump 10) 39 43 39 29 -64 -53 -43 -32 -23 -16 13 5 9 6 6 10 11 12 9 5 12 11 9 5 10 10 12 11 8 6 12 6 6 6 10 11 9)			#(7 8 5 6 11 -12 -19 -28 -38 -51 -64 35 58 79 87 79 58 35 -64 -51 -38 -28 -19 -12 5 7 14 9 5 13 14 14 8 12 8 6 14 13 13 12 10 5 6 13 14 9 5 11 13 9)			#(6 8 14 11 7 -14 -21 -31 -44 -58 29 58 #(#warp 7 8) 130 144 130 96 58 29 -58 -44 -31 -21 -14 14 12 6 13 9 11 9 7 5 10 12 14 12 9 10 12 7 11 8 14 6 11 6 9 10 10)			#(13 8 9 12 6 -15 -23 -34 -47 -62 39 79 130 176 194 176 130 79 39 -62 -47 -34 -23 -15 6 6 7 13 10 13 5 9 8 9 14 12 12 8 13 8 12 10 13 5 7 10 14 7 8 6)			#(11 13 8 8 12 -15 -24 -35 -48 -64 43 87 144 194 215 194 144 87 43 -64 -48 -35 -24 -15 6 9 9 7 5 12 7 14 9 14 10 6 5 7 5 10 14 14 13 7 12 12 9 14 13 14)			#(10 11 13 11 13 -15 -23 -34 -47 -62 39 79 130 176 194 176 130 79 39 -62 -47 -34 -23 -15 7 9 14 11 12 12 5 10 11 8 13 11 13 5 13 12 13 9 13 5 12 8 7 6 14 13)			#(10 5 10 8 9 -14 -21 -31 -44 -58 29 58 96 130 144 130 96 58 29 -58 -44 -31 -21 -14 12 10 9 7 5 5 9 11 9 10 10 13 14 8 10 12 12 5 6 12 7 9 14 8 8 13)			#(13 8 6 13 11 -12 -19 -28 -38 -51 -64 35 58 79 87 79 58 35 -64 -51 -38 -28 -19 -12 11 13 5 10 13 10 7 9 6 5 7 13 11 9 8 11 7 11 6 9 14 5 8 6 10 8)			#(10 12 14 9 13 9 -16 -23 -32 -43 -53 -64 29 39 43 39 29 -64 -53 -43 -32 -23 -16 5 8 10 5 13 11 11 8 8 8 11 13 13 9 13 12 13 9 6 12 5 10 8 5 13 12 12)			#(8 11 8 6 6 10 -12 -18 -26 -34 -43 -51 -58 -62 -64 -62 -58 -51 -43 -34 -26 -18 -12 8 5 9 11 7 9 6 6 10 9 8 5 5 11 5 11 5 5 8 13 8 10 5 9 5 11 14)			#(6 11 9 5 11 11 7 -14 -19 -26 -32 -38 -44 -47 -48 -47 -44 -38 -32 -26 -19 -14 12 10 11 11 10 10 9 14 13 9 11 9 8 14 8 12 12 5 7 8 5 6 6 14 6 7 9 10)			#(10 14 6 14 14 9 12 11 -14 -18 -23 -28 -31 -34 -35 -34 -31 -28 -23 -18 -14 8 11 11 14 5 7 14 13 12 10 12 8 14 6 6 8 6 5 5 11 6 13 7 7 8 13 14 7 12)			#(8 12 10 14 10 14 5 9 11 -12 -16 -19 -21 -23 -24 -23 -21 -19 -16 -12 12 8 7 14 12 5 11 12 13 13 7 11 6 14 13 12 5 10 5 13 10 9 10 10 9 14 14 10 13 7)			#(10 10 13 7 8 11 13 14 11 8 13 -12 -14 -15 -15 -15 -14 -12 7 14 6 13 10 5 7 10 7 10 11 6 10 6 8 11 13 11 12 8 14 8 13 10 8 10 8 14 12 5 8 9)			#(13 5 8 8 14 9 12 7 10 8 7 13 10 13 8 6 8 12 7 11 8 8 11 13 10 6 7 7 5 11 8 6 9 6 6 12 8 5 7 8 14 9 9 6 11 9 8 7 6 13)			#(7 7 8 8 8 11 11 9 7 6 14 7 14 12 7 7 12 6 7 6 11 13 7 14 5 9 5 8 8 10 10 10 12 10 10 10 9 11 5 9 9 5 6 6 7 9 6 10 12 11)			#(9 13 13 8 8 12 14 9 10 9 12 9 12 5 14 9 7 10 13 14 9 12 12 5 13 11 9 9 5 7 12 8 6 11 5 13 13 13 11 11 6 7 14 9 5 12 8 5 9 7)			#(14 5 6 13 9 6 8 10 5 11 7 13 11 5 8 13 13 5 5 9 12 8 6 11 13 5 6 5 11 8 10 6 6 12 11 12 12 6 8 14 14 10 7 10 11 13 5 8 13 6)			#(8 13 6 11 14 6 10 5 5 9 7 13 10 11 12 8 14 5 11 11 8 5 14 10 10 10 5 11 11 5 8 12 12 11 10 10 10 9 11 7 14 11 7 6 13 13 10 10 11 5)	); 		placeRobot: (CompositeRobot new robots: ((Core.OrderedCollection new) add: (Robot new location: (Core.Point x: 14 y: 11); yourself); add: (Robot new location: (Core.Point x: 15 y: 6); yourself); yourself); yourself)		yourself</body>
</methods>



<component-created>
<name>Competition Video Production</name> <type>package</type>
</component-created><!-- Package Competition Video Production(1.7,David)= -->


<component-property>
<name>Competition Video Production</name> <type>package</type>
<property>prerequisiteParcels</property> <value>#(#('OpenGL-Windows' ''))</value>
</component-property>

<component-property>
<name>Competition Video Production</name> <type>package</type>
<property>developmentPrerequisites</property> <value>#(#(#any 'OpenGL-Windows' ''))</value>
</component-property>

<component-property>
<name>Competition Video Production</name> <type>package</type>
<property>prerequisiteDescriptions</property> <value>#(#(#name 'OpenGL-Windows' #componentType #package))</value>
</component-property>

<class>
<name>CompetitionVideoRenderer</name>
<environment>Smalltalk</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>window isRunning resizeJob renderJob idleJob context </inst-vars>
<class-inst-vars></class-inst-vars>
<imports>
			OpenGL.*
			</imports>
<category></category>
<attributes>
<package>Competition Video Production</package>
</attributes>
</class>

<class>
<name>CompetitionVideoProducer</name>
<environment>Smalltalk</environment>
<super>Core.Object</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>boards strategies </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Video Production</package>
</attributes>
</class>

<class>
<name>CompetitionVideoBoardRenderer</name>
<environment>Smalltalk</environment>
<super>CompetitionVideoRenderer</super>
<private>false</private>
<indexed-type>none</indexed-type>
<inst-vars>board geometry geometryVectors program boardVectors modelViewMatrix projectionMatrix geometryColors refreshRequired runCount textProgram font text updateJob textCamera textBuffer textAttributeArray </inst-vars>
<class-inst-vars></class-inst-vars>
<imports></imports>
<category></category>
<attributes>
<package>Competition Video Production</package>
</attributes>
</class>

<methods>
<class-id>CompetitionVideoRenderer class</class-id> <category>private</category>

<body package="Competition Video Production" selector="defaultWindowSize">defaultWindowSize	^1280 @ 960</body>
</methods>

<methods>
<class-id>CompetitionVideoRenderer class</class-id> <category>opening</category>

<body package="Competition Video Production" selector="open">open	^self openInExtent: self defaultWindowSize</body>

<body package="Competition Video Production" selector="openInExtent:">openInExtent: anExtent	^self new openInExtent: anExtent</body>
</methods>


<methods>
<class-id>CompetitionVideoRenderer</class-id> <category>opening</category>

<body package="Competition Video Production" selector="releaseOpenGL">releaseOpenGL	context release</body>

<body package="Competition Video Production" selector="initializeJobs">initializeJobs	renderJob := Animation named: 'render' do: [:job | self render: job].	idleJob := Animation named: 'idle' do: [:job | self idle: job]</body>

<body package="Competition Video Production" selector="processKeyboardEvent:">processKeyboardEvent: anEvent	anEvent keyValue = Character esc ifTrue: [self quit]</body>

<body package="Competition Video Production" selector="initializeViewport">initializeViewport	gl Viewport: window bounds left with: window bounds top with: window bounds width with: window bounds height</body>

<body package="Competition Video Production" selector="windowInExtent:">windowInExtent: anExtent	window := ApplicationWindow new.	window model: self.	window minimumSize: anExtent.	window keyboardProcessor: KeyboardProcessor new</body>

<body package="Competition Video Production" selector="main">main	" The main method - subclasses can override and replace this method if their frame workflow is different. Our workflow is simple, resize the window if we have to, render, idle if we're not vsyncing. "	resizeJob ifNotNil: [resizeJob resume].	renderJob resume.	idleJob resume</body>

<body package="Competition Video Production" selector="initializeSettings">initializeSettings	" Try and default to vsync enabled, for the smoothest rendering. "	context isVSyncEnabled: true.	" Set our default background color to black. "	gl ClearColor: 0 with: 0 with: 0 with: 1.	" Set our default depth buffer value to 1 "	gl ClearDepth: 1.	" Enable depth testing and culling by default. "	gl Enable: gl DEPTH_TEST.	gl DepthFunc: gl LEQUAL.	gl Enable: gl CULL_FACE.</body>

<body package="Competition Video Production" selector="start">start	" The standard start/stop functionality for the main loop. "	| process |	isRunning := true.	process :=		[self starting.		[[isRunning] whileTrue: [self main].		self main]			ensure: [self stopping]] newProcess.	process name: (Processor activeProcess name ifNil: ['']), ' - main loop'.	process resume</body>

<body package="Competition Video Production" selector="windowClosing">windowClosing	self stop</body>

<body package="Competition Video Production" selector="quit">quit	" We've been told to quit, close the window, this will fire the #windowClosing event which will stop the main loop. "	window controller closeAndUnschedule</body>

<body package="Competition Video Production" selector="idle:">idle: job	" The standard idle function. If we're in vsync mode when we start up, there's no need to idle. Otherwise, we'll idle at 60hz. "	(context whileCurrentDo: [context isVSyncEnabled]) ifTrue: [^self].	[isRunning] whileTrue:		[		Transcript show: 'Tick'; cr.		(Delay forMilliseconds: 100.0 - job disabled) wait.		job pause]</body>

<body package="Competition Video Production" selector="starting">starting	self initializeWindowEvents.	self initializeOpenGL.	self initializeJobs</body>

<body package="Competition Video Production" selector="initializeWindowEvents">initializeWindowEvents	window when: #closing send: #windowClosing to: self.	window when: #bounds send: #windowResize to: self.	window keyboardProcessor keyboardHook: [:event :controller | self processKeyboardEvent: event. event].</body>

<body package="Competition Video Production" selector="render">render	" The main rendering method - subclasses will override this method to change what is rendered to the screen. "	gl Clear: (gl COLOR_BUFFER_BIT bitOr: gl DEPTH_BUFFER_BIT)</body>

<body package="Competition Video Production" selector="releaseWindowEvents">releaseWindowEvents	window keyboardProcessor keyboardHook: nil.	window removeAllActionsWithReceiver: self</body>

<body package="Competition Video Production" selector="render:">render: job	" The standard rendering loop. Stop rendering when we're not longer running. "	[isRunning] whileTrue:		[context whileCurrentDo:			[self render.			context flush].		job pause]</body>

<body package="Competition Video Production" selector="open">open	self openInExtent: self class defaultWindowSize;	start</body>

<body package="Competition Video Production" selector="stop">stop	" The standard start/stop functionality for the main loop. "	isRunning := false</body>

<body package="Competition Video Production" selector="initializeOpenGL">initializeOpenGL	context := RenderContext on: window.	context whileCurrentDo:		[self initializeSettings.		self initializeViewport]</body>

<body package="Competition Video Production" selector="stopping">stopping	self releaseOpenGL.	self releaseWindowEvents</body>

<body package="Competition Video Production" selector="windowResize">windowResize	" We've been told our windoer has resized, schedule a resize job for the main loop. "	resizeJob := Animation named: 'resize' do: [:job |		context resize.		context whileCurrentDo: [self initializeViewport].		resizeJob := nil]</body>

<body package="Competition Video Production" selector="openInExtent:">openInExtent: anExtent	self windowInExtent: anExtent.	window open.	self start</body>
</methods>


<methods>
<class-id>CompetitionVideoBoardRenderer</class-id> <category>opening</category>

<body package="Competition Video Production" selector="starting">starting	super starting.	board robot setup</body>

<body package="Competition Video Production" selector="scoreTextFor:">scoreTextFor: aNumber	| printConverter |	printConverter := PrintConverter for: #number withFormatString: '#,##0'.	^(printConverter formatStringFor: aNumber) asString, '    ', (board time printString copyWithout: $s), ' of ', (board endTime printString copyWithout: $s)</body>

<body package="Competition Video Production" selector="main">main	updateJob resume.	super main</body>

<body package="Competition Video Production" selector="processKeyboardEvent:">processKeyboardEvent: anEvent	Transcript show: anEvent keyValue printString; cr.	anEvent keyValue = #Left ifTrue: [		board robot isSetup ifFalse: [board robot setup].		board step: 0.1s.		board moveRobot.		refreshRequired := true]</body>

<body package="Competition Video Production" selector="updateText:">updateText: job	" We're going to create an OpenGL.Text object every second with the latest time. Calling #text: on the Font gives us a partially completed RenderState, we just need to fill in our program and any extra variables that program is expecting - in our case, the camera. "	| oldScore |	oldScore := board robot score.	context whileCurrentDo: [text := font text: (self scoreTextFor: oldScore)].	[isRunning] whileTrue:		[board robot score = oldScore ifFalse:			[oldScore := board robot score.			context whileCurrentDo: [text := font text: (self scoreTextFor: oldScore)]].		job pause]</body>
</methods>

<methods>
<class-id>CompetitionVideoBoardRenderer</class-id> <category>accessing</category>

<body package="Competition Video Production" selector="writeBoardVectorsOn:">writeBoardVectorsOn: vectorStream		| width |		1 to: board size x do: [:x |			1 to: board size y do: [:y |				| xCoord yCoord xWidth yWidth |				xCoord := (x asFloat / board size x asFloat) - 0.5.				yCoord := (y asFloat / board size y asFloat) - 0.5.				xWidth := 1.0 / board size x asFloat.				yWidth := 1.0 / board size y asFloat.						vectorStream nextPut: xCoord - xWidth; nextPut: yCoord - yWidth; nextPut: -0.001; nextPut: 1.0; nextPutAll: (self colorOfCell: y @ x value: (board at: y @ x)).				vectorStream nextPut: xCoord; nextPut: yCoord - yWidth; nextPut: -0.001; nextPut: 1.0; nextPutAll: (self colorOfCell: y @ x value: (board at: y @ x)).				vectorStream nextPut: xCoord; nextPut: yCoord; nextPut: -0.001; nextPut: 1.0; nextPutAll: (self colorOfCell: y @ x value: (board at: y @ x)).							vectorStream nextPut: xCoord - xWidth; nextPut: yCoord - yWidth; nextPut: -0.001; nextPut: 1.0; nextPutAll: (self colorOfCell: y @ x value: (board at: y @ x)).				vectorStream nextPut: xCoord; nextPut: yCoord; nextPut: -0.001; nextPut: 1.0; nextPutAll: (self colorOfCell: y @ x value: (board at: y @ x)).				vectorStream nextPut: xCoord - xWidth; nextPut: yCoord; nextPut: -0.001; nextPut: 1.0; nextPutAll: (self colorOfCell: y @ x value: (board at: y @ x)).				]			].		0 to: board size x do: [:x |			| xCoord |			xCoord := (x asFloat / board size x asFloat) - 0.5.			width := 1.0 / 1000.0.						vectorStream nextPut: xCoord - width; nextPut: -0.5; nextPut: 0.0; nextPut: 1.0; nextPutAll: #( 0.4 0.4 0.4 1.0 ).			vectorStream nextPut: xCoord + width; nextPut: -0.5; nextPut: 0.0; nextPut: 1.0; nextPutAll: #( 0.4 0.4 0.4 1.0 ).			vectorStream nextPut: xCoord + width; nextPut: 0.5; nextPut: 0.0; nextPut: 1.0; nextPutAll: #( 0.4 0.4 0.4 1.0 ).						vectorStream nextPut: xCoord - width; nextPut: -0.5; nextPut: 0.0; nextPut: 1.0; nextPutAll: #( 0.4 0.4 0.4 1.0 ).			vectorStream nextPut: xCoord + width; nextPut: 0.5; nextPut: 0.0; nextPut: 1.0; nextPutAll: #( 0.4 0.4 0.4 1.0 ).			vectorStream nextPut: xCoord - width; nextPut: 0.5; nextPut: 0.0; nextPut: 1.0; nextPutAll: #( 0.4 0.4 0.4 1.0 ).			].		0 to: board size y do: [:y |			| yCoord |			yCoord := (y asFloat / board size y asFloat) - 0.5.			width := 1.0 / 1000.0.						vectorStream nextPut: -0.5; nextPut: yCoord - width; nextPut: 0.0; nextPut: 1.0; nextPutAll: #( 0.4 0.4 0.4 1.0 ).			vectorStream nextPut: 0.5; nextPut: yCoord - width; nextPut: 0.0; nextPut: 1.0; nextPutAll: #( 0.4 0.4 0.4 1.0 ).			vectorStream nextPut: 0.5; nextPut: yCoord + width; nextPut: 0.0; nextPut: 1.0; nextPutAll: #( 0.4 0.4 0.4 1.0 ).			vectorStream nextPut: -0.5; nextPut: yCoord - width; nextPut: 0.0; nextPut: 1.0; nextPutAll: #( 0.4 0.4 0.4 1.0 ).			vectorStream nextPut: 0.5; nextPut: yCoord + width; nextPut: 0.0; nextPut: 1.0; nextPutAll: #( 0.4 0.4 0.4 1.0 ).			vectorStream nextPut: -0.5; nextPut: yCoord + width; nextPut: 0.0; nextPut: 1.0; nextPutAll: #( 0.4 0.4 0.4 1.0 ).			].		^vectorStream contents</body>

<body package="Competition Video Production" selector="boardVectors">boardVectors	^boardVectors		ifNil: [| vectorStream array |			vectorStream := WriteStream on: (Array new: 10000).			array := self writeBoardVectorsOn: vectorStream.			boardVectors := FloatArray withAll: array]		ifNotNil: [			| vectorStream |			vectorStream := WriteStream on: boardVectors.			self writeBoardVectorsOn: vectorStream]</body>

<body package="Competition Video Production" selector="board:">board: anObject	board := anObject</body>

<body package="Competition Video Production" selector="board">board	^board</body>
</methods>

<methods>
<class-id>CompetitionVideoBoardRenderer</class-id> <category>displaying</category>

<body package="Competition Video Production" selector="colorOfCell:value:">colorOfCell: point value: value	(board hasRobotAt: point) ifTrue: [^#(0.0 1.0 0.0 1.0)].	value isInteger ifFalse: [^#(0.0 0.0 0.0 1.0)].	value &gt; 1000.0 ifTrue: [^#(1.0 0.4 0.6 1.0)].	value &gt; 100.0 ifTrue: [^#(1.0 1.0 0.0 1.0)].	value &lt; -100.0 ifTrue: [^#(0.0 0.0 1.0 1.0)].	value &lt; 0 ifTrue: [^Array with: 1.0  - (value negated / 100.0) with: 1.0  - (value negated / 100.0) with: 1.0 with: 1.0].	^Array with: 1.0 with: 1.0  - (value / 100.0) with: 1.0  - (value / 100.0) with: 1.0</body>

<body package="Competition Video Production" selector="render:">render: job	" The standard rendering loop. Stop rendering when we're not longer running. "	[isRunning] whileTrue: [		runCount := runCount - 1.		(runCount &lt;= 0 and: [board isFinished not]) ifTrue: [			runCount := 6.			board robot isSetup ifFalse: [board robot setup].			board step: 0.1s.			board moveRobot.			refreshRequired := true].						context whileCurrentDo:			[self render.			context flush].			job pause]</body>

<body package="Competition Video Production" selector="render">render	" Render our scene to the window. "	super render.	" Tell the program we want to use it. This statement actives this particular program, but there's no reason why we can't have multiple programs. "	program use.	program uniform: 'projectionMatrix' value: projectionMatrix.	program uniform: 'modelViewMatrix' value: modelViewMatrix.	program attribute: 'myVertex' array: geometryVectors.	" Bind the 'myVertex' variable in our vertex shader program to the data in our triangle geometry buffer. As the vertex program runs, it will read data from our buffer. "	geometry bind.	program attribute: 'myVertex' components: 4 type: gl FLOAT normalized: false stride: 0 offset: 0.	refreshRequired ifTrue: [self initializeGeometry. refreshRequired := false].	" The geometryVectors variable we set up in #initializeGeometry knows how we've laid out the data inside our buffer, so we can use it to set up our attribute instead, which is easier. "	program attribute: 'myVertex' array: geometryVectors.	program attribute: 'myColor' array: geometryColors.	" Execute our program for all our components in our buffer. "	gl DrawArrays: gl TRIANGLES with: 0 with: self boardVectors size // 4.	" Stop using the program. "	program unuse.	textProgram use.	textProgram uniform: 'camera' value: textCamera.	text render.	textProgram unuse</body>
</methods>

<methods>
<class-id>CompetitionVideoBoardRenderer</class-id> <category>shaders</category>

<body package="Competition Video Production" selector="vertexShaderMain">vertexShaderMain^'void applyTextureCoordinate();void applyPosition();void main(){	applyTextureCoordinate();	applyPosition();}'</body>

<body package="Competition Video Production" selector="vertexShader">vertexShader^'/* We define two new uniforms and get rid of the last two uniforms. These two uniforms are 4x4 matrices.    The modelViewMatrix takes the place of the rotate and shear operations we did before.    The projectionMatrix is new and takes on the role of transforming the scene to be looked at from a "camera". */uniform mat4 modelViewMatrix;uniform mat4 projectionMatrix;attribute vec4 myVertex;attribute vec4 myColor;varying vec4 theColor;void main(){	/* In this shader, we recreate what OpenGL used to do, by first transforming the scene by the modelViewMatrix, which generally involves translations and rotations */	vec4 eyeCoordinate = modelViewMatrix * myVertex;	/* The next coordinate conversion is to apply the projectionMatrix to the vertex so that it moves to its correct camera position */	vec4 clipCoordinate = projectionMatrix * eyeCoordinate;	/* The last two coordinate transformations are performed by the graphics card, but I include them them below for you to see anyway:	vec3 deviceCoordinate = (clipCoordinate / clipCoordinate w) xyz;	vec3 windowCoordinate =		viewport width half * deviceCoordinate x + viewport width half,		viewport height half * deviceCoordinate y + viewport height half,		(far - near) half * deviceCoordinate z + (near + far) half	*/	gl_Position = clipCoordinate;	theColor = myColor;}'</body>

<body package="Competition Video Production" selector="fragmentShaderTextureCoordinate">fragmentShaderTextureCoordinate^'uniform sampler2D texture;varying vec2 fragmentTextureCoordinate;void applyTextureCoordinate(){	gl_FragColor = texture2D(texture,fragmentTextureCoordinate);}'</body>

<body package="Competition Video Production" selector="fragmentShaderMain">fragmentShaderMain^'void applyTextureCoordinate();void main(){	applyTextureCoordinate();}'</body>

<body package="Competition Video Production" selector="vertexShaderTextureCoordinate">vertexShaderTextureCoordinate^'attribute vec2 textureCoordinate;varying vec2 fragmentTextureCoordinate;void applyTextureCoordinate(){	fragmentTextureCoordinate = textureCoordinate;}'</body>

<body package="Competition Video Production" selector="vertexShaderPosition">vertexShaderPosition^'uniform mat4 camera;attribute vec4 position;attribute vec4 labelPosition;void applyPosition(){	gl_Position = camera * position + vec4(0.9, 0.0, 0.0, 0.0);}'</body>

<body package="Competition Video Production" selector="fragmentShader">fragmentShader^'varying vec4 theColor;void main(){	gl_FragColor = theColor;}'</body>
</methods>

<methods>
<class-id>CompetitionVideoBoardRenderer</class-id> <category>initialize-release</category>

<body package="Competition Video Production" selector="initializeMatrices">initializeMatrices	modelViewMatrix := OpenGL.Matrix4 translationX: 0 y: 0 z: -2.	modelViewMatrix := modelViewMatrix * (OpenGL.Matrix4 rotationX: -45.0 * Float pi / 180.0).	modelViewMatrix := modelViewMatrix * (OpenGL.Matrix4 rotationZ: -75.0 * Float pi / 180.0).	projectionMatrix := OpenGL.Matrix4 perspective: 45 degreesToRadians aspect: window bounds width / window bounds height near: 1 far: 100</body>

<body package="Competition Video Production" selector="initializeJobs">initializeJobs	super initializeJobs.	updateJob := Animation named: 'update' do: [:job | self updateText: job]</body>

<body package="Competition Video Production" selector="initializeProgram">initializeProgram	program := Program new.	program attach: (Shader newVertexShader: self vertexShader).	program attach: (Shader newFragmentShader: self fragmentShader).	program link</body>

<body package="Competition Video Production" selector="initializeTextProgram">initializeTextProgram	textCamera := Matrix4 orthogonal: window bounds near: -1 far: 0.	textProgram := Program new		attach: (Shader newVertexShader: self vertexShaderTextureCoordinate);		attach: (Shader newVertexShader: self vertexShaderPosition);		attach: (Shader newVertexShader: self vertexShaderMain);		attach: (Shader newFragmentShader: self fragmentShaderTextureCoordinate);		attach: (Shader newFragmentShader: self fragmentShaderMain);		link</body>

<body package="Competition Video Production" selector="initializeSettings">initializeSettings	refreshRequired := true.	runCount := 60.	super initializeSettings.	self initializeProgram.	self initializeGeometry.	self initializeMatrices.	self initializeTextProgram.	self initializeFont.	gl Enable: gl BLEND.	gl BlendFunc: gl ONE_MINUS_DST_COLOR with: gl ZERO</body>

<body package="Competition Video Production" selector="initializeGeometry">initializeGeometry	| data |	data := self boardVectors.	geometry isNil ifTrue: [geometry := Buffer newArrayBuffer].	geometry data: data mode: gl STATIC_DRAW.	geometryVectors := geometry asAttributeArray: OpenGL.Vector4 stride: 8 offset: 0.	geometryColors := geometry asAttributeArray: OpenGL.Color4 stride: 8 offset: 4</body>

<body package="Competition Video Production" selector="initializeFont">initializeFont	" Build our font object. "	font := (OpenGL.Font fromFontDescription: (FontDescription new		family: 'Helvetica';		pixelSize: 24;		boldness: 0.6;		italic: false))		build.</body>
</methods>



<bundle-structure>
<name>Competition</name> <structure>#(#(#package 'Competition') #(#package 'Competition UI') #(#package 'Competition Administration') #(#package 'Competition Phase 2') #(#package 'Competition Phase 3') #(#package 'Competition Phase 4') #(#package 'Competition Video Production'))</structure>
</bundle-structure>

</st-source>
