<?xml version="1.0" encoding="UTF-8"?><GameModel>
	<Time> Turn-Based Round Robin </Time>
	<Field> 2D Board </Field>
	<Classes>
		<Structure>
			<name> API_Army </name>
			<super>  </super><methods/>
			<members>
				<Variable>
					<Name> m_pPlayer </Name>
					<Type> API_Player </Type>
					<Constant> false </Constant>
				</Variable>
				<Variable>
					<Name> m_iArmyId </Name>
					<Type> Integer </Type>
					<Value> |-5| </Value>
					<Constant> false </Constant>
				</Variable>
				<Variable>
					<Name> x_pos </Name>
					<Type> Integer </Type>
					<Value> |-5| </Value>
					<Constant> false </Constant>
				</Variable>
				<Variable>
					<Name> y_pos </Name>
					<Type> Integer </Type>
					<Value> |-5| </Value>
					<Constant> false </Constant>
				</Variable>
				<Variable>
					<Name> garrisoning </Name>
					<Type> Boolean </Type>
					<Value> |false| </Value>
					<Constant> false </Constant>
				</Variable>
			</members>
		</Structure>
		<Structure>
			<name> API_Army_List </name>
			<super>  </super>
			<methods>
				<Function>
					<Name> Delete </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> void </Type>
						<Constant> false </Constant>
					</Variable>
					<VariableSet Name="Parameters">
						<Variable>
							<Name> army_id </Name>
							<Type> Integer </Type>
							<Constant> false </Constant>
						</Variable>
					</VariableSet>
					<Implementation>
						<WrittenCode> declare index_to_remove : Integer;&#13;
declare curr : API_Army;&#13;
set index_to_remove = -1;&#13;
for i = 0 to last_filled_index step 1&#13;
	set curr = army_array[i];&#13;
	note  If the ID of the army at this index in the list is equal to the ID passed in, then this is the index of the element we want to remove;&#13;
	if (equals(curr.m_iArmyId, army_id))&#13;
		set index_to_remove = i;&#13;
	endif;&#13;
endfor;&#13;
if (not(equals(index_to_remove, -1)))&#13;
	for i = index_to_remove to last_filled_index step 1&#13;
		note  starting with the unit to be removed, slide all elements in the array down by one;&#13;
		declare this_unit : API_Army;&#13;
		set this_unit = army_array[i];&#13;
		if (equals(i, last_filled_index))
			note  at end of list, remove this element;
			set this_unit.m_pPlayer.m_iIndex = -5;
			set this_unit.m_iArmyId = -5;
			set this_unit.x_pos = -5;
			set this_unit.y_pos = -5;
			set this_unit.garrisoning = false;
			set army_array[i] = this_unit;
			set last_filled_index = last_filled_index - 1;
			if (lessThan(last_filled_index, army_array.length / 2))
				call ShrinkArray();
			endif;&#13;
		else&#13;
			declare next_unit : API_Army;
			set next_unit = army_array[i + 1];
			set this_unit.x_pos = next_unit.x_pos;
			set this_unit.y_pos = next_unit.y_pos;
			set this_unit.garrisoning = next_unit.garrisoning;
			set army_array[i] = this_unit;
		endif;&#13;
	endfor;&#13;
