:: Previous Slave In Line
 
<<silently>>

<<for $i to 0; $i < $slaves.length; $i++>>
	<<if $activeSlave.ID == $slaves[$i].ID>>
	<<set $slaves[$i] to $activeSlave>>
	<<set $activeSlave to {}>>
	<<break>>
	<</if>>
<</for>>

<<if $place == 0>>
	<<set $activeSlave to $slavesInLine[$slavesInLine.length-1]>>
<<else>>
	<<set $activeSlave to $slavesInLine[$place-1]>>
<</if>>

<<goto "Slave Interact">>

<</silently>>

src/uncategorized/previousSlaveInLine.tw