For i = 1 To Array.GetItemCount(Shape[2])
TextWindow.WriteLine(Array.GetItemCount(Shape[2])) 'This should be 4, because there are 4 different Arrays
xPosKol1 = Shapes.GetLeft(Shape[2][i][0])
yPosKol1 = Shapes.GetTop(Shape[2][i][0])
xPosKol2 = Shapes.GetLeft(Shape[2][i][0])+Shape[2][i][1]
yPosKol2 = Shapes.GetTop(Shape[2][i][0])+Shape[2][i][2]
If xPosPlayer1 = xPosKol2 Or xPosPlayer1 < xPosKol2 And xPosPlayer1 > xPosKol1 Then
Rechts()
ElseIf xPosPlayer2 = xPosKol1 Or xPosPlayer2 > xPosKol1 And xPosPlayer1 < xPosKol2 Then
Links()
ElseIf yPosPlayer1 = yPosKol2 Or yPosPlayer1 < yPosKol2 And yPosPlayer1 > yPosKol1 Then
Runter()
ElseIf yPosPlayer2 = yPosKol1 Or yPosPlayer2 > yPosKol1 And yPosPlayer1 < yPosKol2 Then
Hoch()
EndIf
EndFor
EndSub
Sub TasteGedrueckt
GT = GraphicsWindow.LastKey
If GT = "Up" Then
Hoch()
ElseIf GT = "Down" Then
Runter()
ElseIf GT = "Left" Then
Links()
ElseIf GT = "Right" Then
Rechts()
EndIf
EndSub