endif; </WrittenCode>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> index_to_remove </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
						</Statement>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> curr </Name>
								<Type> API_Army </Type>
								<Constant> false </Constant>
							</Variable>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> _UNNAMED </Name>
										<Type> Integer </Type>
										<Value> |-1| </Value>
										<Constant> true </Constant>
									</Variable>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> index_to_remove </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</SetObject>
						</Statement>
						<Statement type="for">
							<StatementBlock>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> army_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ </Name>
														<Type> API_Army </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> curr </Name>
												<Type> API_Army </Type>
												<Constant> false </Constant>
											</Variable>
										</Equation>
									</SetObject>
								</Statement>
								<Statement type="note">
									<CommentText>   If the ID of the army at this index in the list is equal to the ID passed in, then this is the index of the element we want to remove </CommentText>
								</Statement>
								<Statement type="if">
									<Condition>
										<Equation>
											<FunctionReference>
												<Name> equals </Name>
												<Variable>
													<Name>  </Name>
													<Type> Boolean </Type>
													<Constant> false </Constant>
												</Variable>
												<VariableSet Name="Parameters">
													<Variable>
														<Name> param1 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
													<Variable>
														<Name> param2 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</VariableSet>
												<IsMethod> false </IsMethod>
												<Source> PC </Source>
											</FunctionReference>
											<Parameters>
												<Equation>
													<Variable>
														<Name> curr.m_iArmyId </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
												<Equation>
													<Variable>
														<Name> army_id </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Condition>
									<StatementBlock>
										<Statement type="set">
											<Calculation>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Calculation>
											<SetObject>
												<Equation>
													<Variable>
														<Name> index_to_remove </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</SetObject>
										</Statement>
									</StatementBlock>
								</Statement>
							</StatementBlock>
							<Variable purpose="for">
								<Name> i </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="start">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |0| </Value>
								<Constant> true </Constant>
							</Variable>
							<Variable purpose="end">
								<Name> last_filled_index </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="step">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
						</Statement>
						<Statement type="if">
							<Condition>
								<Equation>
									<FunctionReference>
										<Name> not </Name>
										<Variable>
											<Name>  </Name>
											<Type> Boolean </Type>
											<Constant> false </Constant>
										</Variable>
										<VariableSet Name="Parameters">
											<Variable>
												<Name> param1 </Name>
												<Type> Boolean </Type>
												<Constant> false </Constant>
											</Variable>
										</VariableSet>
										<IsMethod> false </IsMethod>
										<Source> PC </Source>
									</FunctionReference>
									<Parameters>
										<Equation>
											<FunctionReference>
												<Name> equals </Name>
												<Variable>
													<Name>  </Name>
													<Type> Boolean </Type>
													<Constant> false </Constant>
												</Variable>
												<VariableSet Name="Parameters">
													<Variable>
														<Name> param1 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
													<Variable>
														<Name> param2 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</VariableSet>
												<IsMethod> false </IsMethod>
												<Source> PC </Source>
											</FunctionReference>
											<Parameters>
												<Equation>
													<Variable>
														<Name> index_to_remove </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
												<Equation>
													<Variable>
														<Name> _UNNAMED </Name>
														<Type> Integer </Type>
														<Value> |-1| </Value>
														<Constant> true </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Parameters>
								</Equation>
							</Condition>
							<StatementBlock>
								<Statement type="for">
									<StatementBlock>
										<Statement type="note">
											<CommentText>   starting with the unit to be removed, slide all elements in the array down by one </CommentText>
										</Statement>
										<Statement type="declare">
											<Variable purpose="declare">
												<Name> this_unit </Name>
												<Type> API_Army </Type>
												<Constant> false </Constant>
											</Variable>
										</Statement>
										<Statement type="set">
											<Calculation>
												<Equation>
													<Variable>
														<Name> army_array </Name>
														<Type> Array </Type>
														<Constant> false </Constant>
														<ArrayType>
															<Variable>
																<Name> _ </Name>
																<Type> API_Army </Type>
																<Constant> false </Constant>
															</Variable>
														</ArrayType>
													</Variable>
													<Parameters>
														<Equation>
															<Variable>
																<Name> i </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Parameters>
												</Equation>
											</Calculation>
											<SetObject>
												<Equation>
													<Variable>
														<Name> this_unit </Name>
														<Type> API_Army </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</SetObject>
										</Statement>
										<Statement type="if">
											<Condition>
												<Equation>
													<FunctionReference>
														<Name> equals </Name>
														<Variable>
															<Name>  </Name>
															<Type> Boolean </Type>
															<Constant> false </Constant>
														</Variable>
														<VariableSet Name="Parameters">
															<Variable>
																<Name> param1 </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
															<Variable>
																<Name> param2 </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</VariableSet>
														<IsMethod> false </IsMethod>
														<Source> PC </Source>
													</FunctionReference>
													<Parameters>
														<Equation>
															<Variable>
																<Name> i </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
														<Equation>
															<Variable>
																<Name> last_filled_index </Name>
																<Type> Integer </Type>
																<Value> |1| </Value>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Parameters>
												</Equation>
											</Condition>
											<StatementBlock>
												<Statement type="note">
													<CommentText>   at end of list, remove this element </CommentText>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> _UNNAMED </Name>
																<Type> Integer </Type>
																<Value> |-5| </Value>
																<Constant> true </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> this_unit.m_pPlayer.m_iIndex </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> _UNNAMED </Name>
																<Type> Integer </Type>
																<Value> |-5| </Value>
																<Constant> true </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> this_unit.m_iArmyId </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> _UNNAMED </Name>
																<Type> Integer </Type>
																<Value> |-5| </Value>
																<Constant> true </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> this_unit.x_pos </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> _UNNAMED </Name>
																<Type> Integer </Type>
																<Value> |-5| </Value>
																<Constant> true </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> this_unit.y_pos </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> _UNNAMED </Name>
																<Type> Boolean </Type>
																<Value> |false| </Value>
																<Constant> true </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> this_unit.garrisoning </Name>
																<Type> Boolean </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> this_unit </Name>
																<Type> API_Army </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> army_array </Name>
																<Type> Array </Type>
																<Constant> false </Constant>
																<ArrayType>
																	<Variable>
																		<Name> _ </Name>
																		<Type> API_Army </Type>
																		<Constant> false </Constant>
																	</Variable>
																</ArrayType>
															</Variable>
															<Parameters>
																<Equation>
																	<Variable>
																		<Name> i </Name>
																		<Type> Integer </Type>
																		<Constant> false </Constant>
																	</Variable>
																</Equation>
															</Parameters>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> last_filled_index </Name>
																<Type> Integer </Type>
																<Value> |1| </Value>
																<Constant> false </Constant>
															</Variable>
															<Operation op="-">
																<Equation>
																	<Variable>
																		<Name> _UNNAMED </Name>
																		<Type> Integer </Type>
																		<Value> |1| </Value>
																		<Constant> true </Constant>
																	</Variable>
																</Equation>
															</Operation>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> last_filled_index </Name>
																<Type> Integer </Type>
																<Value> |1| </Value>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="if">
													<Condition>
														<Equation>
															<FunctionReference>
																<Name> lessThan </Name>
																<Variable>
																	<Name>  </Name>
																	<Type> Boolean </Type>
																	<Constant> false </Constant>
																</Variable>
																<VariableSet Name="Parameters">
																	<Variable>
																		<Name> param1 </Name>
																		<Type> Integer </Type>
																		<Constant> false </Constant>
																	</Variable>
																	<Variable>
																		<Name> param2 </Name>
																		<Type> Integer </Type>
																		<Constant> false </Constant>
																	</Variable>
																</VariableSet>
																<IsMethod> false </IsMethod>
																<Source> PC </Source>
															</FunctionReference>
															<Parameters>
																<Equation>
																	<Variable>
																		<Name> last_filled_index </Name>
																		<Type> Integer </Type>
																		<Value> |1| </Value>
																		<Constant> false </Constant>
																	</Variable>
																</Equation>
																<Equation>
																	<Variable>
																		<Name> army_array.length </Name>
																		<Type> Integer </Type>
																		<Constant> false </Constant>
																	</Variable>
																	<Operation op="/">
																		<Equation>
																			<Variable>
																				<Name> _UNNAMED </Name>
																				<Type> Integer </Type>
																				<Value> |2| </Value>
																				<Constant> true </Constant>
																			</Variable>
																		</Equation>
																	</Operation>
																</Equation>
															</Parameters>
														</Equation>
													</Condition>
													<StatementBlock>
														<Statement type="call">
															<Calculation>
																<Equation>
																	<FunctionReference>
																		<Name> ShrinkArray </Name>
																		<Variable>
																			<Name> returnType </Name>
																			<Type> void </Type>
																			<Constant> false </Constant>
																		</Variable><VariableSet Name="Parameters"/>
																		<IsMethod> false </IsMethod>
																		<Source> GM </Source>
																	</FunctionReference>
																</Equation>
															</Calculation>
														</Statement>
													</StatementBlock>
												</Statement>
											</StatementBlock>
											<ElseBlock>
												<Statement type="declare">
													<Variable purpose="declare">
														<Name> next_unit </Name>
														<Type> API_Army </Type>
														<Constant> false </Constant>
													</Variable>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> army_array </Name>
																<Type> Array </Type>
																<Constant> false </Constant>
																<ArrayType>
																	<Variable>
																		<Name> _ </Name>
																		<Type> API_Army </Type>
																		<Constant> false </Constant>
																	</Variable>
																</ArrayType>
															</Variable>
															<Parameters>
																<Equation>
																	<Variable>
																		<Name> i </Name>
																		<Type> Integer </Type>
																		<Constant> false </Constant>
																	</Variable>
																	<Operation op="+">
																		<Equation>
																			<Variable>
																				<Name> _UNNAMED </Name>
																				<Type> Integer </Type>
																				<Value> |1| </Value>
																				<Constant> true </Constant>
																			</Variable>
																		</Equation>
																	</Operation>
																</Equation>
															</Parameters>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> next_unit </Name>
																<Type> API_Army </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> next_unit.x_pos </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> this_unit.x_pos </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> next_unit.y_pos </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> this_unit.y_pos </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> next_unit.garrisoning </Name>
																<Type> Boolean </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> this_unit.garrisoning </Name>
																<Type> Boolean </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> this_unit </Name>
																<Type> API_Army </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> army_array </Name>
																<Type> Array </Type>
																<Constant> false </Constant>
																<ArrayType>
																	<Variable>
																		<Name> _ </Name>
																		<Type> API_Army </Type>
																		<Constant> false </Constant>
																	</Variable>
																</ArrayType>
															</Variable>
															<Parameters>
																<Equation>
																	<Variable>
																		<Name> i </Name>
																		<Type> Integer </Type>
																		<Constant> false </Constant>
																	</Variable>
																</Equation>
															</Parameters>
														</Equation>
													</SetObject>
												</Statement>
											</ElseBlock>
										</Statement>
									</StatementBlock>
									<Variable purpose="for">
										<Name> i </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
									<Variable purpose="start">
										<Name> index_to_remove </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
									<Variable purpose="end">
										<Name> last_filled_index </Name>
										<Type> Integer </Type>
										<Value> |1| </Value>
										<Constant> false </Constant>
									</Variable>
									<Variable purpose="step">
										<Name> _UNNAMED </Name>
										<Type> Integer </Type>
										<Value> |1| </Value>
										<Constant> true </Constant>
									</Variable>
								</Statement>
							</StatementBlock>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
				<Function>
					<Name> FindElement </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> Integer </Type>
						<Constant> false </Constant>
					</Variable>
					<VariableSet Name="Parameters">
						<Variable>
							<Name> army_id </Name>
							<Type> Integer </Type>
							<Constant> false </Constant>
						</Variable>
					</VariableSet>
					<Implementation>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> index_found </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> _UNNAMED </Name>
										<Type> Integer </Type>
										<Value> |-1| </Value>
										<Constant> true </Constant>
									</Variable>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> index_found </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</SetObject>
						</Statement>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> curr </Name>
								<Type> API_Army </Type>
								<Constant> false </Constant>
							</Variable>
						</Statement>
						<Statement type="for">
							<StatementBlock>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> army_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ </Name>
														<Type> API_Army </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> curr </Name>
												<Type> API_Army </Type>
												<Constant> false </Constant>
											</Variable>
										</Equation>
									</SetObject>
								</Statement>
								<Statement type="if">
									<Condition>
										<Equation>
											<FunctionReference>
												<Name> equals </Name>
												<Variable>
													<Name>  </Name>
													<Type> Boolean </Type>
													<Constant> false </Constant>
												</Variable>
												<VariableSet Name="Parameters">
													<Variable>
														<Name> param1 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
													<Variable>
														<Name> param2 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</VariableSet>
												<IsMethod> false </IsMethod>
												<Source> PC </Source>
											</FunctionReference>
											<Parameters>
												<Equation>
													<Variable>
														<Name> curr.m_iArmyId </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
												<Equation>
													<Variable>
														<Name> army_id </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Condition>
									<StatementBlock>
										<Statement type="set">
											<Calculation>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Calculation>
											<SetObject>
												<Equation>
													<Variable>
														<Name> index_found </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</SetObject>
										</Statement>
									</StatementBlock>
								</Statement>
							</StatementBlock>
							<Variable purpose="for">
								<Name> i </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="start">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
							<Variable purpose="end">
								<Name> last_filled_index </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="step">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
						</Statement>
						<Statement type="return">
							<Calculation>
								<Equation>
									<Variable>
										<Name> index_found </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</Calculation>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
				<Function>
					<Name> GetNumElements </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> Integer </Type>
						<Constant> false </Constant>
					</Variable><VariableSet Name="Parameters"/>
					<Implementation>
						<Statement type="return">
							<Calculation>
								<Equation>
									<Variable>
										<Name> last_filled_index </Name>
										<Type> Integer </Type>
										<Value> |1| </Value>
										<Constant> false </Constant>
									</Variable>
									<Operation op="+">
										<Equation>
											<Variable>
												<Name> _UNNAMED </Name>
												<Type> Integer </Type>
												<Value> |1| </Value>
												<Constant> true </Constant>
											</Variable>
										</Equation>
									</Operation>
								</Equation>
							</Calculation>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
				<Function>
					<Name> GrowArray </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> void </Type>
						<Constant> false </Constant>
					</Variable><VariableSet Name="Parameters"/>
					<Implementation>
						<WrittenCode> declare new_arr : Array of API_Army;&#13;
