%Sim City Bus Behavior

if ( Two way intersection )

x=randi ( 2 )

if x== 1

Make a u-turn

if x== 2

Make a right/left turn/Go straight

else if ( Three way intersection )

x=randi ( 3 )

if x== 1

Make a u-turn

if x== 2

Make a right/left turn

if x== 3

Go straight

else if ( Four way intersection )

x=randi ( 4 )

if x== 1

Make a u-turn

if x== 2

Make a right turn

if x== 2

Make a left turn

if x== 4

Go straight

else if ( Bus Stop )

x=randi ( 10 )

if x<= 9

Do not pick up passengers

else

Pick up passengers

toggle=yes

y=randi ( 10 )

if y<= 9

Pick up 0 passengers

else

z=randi ( nb passengers at bus stop )

Pick up z passengers

toggle=no