for i = 1 to last_filled_index step 1&#13;
	set new_arr[i] = army_array[i];&#13;
endfor;&#13;
set army_array = new_arr; </WrittenCode>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> new_arr </Name>
								<Type> Array </Type>
								<Constant> false </Constant>
								<ArrayType>
									<Variable>
										<Name>  </Name>
										<Type> API_Army </Type>
										<Constant> false </Constant>
									</Variable>
								</ArrayType>
							</Variable>
						</Statement>
						<Statement type="for">
							<StatementBlock>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> army_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ </Name>
														<Type> API_Army </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> new_arr </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name>  </Name>
														<Type> API_Army </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</SetObject>
								</Statement>
							</StatementBlock>
							<Variable purpose="for">
								<Name> i </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="start">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
							<Variable purpose="end">
								<Name> last_filled_index </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="step">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> new_arr </Name>
										<Type> Array </Type>
										<Constant> false </Constant>
										<ArrayType>
											<Variable>
												<Name>  </Name>
												<Type> API_Army </Type>
												<Constant> false </Constant>
											</Variable>
										</ArrayType>
									</Variable>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> army_array </Name>
										<Type> Array </Type>
										<Constant> false </Constant>
										<ArrayType>
											<Variable>
												<Name> _ </Name>
												<Type> API_Army </Type>
												<Constant> false </Constant>
											</Variable>
										</ArrayType>
									</Variable>
								</Equation>
							</SetObject>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
				<Function>
					<Name> Insert </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> void </Type>
						<Constant> false </Constant>
					</Variable>
					<VariableSet Name="Parameters">
						<Variable>
							<Name> element </Name>
							<Type> API_Army </Type>
							<Constant> false </Constant>
						</Variable>
					</VariableSet>
					<Implementation>
						<WrittenCode> call GrowArray();&#13;
note  for some reason the next three lines don't work right note if (greaterThanOrEqualTo(last_filled_index, army_array.length))&#13; note call GrowArray();&#13;
note  endif;&#13;
set army_array[last_filled_index + 1] = element;&#13;
set last_filled_index = last_filled_index + 1; </WrittenCode>
						<Statement type="call">
							<Calculation>
								<Equation>
									<FunctionReference>
										<Name> GrowArray </Name>
										<Variable>
											<Name> returnType </Name>
											<Type> void </Type>
											<Constant> false </Constant>
										</Variable><VariableSet Name="Parameters"/>
										<IsMethod> false </IsMethod>
										<Source> GM </Source>
									</FunctionReference>
								</Equation>
							</Calculation>
						</Statement>
						<Statement type="note">
							<CommentText>   for some reason the next three lines don't work right note if (greaterThanOrEqualTo(last_filled_index, army_array.length))&#13; note call GrowArray() </CommentText>
						</Statement>
						<Statement type="note">
							<CommentText>   endif </CommentText>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> element </Name>
										<Type> API_Army </Type>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> army_array </Name>
										<Type> Array </Type>
										<Constant> false </Constant>
										<ArrayType>
											<Variable>
												<Name> _ </Name>
												<Type> API_Army </Type>
												<Constant> false </Constant>
											</Variable>
										</ArrayType>
									</Variable>
									<Parameters>
										<Equation>
											<Variable>
												<Name> last_filled_index </Name>
												<Type> Integer </Type>
												<Value> |1| </Value>
												<Constant> false </Constant>
											</Variable>
											<Operation op="+">
												<Equation>
													<Variable>
														<Name> _UNNAMED </Name>
														<Type> Integer </Type>
														<Value> |1| </Value>
														<Constant> true </Constant>
													</Variable>
												</Equation>
											</Operation>
										</Equation>
									</Parameters>
								</Equation>
							</SetObject>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> last_filled_index </Name>
										<Type> Integer </Type>
										<Value> |1| </Value>
										<Constant> false </Constant>
									</Variable>
									<Operation op="+">
										<Equation>
											<Variable>
												<Name> _UNNAMED </Name>
												<Type> Integer </Type>
												<Value> |1| </Value>
												<Constant> true </Constant>
											</Variable>
										</Equation>
									</Operation>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> last_filled_index </Name>
										<Type> Integer </Type>
										<Value> |1| </Value>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</SetObject>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
				<Function>
					<Name> ShrinkArray </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> void </Type>
						<Constant> false </Constant>
					</Variable><VariableSet Name="Parameters"/>
					<Implementation>
						<WrittenCode> declare new_array : Array of API_Army;&#13;
for i = 1 to last_filled_index step 1&#13;
	set new_array[i] = army_array[i];&#13;
endfor;&#13;
set army_array = new_array; </WrittenCode>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> new_array </Name>
								<Type> Array </Type>
								<Constant> false </Constant>
								<ArrayType>
									<Variable>
										<Name>  </Name>
										<Type> API_Army </Type>
										<Constant> false </Constant>
									</Variable>
								</ArrayType>
							</Variable>
						</Statement>
						<Statement type="for">
							<StatementBlock>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> army_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ </Name>
														<Type> API_Army </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> new_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name>  </Name>
														<Type> API_Army </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</SetObject>
								</Statement>
							</StatementBlock>
							<Variable purpose="for">
								<Name> i </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="start">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
							<Variable purpose="end">
								<Name> last_filled_index </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="step">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> new_array </Name>
										<Type> Array </Type>
										<Constant> false </Constant>
										<ArrayType>
											<Variable>
												<Name>  </Name>
												<Type> API_Army </Type>
												<Constant> false </Constant>
											</Variable>
										</ArrayType>
									</Variable>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> army_array </Name>
										<Type> Array </Type>
										<Constant> false </Constant>
										<ArrayType>
											<Variable>
												<Name> _ </Name>
												<Type> API_Army </Type>
												<Constant> false </Constant>
											</Variable>
										</ArrayType>
									</Variable>
								</Equation>
							</SetObject>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
			</methods>
			<members>
				<Variable>
					<Name> army_array </Name>
					<Type> Array </Type>
					<Constant> false </Constant>
					<ArrayType>
						<Variable>
							<Name> _ </Name>
							<Type> API_Army </Type>
							<Constant> false </Constant>
						</Variable>
					</ArrayType>
				</Variable>
				<Variable>
					<Name> last_filled_index </Name>
					<Type> Integer </Type>
					<Value> |1| </Value>
					<Constant> false </Constant>
				</Variable>
			</members>
		</Structure>
		<Structure>
			<name> API_City </name>
			<super>  </super><methods/>
			<members>
				<Variable>
					<Name> m_pPlayer </Name>
					<Type> API_Player </Type>
					<Constant> false </Constant>
				</Variable>
				<Variable>
					<Name> m_iCityId </Name>
					<Type> Integer </Type>
					<Value> |-5| </Value>
					<Constant> false </Constant>
				</Variable>
				<Variable>
					<Name> x_pos </Name>
					<Type> Integer </Type>
					<Value> |-5| </Value>
					<Constant> false </Constant>
				</Variable>
				<Variable>
					<Name> y_pos </Name>
					<Type> Integer </Type>
					<Value> |-5| </Value>
					<Constant> false </Constant>
				</Variable>
			</members>
		</Structure>
		<Structure>
			<name> API_City_List </name>
			<super>  </super>
			<methods>
				<Function>
					<Name> Delete </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> void </Type>
						<Constant> false </Constant>
					</Variable>
					<VariableSet Name="Parameters">
						<Variable>
							<Name> city_id </Name>
							<Type> Integer </Type>
							<Constant> false </Constant>
						</Variable>
					</VariableSet>
					<Implementation>
						<WrittenCode> declare index_to_remove : Integer;&#13;
declare curr : API_City;&#13;
set index_to_remove = -1;&#13;
for i = 0 to last_filled_index step 1&#13;
	set curr = city_array[i];&#13;
	if (equals(curr.m_iCityId, city_id))&#13;
		set index_to_remove = i;&#13;
	endif;&#13;
endfor;&#13;
if (not(equals(index_to_remove, -1)))&#13;
	for i = index_to_remove to last_filled_index step 1&#13;
		note  starting with the city to be removed, slide all elements in the array down by one;&#13;
		declare this_city : API_City;&#13;
		set this_city = city_array[i];&#13;
		if (equals(i, last_filled_index))
			set this_city.m_pPlayer.m_iIndex = -5;
			set this_city.m_iCityId = -5;
			set this_city.x_pos = -5;
			set this_city.y_pos = -5;
			set city_array[i] = this_city;
			set last_filled_index = last_filled_index - 1;
			if (lessThan(last_filled_index, city_array.length / 2))
				call ShrinkArray();
			endif;
		else&#13;
			declare next_city : API_City;
			set next_city = city_array[i + 1];
			set this_city.x_pos = next_city.x_pos;
			set this_city.y_pos = next_city.y_pos;
			set city_array[i] = this_city;
		endif;&#13;
	endfor;&#13;
endif; </WrittenCode>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> index_to_remove </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
						</Statement>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> curr </Name>
								<Type> API_City </Type>
								<Constant> false </Constant>
							</Variable>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> _UNNAMED </Name>
										<Type> Integer </Type>
										<Value> |-1| </Value>
										<Constant> true </Constant>
									</Variable>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> index_to_remove </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</SetObject>
						</Statement>
						<Statement type="for">
							<StatementBlock>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> city_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ </Name>
														<Type> API_City </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> curr </Name>
												<Type> API_City </Type>
												<Constant> false </Constant>
											</Variable>
										</Equation>
									</SetObject>
								</Statement>
								<Statement type="if">
									<Condition>
										<Equation>
											<FunctionReference>
												<Name> equals </Name>
												<Variable>
													<Name>  </Name>
													<Type> Boolean </Type>
													<Constant> false </Constant>
												</Variable>
												<VariableSet Name="Parameters">
													<Variable>
														<Name> param1 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
													<Variable>
														<Name> param2 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</VariableSet>
												<IsMethod> false </IsMethod>
												<Source> PC </Source>
											</FunctionReference>
											<Parameters>
												<Equation>
													<Variable>
														<Name> curr.m_iCityId </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
												<Equation>
													<Variable>
														<Name> city_id </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Condition>
									<StatementBlock>
										<Statement type="set">
											<Calculation>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Calculation>
											<SetObject>
												<Equation>
													<Variable>
														<Name> index_to_remove </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</SetObject>
										</Statement>
									</StatementBlock>
								</Statement>
							</StatementBlock>
							<Variable purpose="for">
								<Name> i </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="start">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |0| </Value>
								<Constant> true </Constant>
							</Variable>
							<Variable purpose="end">
								<Name> last_filled_index </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="step">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
						</Statement>
						<Statement type="if">
							<Condition>
								<Equation>
									<FunctionReference>
										<Name> not </Name>
										<Variable>
											<Name>  </Name>
											<Type> Boolean </Type>
											<Constant> false </Constant>
										</Variable>
										<VariableSet Name="Parameters">
											<Variable>
												<Name> param1 </Name>
												<Type> Boolean </Type>
												<Constant> false </Constant>
											</Variable>
										</VariableSet>
										<IsMethod> false </IsMethod>
										<Source> PC </Source>
									</FunctionReference>
									<Parameters>
										<Equation>
											<FunctionReference>
												<Name> equals </Name>
												<Variable>
													<Name>  </Name>
													<Type> Boolean </Type>
													<Constant> false </Constant>
												</Variable>
												<VariableSet Name="Parameters">
													<Variable>
														<Name> param1 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
													<Variable>
														<Name> param2 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</VariableSet>
												<IsMethod> false </IsMethod>
												<Source> PC </Source>
											</FunctionReference>
											<Parameters>
												<Equation>
													<Variable>
														<Name> index_to_remove </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
												<Equation>
													<Variable>
														<Name> _UNNAMED </Name>
														<Type> Integer </Type>
														<Value> |-1| </Value>
														<Constant> true </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Parameters>
								</Equation>
							</Condition>
							<StatementBlock>
								<Statement type="for">
									<StatementBlock>
										<Statement type="note">
											<CommentText>   starting with the city to be removed, slide all elements in the array down by one </CommentText>
										</Statement>
										<Statement type="declare">
											<Variable purpose="declare">
												<Name> this_city </Name>
												<Type> API_City </Type>
												<Constant> false </Constant>
											</Variable>
										</Statement>
										<Statement type="set">
											<Calculation>
												<Equation>
													<Variable>
														<Name> city_array </Name>
														<Type> Array </Type>
														<Constant> false </Constant>
														<ArrayType>
															<Variable>
																<Name> _ </Name>
																<Type> API_City </Type>
																<Constant> false </Constant>
															</Variable>
														</ArrayType>
													</Variable>
													<Parameters>
														<Equation>
															<Variable>
																<Name> i </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Parameters>
												</Equation>
											</Calculation>
											<SetObject>
												<Equation>
													<Variable>
														<Name> this_city </Name>
														<Type> API_City </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</SetObject>
										</Statement>
										<Statement type="if">
											<Condition>
												<Equation>
													<FunctionReference>
														<Name> equals </Name>
														<Variable>
															<Name>  </Name>
															<Type> Boolean </Type>
															<Constant> false </Constant>
														</Variable>
														<VariableSet Name="Parameters">
															<Variable>
																<Name> param1 </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
															<Variable>
																<Name> param2 </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</VariableSet>
														<IsMethod> false </IsMethod>
														<Source> PC </Source>
													</FunctionReference>
													<Parameters>
														<Equation>
															<Variable>
																<Name> i </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
														<Equation>
															<Variable>
																<Name> last_filled_index </Name>
																<Type> Integer </Type>
																<Value> |1| </Value>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Parameters>
												</Equation>
											</Condition>
											<StatementBlock>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> _UNNAMED </Name>
																<Type> Integer </Type>
																<Value> |-5| </Value>
																<Constant> true </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> this_city.m_pPlayer.m_iIndex </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> _UNNAMED </Name>
																<Type> Integer </Type>
																<Value> |-5| </Value>
																<Constant> true </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> this_city.m_iCityId </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> _UNNAMED </Name>
																<Type> Integer </Type>
																<Value> |-5| </Value>
																<Constant> true </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> this_city.x_pos </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> _UNNAMED </Name>
																<Type> Integer </Type>
																<Value> |-5| </Value>
																<Constant> true </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> this_city.y_pos </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> this_city </Name>
																<Type> API_City </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> city_array </Name>
																<Type> Array </Type>
																<Constant> false </Constant>
																<ArrayType>
																	<Variable>
																		<Name> _ </Name>
																		<Type> API_City </Type>
																		<Constant> false </Constant>
																	</Variable>
																</ArrayType>
															</Variable>
															<Parameters>
																<Equation>
																	<Variable>
																		<Name> i </Name>
																		<Type> Integer </Type>
																		<Constant> false </Constant>
																	</Variable>
																</Equation>
															</Parameters>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> last_filled_index </Name>
																<Type> Integer </Type>
																<Value> |1| </Value>
																<Constant> false </Constant>
															</Variable>
															<Operation op="-">
																<Equation>
																	<Variable>
																		<Name> _UNNAMED </Name>
																		<Type> Integer </Type>
																		<Value> |1| </Value>
																		<Constant> true </Constant>
																	</Variable>
																</Equation>
															</Operation>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> last_filled_index </Name>
																<Type> Integer </Type>
																<Value> |1| </Value>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="if">
													<Condition>
														<Equation>
															<FunctionReference>
																<Name> lessThan </Name>
																<Variable>
																	<Name>  </Name>
																	<Type> Boolean </Type>
																	<Constant> false </Constant>
																</Variable>
																<VariableSet Name="Parameters">
																	<Variable>
																		<Name> param1 </Name>
																		<Type> Integer </Type>
																		<Constant> false </Constant>
																	</Variable>
																	<Variable>
																		<Name> param2 </Name>
																		<Type> Integer </Type>
																		<Constant> false </Constant>
																	</Variable>
																</VariableSet>
																<IsMethod> false </IsMethod>
																<Source> PC </Source>
															</FunctionReference>
															<Parameters>
																<Equation>
																	<Variable>
																		<Name> last_filled_index </Name>
																		<Type> Integer </Type>
																		<Value> |1| </Value>
																		<Constant> false </Constant>
																	</Variable>
																</Equation>
																<Equation>
																	<Variable>
																		<Name> city_array.length </Name>
																		<Type> Integer </Type>
																		<Constant> false </Constant>
																	</Variable>
																	<Operation op="/">
																		<Equation>
																			<Variable>
																				<Name> _UNNAMED </Name>
																				<Type> Integer </Type>
																				<Value> |2| </Value>
																				<Constant> true </Constant>
																			</Variable>
																		</Equation>
																	</Operation>
																</Equation>
															</Parameters>
														</Equation>
													</Condition>
													<StatementBlock>
														<Statement type="call">
															<Calculation>
																<Equation>
																	<FunctionReference>
																		<Name> ShrinkArray </Name>
																		<Variable>
																			<Name> returnType </Name>
																			<Type> void </Type>
																			<Constant> false </Constant>
																		</Variable><VariableSet Name="Parameters"/>
																		<IsMethod> false </IsMethod>
																		<Source> GM </Source>
																	</FunctionReference>
																</Equation>
															</Calculation>
														</Statement>
													</StatementBlock>
												</Statement>
											</StatementBlock>
											<ElseBlock>
												<Statement type="declare">
													<Variable purpose="declare">
														<Name> next_city </Name>
														<Type> API_City </Type>
														<Constant> false </Constant>
													</Variable>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> city_array </Name>
																<Type> Array </Type>
																<Constant> false </Constant>
																<ArrayType>
																	<Variable>
																		<Name> _ </Name>
																		<Type> API_City </Type>
																		<Constant> false </Constant>
																	</Variable>
																</ArrayType>
															</Variable>
															<Parameters>
																<Equation>
																	<Variable>
																		<Name> i </Name>
																		<Type> Integer </Type>
																		<Constant> false </Constant>
																	</Variable>
																	<Operation op="+">
																		<Equation>
																			<Variable>
																				<Name> _UNNAMED </Name>
																				<Type> Integer </Type>
																				<Value> |1| </Value>
																				<Constant> true </Constant>
																			</Variable>
																		</Equation>
																	</Operation>
																</Equation>
															</Parameters>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> next_city </Name>
																<Type> API_City </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> next_city.x_pos </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> this_city.x_pos </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> next_city.y_pos </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> this_city.y_pos </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</SetObject>
												</Statement>
												<Statement type="set">
													<Calculation>
														<Equation>
															<Variable>
																<Name> this_city </Name>
																<Type> API_City </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Calculation>
													<SetObject>
														<Equation>
															<Variable>
																<Name> city_array </Name>
																<Type> Array </Type>
																<Constant> false </Constant>
																<ArrayType>
																	<Variable>
																		<Name> _ </Name>
																		<Type> API_City </Type>
																		<Constant> false </Constant>
																	</Variable>
																</ArrayType>
															</Variable>
															<Parameters>
																<Equation>
																	<Variable>
																		<Name> i </Name>
																		<Type> Integer </Type>
																		<Constant> false </Constant>
																	</Variable>
																</Equation>
															</Parameters>
														</Equation>
													</SetObject>
												</Statement>
											</ElseBlock>
										</Statement>
									</StatementBlock>
									<Variable purpose="for">
										<Name> i </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
									<Variable purpose="start">
										<Name> index_to_remove </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
									<Variable purpose="end">
										<Name> last_filled_index </Name>
										<Type> Integer </Type>
										<Value> |1| </Value>
										<Constant> false </Constant>
									</Variable>
									<Variable purpose="step">
										<Name> _UNNAMED </Name>
										<Type> Integer </Type>
										<Value> |1| </Value>
										<Constant> true </Constant>
									</Variable>
								</Statement>
							</StatementBlock>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
				<Function>
					<Name> FindElement </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> Integer </Type>
						<Constant> false </Constant>
					</Variable>
					<VariableSet Name="Parameters">
						<Variable>
							<Name> city_id </Name>
							<Type> Integer </Type>
							<Constant> false </Constant>
						</Variable>
					</VariableSet>
					<Implementation>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> index_found </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> _UNNAMED </Name>
										<Type> Integer </Type>
										<Value> |-1| </Value>
										<Constant> true </Constant>
									</Variable>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> index_found </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</SetObject>
						</Statement>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> curr </Name>
								<Type> API_City </Type>
								<Constant> false </Constant>
							</Variable>
						</Statement>
						<Statement type="for">
							<StatementBlock>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> city_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ </Name>
														<Type> API_City </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> curr </Name>
												<Type> API_City </Type>
												<Constant> false </Constant>
											</Variable>
										</Equation>
									</SetObject>
								</Statement>
								<Statement type="if">
									<Condition>
										<Equation>
											<FunctionReference>
												<Name> equals </Name>
												<Variable>
													<Name>  </Name>
													<Type> Boolean </Type>
													<Constant> false </Constant>
												</Variable>
												<VariableSet Name="Parameters">
													<Variable>
														<Name> param1 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
													<Variable>
														<Name> param2 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</VariableSet>
												<IsMethod> false </IsMethod>
												<Source> PC </Source>
											</FunctionReference>
											<Parameters>
												<Equation>
													<Variable>
														<Name> curr.m_iCityId </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
												<Equation>
													<Variable>
														<Name> city_id </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Condition>
									<StatementBlock>
										<Statement type="set">
											<Calculation>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Calculation>
											<SetObject>
												<Equation>
													<Variable>
														<Name> index_found </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</SetObject>
										</Statement>
									</StatementBlock>
								</Statement>
							</StatementBlock>
							<Variable purpose="for">
								<Name> i </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="start">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
							<Variable purpose="end">
								<Name> last_filled_index </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="step">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
						</Statement>
						<Statement type="return">
							<Calculation>
								<Equation>
									<Variable>
										<Name> index_found </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</Calculation>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
				<Function>
					<Name> FindElement </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> Integer </Type>
						<Constant> false </Constant>
					</Variable>
					<VariableSet Name="Parameters">
						<Variable>
							<Name> x_pos </Name>
							<Type> Integer </Type>
							<Constant> false </Constant>
						</Variable>
						<Variable>
							<Name> y_pos </Name>
							<Type> Integer </Type>
							<Constant> false </Constant>
						</Variable>
					</VariableSet>
					<Implementation>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> index_found </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> _UNNAMED </Name>
										<Type> Integer </Type>
										<Value> |-1| </Value>
										<Constant> true </Constant>
									</Variable>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> index_found </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</SetObject>
						</Statement>
						<Statement type="for">
							<StatementBlock>
								<Statement type="declare">
									<Variable purpose="declare">
										<Name> temp_city </Name>
										<Type> API_City </Type>
										<Constant> false </Constant>
									</Variable>
								</Statement>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> my_city_locations.city_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ARRAYTYPE </Name>
														<Type> API_City </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> temp_city </Name>
												<Type> API_City </Type>
												<Constant> false </Constant>
											</Variable>
										</Equation>
									</SetObject>
								</Statement>
								<Statement type="if">
									<Condition>
										<Equation>
											<FunctionReference>
												<Name> equals </Name>
												<Variable>
													<Name>  </Name>
													<Type> Boolean </Type>
													<Constant> false </Constant>
												</Variable>
												<VariableSet Name="Parameters">
													<Variable>
														<Name> param1 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
													<Variable>
														<Name> param2 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</VariableSet>
												<IsMethod> false </IsMethod>
												<Source> PC </Source>
											</FunctionReference>
											<Parameters>
												<Equation>
													<Variable>
														<Name> temp_city.x_pos </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
												<Equation>
													<Variable>
														<Name> x_pos </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
											<Operation op="and">
												<Equation>
													<FunctionReference>
														<Name> equals </Name>
														<Variable>
															<Name>  </Name>
															<Type> Boolean </Type>
															<Constant> false </Constant>
														</Variable>
														<VariableSet Name="Parameters">
															<Variable>
																<Name> param1 </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
															<Variable>
																<Name> param2 </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</VariableSet>
														<IsMethod> false </IsMethod>
														<Source> PC </Source>
													</FunctionReference>
													<Parameters>
														<Equation>
															<Variable>
																<Name> temp_city.y_pos </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
														<Equation>
															<Variable>
																<Name> y_pos </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Parameters>
												</Equation>
											</Operation>
										</Equation>
									</Condition>
									<StatementBlock>
										<Statement type="set">
											<Calculation>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Calculation>
											<SetObject>
												<Equation>
													<Variable>
														<Name> index_found </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</SetObject>
										</Statement>
										<Statement type="return">
											<Calculation>
												<Equation>
													<Variable>
														<Name> index_found </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Calculation>
										</Statement>
									</StatementBlock>
								</Statement>
							</StatementBlock>
							<Variable purpose="for">
								<Name> i </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="start">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
							<Variable purpose="end">
								<Name> my_city_locations.last_filled_index </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="step">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
						</Statement>
						<Statement type="return">
							<Calculation>
								<Equation>
									<Variable>
										<Name> index_found </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</Calculation>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
				<Function>
					<Name> GetNumElements </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> Integer </Type>
						<Constant> false </Constant>
					</Variable><VariableSet Name="Parameters"/>
					<Implementation>
						<Statement type="return">
							<Calculation>
								<Equation>
									<Variable>
										<Name> last_filled_index </Name>
										<Type> Integer </Type>
										<Value> |1| </Value>
										<Constant> false </Constant>
									</Variable>
									<Operation op="+">
										<Equation>
											<Variable>
												<Name> _UNNAMED </Name>
												<Type> Integer </Type>
												<Value> |1| </Value>
												<Constant> true </Constant>
											</Variable>
										</Equation>
									</Operation>
								</Equation>
							</Calculation>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
				<Function>
					<Name> GrowArray </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> void </Type>
						<Constant> false </Constant>
					</Variable><VariableSet Name="Parameters"/>
					<Implementation>
						<WrittenCode> declare new_array : Array of API_City;&#13;
for i = 1 to last_filled_index step 1&#13;
	set new_array[i] = city_array[i];&#13;
endfor;&#13;
set city_array = new_array; </WrittenCode>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> new_array </Name>
								<Type> Array </Type>
								<Constant> false </Constant>
								<ArrayType>
									<Variable>
										<Name>  </Name>
										<Type> API_City </Type>
										<Constant> false </Constant>
									</Variable>
								</ArrayType>
							</Variable>
						</Statement>
						<Statement type="for">
							<StatementBlock>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> city_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ </Name>
														<Type> API_City </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> new_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name>  </Name>
														<Type> API_City </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</SetObject>
								</Statement>
							</StatementBlock>
							<Variable purpose="for">
								<Name> i </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="start">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
							<Variable purpose="end">
								<Name> last_filled_index </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="step">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> new_array </Name>
										<Type> Array </Type>
										<Constant> false </Constant>
										<ArrayType>
											<Variable>
												<Name>  </Name>
												<Type> API_City </Type>
												<Constant> false </Constant>
											</Variable>
										</ArrayType>
									</Variable>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> city_array </Name>
										<Type> Array </Type>
										<Constant> false </Constant>
										<ArrayType>
											<Variable>
												<Name> _ </Name>
												<Type> API_City </Type>
												<Constant> false </Constant>
											</Variable>
										</ArrayType>
									</Variable>
								</Equation>
							</SetObject>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
				<Function>
					<Name> Insert </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> void </Type>
						<Constant> false </Constant>
					</Variable>
					<VariableSet Name="Parameters">
						<Variable>
							<Name> element </Name>
							<Type> API_City </Type>
							<Constant> false </Constant>
						</Variable>
					</VariableSet>
					<Implementation>
						<Statement type="if">
							<Condition>
								<Equation>
									<FunctionReference>
										<Name> greaterThanOrEqualTo </Name>
										<Variable>
											<Name>  </Name>
											<Type> Boolean </Type>
											<Constant> false </Constant>
										</Variable>
										<VariableSet Name="Parameters">
											<Variable>
												<Name> param1 </Name>
												<Type> Integer </Type>
												<Constant> false </Constant>
											</Variable>
											<Variable>
												<Name> param2 </Name>
												<Type> Integer </Type>
												<Constant> false </Constant>
											</Variable>
										</VariableSet>
										<IsMethod> false </IsMethod>
										<Source> PC </Source>
									</FunctionReference>
									<Parameters>
										<Equation>
											<Variable>
												<Name> last_filled_index </Name>
												<Type> Integer </Type>
												<Value> |1| </Value>
												<Constant> false </Constant>
											</Variable>
										</Equation>
										<Equation>
											<Variable>
												<Name> city_array.length </Name>
												<Type> Integer </Type>
												<Constant> false </Constant>
											</Variable>
										</Equation>
									</Parameters>
								</Equation>
							</Condition>
							<StatementBlock>
								<Statement type="call">
									<Calculation>
										<Equation>
											<FunctionReference>
												<Name> GrowArray </Name>
												<Variable>
													<Name> returnType </Name>
													<Type> void </Type>
													<Constant> false </Constant>
												</Variable><VariableSet Name="Parameters"/>
												<IsMethod> false </IsMethod>
												<Source> GM </Source>
											</FunctionReference>
										</Equation>
									</Calculation>
								</Statement>
							</StatementBlock>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> element </Name>
										<Type> API_City </Type>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> city_array </Name>
										<Type> Array </Type>
										<Constant> false </Constant>
										<ArrayType>
											<Variable>
												<Name> _ </Name>
												<Type> API_City </Type>
												<Constant> false </Constant>
											</Variable>
										</ArrayType>
									</Variable>
									<Parameters>
										<Equation>
											<Variable>
												<Name> last_filled_index </Name>
												<Type> Integer </Type>
												<Value> |1| </Value>
												<Constant> false </Constant>
											</Variable>
											<Operation op="+">
												<Equation>
													<Variable>
														<Name> _UNNAMED </Name>
														<Type> Integer </Type>
														<Value> |1| </Value>
														<Constant> true </Constant>
													</Variable>
												</Equation>
											</Operation>
										</Equation>
									</Parameters>
								</Equation>
							</SetObject>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> last_filled_index </Name>
										<Type> Integer </Type>
										<Value> |1| </Value>
										<Constant> false </Constant>
									</Variable>
									<Operation op="+">
										<Equation>
											<Variable>
												<Name> _UNNAMED </Name>
												<Type> Integer </Type>
												<Value> |1| </Value>
												<Constant> true </Constant>
											</Variable>
										</Equation>
									</Operation>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> last_filled_index </Name>
										<Type> Integer </Type>
										<Value> |1| </Value>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</SetObject>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
				<Function>
					<Name> ShrinkArray </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> void </Type>
						<Constant> false </Constant>
					</Variable><VariableSet Name="Parameters"/>
					<Implementation>
						<WrittenCode> declare new_array : Array of API_City;&#13;
for i = 1 to last_filled_index step 1&#13;
	set new_array[i] = city_array[i];&#13;
endfor;&#13;
set city_array = new_array; </WrittenCode>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> new_array </Name>
								<Type> Array </Type>
								<Constant> false </Constant>
								<ArrayType>
									<Variable>
										<Name>  </Name>
										<Type> API_City </Type>
										<Constant> false </Constant>
									</Variable>
								</ArrayType>
							</Variable>
						</Statement>
						<Statement type="for">
							<StatementBlock>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> city_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ </Name>
														<Type> API_City </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> new_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name>  </Name>
														<Type> API_City </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</SetObject>
								</Statement>
							</StatementBlock>
							<Variable purpose="for">
								<Name> i </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="start">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
							<Variable purpose="end">
								<Name> last_filled_index </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="step">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> new_array </Name>
										<Type> Array </Type>
										<Constant> false </Constant>
										<ArrayType>
											<Variable>
												<Name>  </Name>
												<Type> API_City </Type>
												<Constant> false </Constant>
											</Variable>
										</ArrayType>
									</Variable>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> city_array </Name>
										<Type> Array </Type>
										<Constant> false </Constant>
										<ArrayType>
											<Variable>
												<Name> _ </Name>
												<Type> API_City </Type>
												<Constant> false </Constant>
											</Variable>
										</ArrayType>
									</Variable>
								</Equation>
							</SetObject>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
			</methods>
			<members>
				<Variable>
					<Name> city_array </Name>
					<Type> Array </Type>
					<Constant> false </Constant>
					<ArrayType>
						<Variable>
							<Name> _ </Name>
							<Type> API_City </Type>
							<Constant> false </Constant>
						</Variable>
					</ArrayType>
				</Variable>
				<Variable>
					<Name> last_filled_index </Name>
					<Type> Integer </Type>
					<Value> |1| </Value>
					<Constant> false </Constant>
				</Variable>
			</members>
		</Structure>
		<Structure>
			<name> API_Location </name>
			<super>  </super><methods/>
			<members>
				<Variable>
					<Name> m_iXCoord </Name>
					<Type> Integer </Type>
					<Constant> false </Constant>
				</Variable>
				<Variable>
					<Name> m_iYCoord </Name>
					<Type> Integer </Type>
					<Constant> false </Constant>
				</Variable>
			</members>
		</Structure>
		<Structure>
			<name> API_Location_List </name>
			<super>  </super>
			<methods>
				<Function>
					<Name> Delete </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> void </Type>
						<Constant> false </Constant>
					</Variable>
					<VariableSet Name="Parameters">
						<Variable>
							<Name> x_coord </Name>
							<Type> Integer </Type>
							<Constant> false </Constant>
						</Variable>
						<Variable>
							<Name> y_coord </Name>
							<Type> Integer </Type>
							<Constant> false </Constant>
						</Variable>
					</VariableSet>
					<Implementation>
						<WrittenCode> declare index_to_remove : Integer;&#13;
declare curr : API_Location;&#13;
set index_to_remove = -1;&#13;
for i = 0 to last_filled_index step 1&#13;
	set curr = location_array[i];&#13;
	if (equals(curr.m_iXCoord, x_coord) and equals(curr.m_iYCoord, y_coord))&#13;
		set index_to_remove = i;&#13;
	endif;&#13;
endfor;&#13;
if (not(equals(index_to_remove, -1)))&#13;
	set curr.m_iXCoord = -1;&#13;
	set curr.m_iYCoord = -1;&#13;
	set location_array[index_to_remove] = location_array[last_filled_index];&#13;
	set location_array[last_filled_index] = curr;&#13;
	set last_filled_index = last_filled_index - 1;&#13;
	if (lessThan(last_filled_index, location_array.length / 2))&#13;
		call ShrinkArray();&#13;
	endif;&#13;
endif; </WrittenCode>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> index_to_remove </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
						</Statement>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> curr </Name>
								<Type> API_Location </Type>
								<Constant> false </Constant>
							</Variable>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> _UNNAMED </Name>
										<Type> Integer </Type>
										<Value> |-1| </Value>
										<Constant> true </Constant>
									</Variable>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> index_to_remove </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</SetObject>
						</Statement>
						<Statement type="for">
							<StatementBlock>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> location_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ </Name>
														<Type> API_Location </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> curr </Name>
												<Type> API_Location </Type>
												<Constant> false </Constant>
											</Variable>
										</Equation>
									</SetObject>
								</Statement>
								<Statement type="if">
									<Condition>
										<Equation>
											<FunctionReference>
												<Name> equals </Name>
												<Variable>
													<Name>  </Name>
													<Type> Boolean </Type>
													<Constant> false </Constant>
												</Variable>
												<VariableSet Name="Parameters">
													<Variable>
														<Name> param1 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
													<Variable>
														<Name> param2 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</VariableSet>
												<IsMethod> false </IsMethod>
												<Source> PC </Source>
											</FunctionReference>
											<Parameters>
												<Equation>
													<Variable>
														<Name> curr.m_iXCoord </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
												<Equation>
													<Variable>
														<Name> x_coord </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
											<Operation op="and">
												<Equation>
													<FunctionReference>
														<Name> equals </Name>
														<Variable>
															<Name>  </Name>
															<Type> Boolean </Type>
															<Constant> false </Constant>
														</Variable>
														<VariableSet Name="Parameters">
															<Variable>
																<Name> param1 </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
															<Variable>
																<Name> param2 </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</VariableSet>
														<IsMethod> false </IsMethod>
														<Source> PC </Source>
													</FunctionReference>
													<Parameters>
														<Equation>
															<Variable>
																<Name> curr.m_iYCoord </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
														<Equation>
															<Variable>
																<Name> y_coord </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Parameters>
												</Equation>
											</Operation>
										</Equation>
									</Condition>
									<StatementBlock>
										<Statement type="set">
											<Calculation>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Calculation>
											<SetObject>
												<Equation>
													<Variable>
														<Name> index_to_remove </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</SetObject>
										</Statement>
									</StatementBlock>
								</Statement>
							</StatementBlock>
							<Variable purpose="for">
								<Name> i </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="start">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |0| </Value>
								<Constant> true </Constant>
							</Variable>
							<Variable purpose="end">
								<Name> last_filled_index </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="step">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
						</Statement>
						<Statement type="if">
							<Condition>
								<Equation>
									<FunctionReference>
										<Name> not </Name>
										<Variable>
											<Name>  </Name>
											<Type> Boolean </Type>
											<Constant> false </Constant>
										</Variable>
										<VariableSet Name="Parameters">
											<Variable>
												<Name> param1 </Name>
												<Type> Boolean </Type>
												<Constant> false </Constant>
											</Variable>
										</VariableSet>
										<IsMethod> false </IsMethod>
										<Source> PC </Source>
									</FunctionReference>
									<Parameters>
										<Equation>
											<FunctionReference>
												<Name> equals </Name>
												<Variable>
													<Name>  </Name>
													<Type> Boolean </Type>
													<Constant> false </Constant>
												</Variable>
												<VariableSet Name="Parameters">
													<Variable>
														<Name> param1 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
													<Variable>
														<Name> param2 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</VariableSet>
												<IsMethod> false </IsMethod>
												<Source> PC </Source>
											</FunctionReference>
											<Parameters>
												<Equation>
													<Variable>
														<Name> index_to_remove </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
												<Equation>
													<Variable>
														<Name> _UNNAMED </Name>
														<Type> Integer </Type>
														<Value> |-1| </Value>
														<Constant> true </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Parameters>
								</Equation>
							</Condition>
							<StatementBlock>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> _UNNAMED </Name>
												<Type> Integer </Type>
												<Value> |-1| </Value>
												<Constant> true </Constant>
											</Variable>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> curr.m_iXCoord </Name>
												<Type> Integer </Type>
												<Constant> false </Constant>
											</Variable>
										</Equation>
									</SetObject>
								</Statement>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> _UNNAMED </Name>
												<Type> Integer </Type>
												<Value> |-1| </Value>
												<Constant> true </Constant>
											</Variable>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> curr.m_iYCoord </Name>
												<Type> Integer </Type>
												<Constant> false </Constant>
											</Variable>
										</Equation>
									</SetObject>
								</Statement>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> location_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ </Name>
														<Type> API_Location </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> last_filled_index </Name>
														<Type> Integer </Type>
														<Value> |1| </Value>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> location_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ </Name>
														<Type> API_Location </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> index_to_remove </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</SetObject>
								</Statement>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> curr </Name>
												<Type> API_Location </Type>
												<Constant> false </Constant>
											</Variable>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> location_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ </Name>
														<Type> API_Location </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> last_filled_index </Name>
														<Type> Integer </Type>
														<Value> |1| </Value>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</SetObject>
								</Statement>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> last_filled_index </Name>
												<Type> Integer </Type>
												<Value> |1| </Value>
												<Constant> false </Constant>
											</Variable>
											<Operation op="-">
												<Equation>
													<Variable>
														<Name> _UNNAMED </Name>
														<Type> Integer </Type>
														<Value> |1| </Value>
														<Constant> true </Constant>
													</Variable>
												</Equation>
											</Operation>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> last_filled_index </Name>
												<Type> Integer </Type>
												<Value> |1| </Value>
												<Constant> false </Constant>
											</Variable>
										</Equation>
									</SetObject>
								</Statement>
								<Statement type="if">
									<Condition>
										<Equation>
											<FunctionReference>
												<Name> lessThan </Name>
												<Variable>
													<Name>  </Name>
													<Type> Boolean </Type>
													<Constant> false </Constant>
												</Variable>
												<VariableSet Name="Parameters">
													<Variable>
														<Name> param1 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
													<Variable>
														<Name> param2 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</VariableSet>
												<IsMethod> false </IsMethod>
												<Source> PC </Source>
											</FunctionReference>
											<Parameters>
												<Equation>
													<Variable>
														<Name> last_filled_index </Name>
														<Type> Integer </Type>
														<Value> |1| </Value>
														<Constant> false </Constant>
													</Variable>
												</Equation>
												<Equation>
													<Variable>
														<Name> location_array.length </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
													<Operation op="/">
														<Equation>
															<Variable>
																<Name> _UNNAMED </Name>
																<Type> Integer </Type>
																<Value> |2| </Value>
																<Constant> true </Constant>
															</Variable>
														</Equation>
													</Operation>
												</Equation>
											</Parameters>
										</Equation>
									</Condition>
									<StatementBlock>
										<Statement type="call">
											<Calculation>
												<Equation>
													<FunctionReference>
														<Name> ShrinkArray </Name>
														<Variable>
															<Name> returnType </Name>
															<Type> void </Type>
															<Constant> false </Constant>
														</Variable><VariableSet Name="Parameters"/>
														<IsMethod> false </IsMethod>
														<Source> GM </Source>
													</FunctionReference>
												</Equation>
											</Calculation>
										</Statement>
									</StatementBlock>
								</Statement>
							</StatementBlock>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
				<Function>
					<Name> FindElement </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> Integer </Type>
						<Constant> false </Constant>
					</Variable>
					<VariableSet Name="Parameters">
						<Variable>
							<Name> x_coord </Name>
							<Type> Integer </Type>
							<Constant> false </Constant>
						</Variable>
						<Variable>
							<Name> y_coord </Name>
							<Type> Integer </Type>
							<Constant> false </Constant>
						</Variable>
					</VariableSet>
					<Implementation>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> index_found </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
						</Statement>
						<Statement type="set">
							<Calculation>
								<Equation>
									<Variable>
										<Name> _UNNAMED </Name>
										<Type> Integer </Type>
										<Value> |-1| </Value>
										<Constant> true </Constant>
									</Variable>
								</Equation>
							</Calculation>
							<SetObject>
								<Equation>
									<Variable>
										<Name> index_found </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</SetObject>
						</Statement>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> curr </Name>
								<Type> API_Location </Type>
								<Constant> false </Constant>
							</Variable>
						</Statement>
						<Statement type="for">
							<StatementBlock>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> location_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ </Name>
														<Type> API_Location </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> curr </Name>
												<Type> API_Location </Type>
												<Constant> false </Constant>
											</Variable>
										</Equation>
									</SetObject>
								</Statement>
								<Statement type="if">
									<Condition>
										<Equation>
											<FunctionReference>
												<Name> equals </Name>
												<Variable>
													<Name>  </Name>
													<Type> Boolean </Type>
													<Constant> false </Constant>
												</Variable>
												<VariableSet Name="Parameters">
													<Variable>
														<Name> param1 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
													<Variable>
														<Name> param2 </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</VariableSet>
												<IsMethod> false </IsMethod>
												<Source> PC </Source>
											</FunctionReference>
											<Parameters>
												<Equation>
													<Variable>
														<Name> curr.m_iXCoord </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
												<Equation>
													<Variable>
														<Name> x_coord </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
											<Operation op="and">
												<Equation>
													<FunctionReference>
														<Name> equals </Name>
														<Variable>
															<Name>  </Name>
															<Type> Boolean </Type>
															<Constant> false </Constant>
														</Variable>
														<VariableSet Name="Parameters">
															<Variable>
																<Name> param1 </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
															<Variable>
																<Name> param2 </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</VariableSet>
														<IsMethod> false </IsMethod>
														<Source> PC </Source>
													</FunctionReference>
													<Parameters>
														<Equation>
															<Variable>
																<Name> curr.m_iYCoord </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
														<Equation>
															<Variable>
																<Name> y_coord </Name>
																<Type> Integer </Type>
																<Constant> false </Constant>
															</Variable>
														</Equation>
													</Parameters>
												</Equation>
											</Operation>
										</Equation>
									</Condition>
									<StatementBlock>
										<Statement type="set">
											<Calculation>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Calculation>
											<SetObject>
												<Equation>
													<Variable>
														<Name> index_found </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</SetObject>
										</Statement>
									</StatementBlock>
								</Statement>
							</StatementBlock>
							<Variable purpose="for">
								<Name> i </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="start">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
							<Variable purpose="end">
								<Name> last_filled_index </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="step">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
								<Constant> true </Constant>
							</Variable>
						</Statement>
						<Statement type="return">
							<Calculation>
								<Equation>
									<Variable>
										<Name> index_found </Name>
										<Type> Integer </Type>
										<Constant> false </Constant>
									</Variable>
								</Equation>
							</Calculation>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
				<Function>
					<Name> GetNumElements </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> Integer </Type>
						<Constant> false </Constant>
					</Variable><VariableSet Name="Parameters"/>
					<Implementation>
						<Statement type="return">
							<Calculation>
								<Equation>
									<Variable>
										<Name> last_filled_index </Name>
										<Type> Integer </Type>
										<Value> |1| </Value>
										<Constant> false </Constant>
									</Variable>
									<Operation op="+">
										<Equation>
											<Variable>
												<Name> _UNNAMED </Name>
												<Type> Integer </Type>
												<Value> |1| </Value>
												<Constant> true </Constant>
											</Variable>
										</Equation>
									</Operation>
								</Equation>
							</Calculation>
						</Statement>
						<Validated> true </Validated>
					</Implementation>
					<ImplementedDirectly> false </ImplementedDirectly>
					<Source> GM </Source>
					<Package>  </Package>
				</Function>
				<Function>
					<Name> GrowArray </Name>
					<Variable>
						<Name> returnType </Name>
						<Type> void </Type>
						<Constant> false </Constant>
					</Variable><VariableSet Name="Parameters"/>
					<Implementation>
						<WrittenCode> declare new_array : Array of API_Location;&#13;
for i = 1 to last_filled_index step 1&#13;
	set new_array[i] = location_array[i];&#13;
endfor;&#13;
set location_array = new_array; </WrittenCode>
						<Statement type="declare">
							<Variable purpose="declare">
								<Name> new_array </Name>
								<Type> Array </Type>
								<Constant> false </Constant>
								<ArrayType>
									<Variable>
										<Name>  </Name>
										<Type> API_Location </Type>
										<Constant> false </Constant>
									</Variable>
								</ArrayType>
							</Variable>
						</Statement>
						<Statement type="for">
							<StatementBlock>
								<Statement type="set">
									<Calculation>
										<Equation>
											<Variable>
												<Name> location_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name> _ </Name>
														<Type> API_Location </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</Calculation>
									<SetObject>
										<Equation>
											<Variable>
												<Name> new_array </Name>
												<Type> Array </Type>
												<Constant> false </Constant>
												<ArrayType>
													<Variable>
														<Name>  </Name>
														<Type> API_Location </Type>
														<Constant> false </Constant>
													</Variable>
												</ArrayType>
											</Variable>
											<Parameters>
												<Equation>
													<Variable>
														<Name> i </Name>
														<Type> Integer </Type>
														<Constant> false </Constant>
													</Variable>
												</Equation>
											</Parameters>
										</Equation>
									</SetObject>
								</Statement>
							</StatementBlock>
							<Variable purpose="for">
								<Name> i </Name>
								<Type> Integer </Type>
								<Constant> false </Constant>
							</Variable>
							<Variable purpose="start">
								<Name> _UNNAMED </Name>
								<Type> Integer </Type>
								<Value> |1| </Value>
						