Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 38 And igrac.Text = "Igrac1" Then Text2.Text = "gore" klijent.SendData Text2.Text & ";" & x1 & ";" & y1 ElseIf KeyCode = 37 And igrac.Text = "Igrac1" Then Text2.Text = "levo" klijent.SendData Text2.Text & ";" & x1 & ";" & y1 ElseIf KeyCode = 39 And igrac.Text = "Igrac1" Then Text2.Text = "desno" klijent.SendData Text2.Text & ";" & x1 & ";" & y1 ElseIf KeyCode = 40 And igrac.Text = "Igrac1" Then Text2.Text = "dole" klijent.SendData Text2.Text & ";" & x1 & ";" & y1 ElseIf KeyCode = 32 And igrac.Text = "Igrac1" Then Text2.Text = "pucaj" klijent.SendData Text2.Text End If If KeyCode = 27 Then Unload Me End If End Sub Private Sub klijent_DataArrival(ByVal bytesTotal As Long) On Error Resume Next Dim podatak As String Dim a() As String klijent.GetData podatak a = Split(podatak, ";") x2 = a(1) y2 = a(2) If Left(podatak, 5) = "cdole" Then Gore2 = False Levo2 = False Desno2 = False Dole2 = True ElseIf Left(podatak, 6) = "cdesno" Then Dole2 = False Gore2 = False Levo2 = False Desno2 = True ElseIf Left(podatak, 5) = "clevo" Then Gore2 = False Dole2 = False Desno2 = False Levo2 = True ElseIf Left(podatak, 5) = "cgore" Then Dole2 = False Levo2 = False Desno2 = False Gore2 = True ElseIf Left(podatak, 6) = "cpucaj" Then End If End Sub Private Sub Timer1_Timer() Razlika = (Timer - Vreme) * Brzina If Levo1 = True Then Shape3.Left = Shape1.Left - Shape3.Width Shape3.Top = Shape1.Top + (Shape1.Height / 2) tenk(2).Visible = True tenk(0).Visible = False tenk(1).Visible = False tenk(3).Visible = False If Shape1.Left - Shape3.Width <= zid(0).Left + zid(0).Width And Shape1.Top <= zid(0).Top + zid(0).Height And Shape1.Top + Shape1.Height >= zid(0).Top And Shape1.Left + Shape1.Width >= zid(0).Left Or _ Shape1.Left - Shape3.Width <= zid(1).Left + zid(1).Width And Shape1.Top <= zid(1).Top + zid(1).Height And Shape1.Top + Shape1.Height >= zid(1).Top And Shape1.Left + Shape1.Width >= zid(1).Left Or _ Shape1.Left - Shape3.Width <= zid(2).Left + zid(2).Width And Shape1.Top <= zid(2).Top + zid(2).Height And Shape1.Top + Shape1.Height >= zid(2).Top And Shape1.Left + Shape1.Width >= zid(2).Left Or _ Shape1.Left - Shape3.Width <= zid(3).Left + zid(3).Width And Shape1.Top <= zid(3).Top + zid(3).Height And Shape1.Top + Shape1.Height >= zid(3).Top And Shape1.Left + Shape1.Width >= zid(3).Left Or _ Shape1.Left - Shape3.Width <= zid(4).Left + zid(4).Width And Shape1.Top <= zid(4).Top + zid(4).Height And Shape1.Top + Shape1.Height >= zid(4).Top And Shape1.Left + Shape1.Width >= zid(4).Left Or _ Shape1.Left - Shape3.Width <= zid(5).Left + zid(5).Width And Shape1.Top <= zid(5).Top + zid(5).Height And Shape1.Top + Shape1.Height >= zid(5).Top And Shape1.Left + Shape1.Width >= zid(5).Left Or _ Shape1.Left - Shape3.Width <= zid(6).Left + zid(6).Width And Shape1.Top <= zid(6).Top + zid(6).Height And Shape1.Top + Shape1.Height >= zid(6).Top And Shape1.Left + Shape1.Width >= zid(6).Left Or _ Shape1.Left - Shape3.Width <= zid(7).Left + zid(7).Width And Shape1.Top <= zid(7).Top + zid(7).Height And Shape1.Top + Shape1.Height >= zid(7).Top And Shape1.Left + Shape1.Width >= zid(7).Left Or _ Shape1.Left - Shape3.Width <= zid(8).Left + zid(8).Width And Shape1.Top <= zid(8).Top + zid(8).Height And Shape1.Top + Shape1.Height >= zid(8).Top And Shape1.Left + Shape1.Width >= zid(8).Left Or _ Shape1.Left - Shape3.Width <= zid(9).Left + zid(9).Width And Shape1.Top <= zid(9).Top + zid(9).Height And Shape1.Top + Shape1.Height >= zid(9).Top And Shape1.Left + Shape1.Width >= zid(9).Left Then x1 = x1 Else x1 = x1 - Razlika End If End If If Levo2 = True Then Shape4.Left = Shape2.Left - Shape4.Width Shape4.Top = Shape2.Top + (Shape2.Height / 2) topa(2).Visible = True topa(0).Visible = False topa(1).Visible = False topa(3).Visible = False If Shape2.Left - Shape4.Width <= zid(0).Left + zid(0).Width And Shape2.Top <= zid(0).Top + zid(0).Height And Shape2.Top + Shape2.Height >= zid(0).Top And Shape2.Left + Shape2.Width >= zid(0).Left Or _ Shape2.Left - Shape4.Width <= zid(1).Left + zid(1).Width And Shape2.Top <= zid(1).Top + zid(1).Height And Shape2.Top + Shape2.Height >= zid(1).Top And Shape2.Left + Shape2.Width >= zid(1).Left Or _ Shape2.Left - Shape4.Width <= zid(2).Left + zid(2).Width And Shape2.Top <= zid(2).Top + zid(2).Height And Shape2.Top + Shape2.Height >= zid(2).Top And Shape2.Left + Shape2.Width >= zid(2).Left Or _ Shape2.Left - Shape4.Width <= zid(3).Left + zid(3).Width And Shape2.Top <= zid(3).Top + zid(3).Height And Shape2.Top + Shape2.Height >= zid(3).Top And Shape2.Left + Shape2.Width >= zid(3).Left Or _ Shape2.Left - Shape4.Width <= zid(4).Left + zid(4).Width And Shape2.Top <= zid(4).Top + zid(4).Height And Shape2.Top + Shape2.Height >= zid(4).Top And Shape2.Left + Shape2.Width >= zid(4).Left Or _ Shape2.Left - Shape4.Width <= zid(5).Left + zid(5).Width And Shape2.Top <= zid(5).Top + zid(5).Height And Shape2.Top + Shape2.Height >= zid(5).Top And Shape2.Left + Shape2.Width >= zid(5).Left Or _ Shape2.Left - Shape4.Width <= zid(6).Left + zid(6).Width And Shape2.Top <= zid(6).Top + zid(6).Height And Shape2.Top + Shape2.Height >= zid(6).Top And Shape2.Left + Shape2.Width >= zid(6).Left Or _ Shape2.Left - Shape4.Width <= zid(7).Left + zid(7).Width And Shape2.Top <= zid(7).Top + zid(7).Height And Shape2.Top + Shape2.Height >= zid(7).Top And Shape2.Left + Shape2.Width >= zid(7).Left Or _ Shape2.Left - Shape4.Width <= zid(8).Left + zid(8).Width And Shape2.Top <= zid(8).Top + zid(8).Height And Shape2.Top + Shape2.Height >= zid(8).Top And Shape2.Left + Shape2.Width >= zid(8).Left Or _ Shape2.Left - Shape4.Width <= zid(9).Left + zid(9).Width And Shape2.Top <= zid(9).Top + zid(9).Height And Shape2.Top + Shape2.Height >= zid(9).Top And Shape2.Left + Shape2.Width >= zid(9).Left Then x2 = x2 Else x2 = x2 - Razlika End If End If If Desno1 = True Then Shape3.Left = Shape1.Left + Shape1.Width Shape3.Top = Shape1.Top + (Shape1.Height / 2) tenk(3).Visible = True tenk(0).Visible = False tenk(1).Visible = False tenk(2).Visible = False If Shape1.Left + Shape1.Width + Shape3.Width >= zid(0).Left And Shape1.Top + Shape1.Height >= zid(0).Top And Shape1.Top <= zid(0).Top + zid(0).Height And Shape1.Left <= zid(0).Left + zid(0).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(1).Left And Shape1.Top + Shape1.Height >= zid(1).Top And Shape1.Top <= zid(1).Top + zid(1).Height And Shape1.Left <= zid(1).Left + zid(1).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(2).Left And Shape1.Top + Shape1.Height >= zid(2).Top And Shape1.Top <= zid(2).Top + zid(2).Height And Shape1.Left <= zid(2).Left + zid(2).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(3).Left And Shape1.Top + Shape1.Height >= zid(3).Top And Shape1.Top <= zid(3).Top + zid(3).Height And Shape1.Left <= zid(3).Left + zid(3).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(4).Left And Shape1.Top + Shape1.Height >= zid(4).Top And Shape1.Top <= zid(4).Top + zid(4).Height And Shape1.Left <= zid(4).Left + zid(4).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(5).Left And Shape1.Top + Shape1.Height >= zid(5).Top And Shape1.Top <= zid(5).Top + zid(5).Height And Shape1.Left <= zid(5).Left + zid(5).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(6).Left And Shape1.Top + Shape1.Height >= zid(6).Top And Shape1.Top <= zid(6).Top + zid(6).Height And Shape1.Left <= zid(6).Left + zid(6).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(7).Left And Shape1.Top + Shape1.Height >= zid(7).Top And Shape1.Top <= zid(7).Top + zid(7).Height And Shape1.Left <= zid(7).Left + zid(7).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(8).Left And Shape1.Top + Shape1.Height >= zid(8).Top And Shape1.Top <= zid(8).Top + zid(8).Height And Shape1.Left <= zid(8).Left + zid(8).Width Or _ Shape1.Left + Shape1.Width + Shape3.Width >= zid(9).Left And Shape1.Top + Shape1.Height >= zid(9).Top And Shape1.Top <= zid(9).Top + zid(9).Height And Shape1.Left <= zid(9).Left + zid(9).Width Then x1 = x1 Else x1 = x1 + Razlika End If End If If Desno2 = True Then Shape4.Left = Shape2.Left + Shape2.Width Shape4.Top = Shape2.Top + (Shape2.Height / 2) topa(3).Visible = True topa(0).Visible = False topa(1).Visible = False topa(2).Visible = False If Shape2.Left + Shape2.Width + Shape4.Width >= zid(0).Left And Shape2.Top + Shape2.Height >= zid(0).Top And Shape2.Top <= zid(0).Top + zid(0).Height And Shape2.Left <= zid(0).Left + zid(0).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(1).Left And Shape2.Top + Shape2.Height >= zid(1).Top And Shape2.Top <= zid(1).Top + zid(1).Height And Shape2.Left <= zid(1).Left + zid(1).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(2).Left And Shape2.Top + Shape2.Height >= zid(2).Top And Shape2.Top <= zid(2).Top + zid(2).Height And Shape2.Left <= zid(2).Left + zid(2).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(3).Left And Shape2.Top + Shape2.Height >= zid(3).Top And Shape2.Top <= zid(3).Top + zid(3).Height And Shape2.Left <= zid(3).Left + zid(3).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(4).Left And Shape2.Top + Shape2.Height >= zid(4).Top And Shape2.Top <= zid(4).Top + zid(4).Height And Shape2.Left <= zid(4).Left + zid(4).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(5).Left And Shape2.Top + Shape2.Height >= zid(5).Top And Shape2.Top <= zid(5).Top + zid(5).Height And Shape2.Left <= zid(5).Left + zid(5).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(6).Left And Shape2.Top + Shape2.Height >= zid(6).Top And Shape2.Top <= zid(6).Top + zid(6).Height And Shape2.Left <= zid(6).Left + zid(6).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(7).Left And Shape2.Top + Shape2.Height >= zid(7).Top And Shape2.Top <= zid(7).Top + zid(7).Height And Shape2.Left <= zid(7).Left + zid(7).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(8).Left And Shape2.Top + Shape2.Height >= zid(8).Top And Shape2.Top <= zid(8).Top + zid(8).Height And Shape2.Left <= zid(8).Left + zid(8).Width Or _ Shape2.Left + Shape2.Width + Shape4.Width >= zid(9).Left And Shape2.Top + Shape2.Height >= zid(9).Top And Shape2.Top <= zid(9).Top + zid(9).Height And Shape2.Left <= zid(9).Left + zid(9).Width Then x2 = x2 Else x2 = x2 + Razlika End If End If If Gore1 = True Then Shape3.Left = Shape1.Left + (Shape1.Width / 2) Shape3.Top = Shape1.Top - Shape3.Height tenk(1).Visible = True tenk(0).Visible = False tenk(2).Visible = False tenk(3).Visible = False If Shape1.Top - Shape3.Height <= zid(0).Top + zid(0).Height And Shape1.Left <= zid(0).Left + zid(0).Width And Shape1.Left + Shape1.Width >= zid(0).Left And Shape1.Top + Shape1.Height >= zid(0).Top Or _ Shape1.Top - Shape3.Height <= zid(1).Top + zid(1).Height And Shape1.Left <= zid(1).Left + zid(1).Width And Shape1.Left + Shape1.Width >= zid(1).Left And Shape1.Top + Shape1.Height >= zid(1).Top Or _ Shape1.Top - Shape3.Height <= zid(2).Top + zid(2).Height And Shape1.Left <= zid(2).Left + zid(2).Width And Shape1.Left + Shape1.Width >= zid(2).Left And Shape1.Top + Shape1.Height >= zid(2).Top Or _ Shape1.Top - Shape3.Height <= zid(3).Top + zid(3).Height And Shape1.Left <= zid(3).Left + zid(3).Width And Shape1.Left + Shape1.Width >= zid(3).Left And Shape1.Top + Shape1.Height >= zid(3).Top Or _ Shape1.Top - Shape3.Height <= zid(4).Top + zid(4).Height And Shape1.Left <= zid(4).Left + zid(4).Width And Shape1.Left + Shape1.Width >= zid(4).Left And Shape1.Top + Shape1.Height >= zid(4).Top Or _ Shape1.Top - Shape3.Height <= zid(5).Top + zid(5).Height And Shape1.Left <= zid(5).Left + zid(5).Width And Shape1.Left + Shape1.Width >= zid(5).Left And Shape1.Top + Shape1.Height >= zid(5).Top Or _ Shape1.Top - Shape3.Height <= zid(6).Top + zid(6).Height And Shape1.Left <= zid(6).Left + zid(6).Width And Shape1.Left + Shape1.Width >= zid(6).Left And Shape1.Top + Shape1.Height >= zid(6).Top Or _ Shape1.Top - Shape3.Height <= zid(7).Top + zid(7).Height And Shape1.Left <= zid(7).Left + zid(7).Width And Shape1.Left + Shape1.Width >= zid(7).Left And Shape1.Top + Shape1.Height >= zid(7).Top Or _ Shape1.Top - Shape3.Height <= zid(8).Top + zid(8).Height And Shape1.Left <= zid(8).Left + zid(8).Width And Shape1.Left + Shape1.Width >= zid(8).Left And Shape1.Top + Shape1.Height >= zid(8).Top Or _ Shape1.Top - Shape3.Height <= zid(9).Top + zid(9).Height And Shape1.Left <= zid(9).Left + zid(9).Width And Shape1.Left + Shape1.Width >= zid(9).Left And Shape1.Top + Shape1.Height >= zid(9).Top Then y1 = y1 Else y1 = y1 - Razlika End If End If If Gore2 = True Then Shape4.Left = Shape2.Left + (Shape2.Width / 2) Shape4.Top = Shape2.Top - Shape4.Height topa(1).Visible = True topa(0).Visible = False topa(2).Visible = False topa(3).Visible = False If Shape2.Top - Shape4.Height <= zid(0).Top + zid(0).Height And Shape2.Left <= zid(0).Left + zid(0).Width And Shape2.Left + Shape2.Width >= zid(0).Left And Shape2.Top + Shape2.Height >= zid(0).Top Or _ Shape2.Top - Shape4.Height <= zid(1).Top + zid(1).Height And Shape2.Left <= zid(1).Left + zid(1).Width And Shape2.Left + Shape2.Width >= zid(1).Left And Shape2.Top + Shape2.Height >= zid(1).Top Or _ Shape2.Top - Shape4.Height <= zid(2).Top + zid(2).Height And Shape2.Left <= zid(2).Left + zid(2).Width And Shape2.Left + Shape2.Width >= zid(2).Left And Shape2.Top + Shape2.Height >= zid(2).Top Or _ Shape2.Top - Shape4.Height <= zid(3).Top + zid(3).Height And Shape2.Left <= zid(3).Left + zid(3).Width And Shape2.Left + Shape2.Width >= zid(3).Left And Shape2.Top + Shape2.Height >= zid(3).Top Or _ Shape2.Top - Shape4.Height <= zid(4).Top + zid(4).Height And Shape2.Left <= zid(4).Left + zid(4).Width And Shape2.Left + Shape2.Width >= zid(4).Left And Shape2.Top + Shape2.Height >= zid(4).Top Or _ Shape2.Top - Shape4.Height <= zid(5).Top + zid(5).Height And Shape2.Left <= zid(5).Left + zid(5).Width And Shape2.Left + Shape2.Width >= zid(5).Left And Shape2.Top + Shape2.Height >= zid(5).Top Or _ Shape2.Top - Shape4.Height <= zid(6).Top + zid(6).Height And Shape2.Left <= zid(6).Left + zid(6).Width And Shape2.Left + Shape2.Width >= zid(6).Left And Shape2.Top + Shape2.Height >= zid(6).Top Or _ Shape2.Top - Shape4.Height <= zid(7).Top + zid(7).Height And Shape2.Left <= zid(7).Left + zid(7).Width And Shape2.Left + Shape2.Width >= zid(7).Left And Shape2.Top + Shape2.Height >= zid(7).Top Or _ Shape2.Top - Shape4.Height <= zid(8).Top + zid(8).Height And Shape2.Left <= zid(8).Left + zid(8).Width And Shape2.Left + Shape2.Width >= zid(8).Left And Shape2.Top + Shape2.Height >= zid(8).Top Or _ Shape2.Top - Shape4.Height <= zid(9).Top + zid(9).Height And Shape2.Left <= zid(9).Left + zid(9).Width And Shape2.Left + Shape2.Width >= zid(9).Left And Shape2.Top + Shape2.Height >= zid(9).Top Then y2 = y2 Else y2 = y2 - Razlika End If End If If Dole1 = True Then Shape3.Left = Shape1.Left + (Shape1.Width / 2) Shape3.Top = Shape1.Top + Shape1.Height tenk(0).Visible = True tenk(2).Visible = False tenk(1).Visible = False tenk(3).Visible = False If Shape1.Top + Shape1.Height + Shape3.Height >= zid(0).Top And Shape1.Left <= zid(0).Left + zid(0).Width And Shape1.Left + Shape1.Width >= zid(0).Left And Shape1.Top <= zid(0).Top + zid(0).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(1).Top And Shape1.Left <= zid(1).Left + zid(1).Width And Shape1.Left + Shape1.Width >= zid(1).Left And Shape1.Top <= zid(1).Top + zid(1).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(2).Top And Shape1.Left <= zid(2).Left + zid(2).Width And Shape1.Left + Shape1.Width >= zid(2).Left And Shape1.Top <= zid(2).Top + zid(2).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(3).Top And Shape1.Left <= zid(3).Left + zid(3).Width And Shape1.Left + Shape1.Width >= zid(3).Left And Shape1.Top <= zid(3).Top + zid(3).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(4).Top And Shape1.Left <= zid(4).Left + zid(4).Width And Shape1.Left + Shape1.Width >= zid(4).Left And Shape1.Top <= zid(4).Top + zid(4).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(5).Top And Shape1.Left <= zid(5).Left + zid(5).Width And Shape1.Left + Shape1.Width >= zid(5).Left And Shape1.Top <= zid(5).Top + zid(5).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(6).Top And Shape1.Left <= zid(6).Left + zid(6).Width And Shape1.Left + Shape1.Width >= zid(6).Left And Shape1.Top <= zid(6).Top + zid(6).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(7).Top And Shape1.Left <= zid(7).Left + zid(7).Width And Shape1.Left + Shape1.Width >= zid(7).Left And Shape1.Top <= zid(7).Top + zid(7).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(8).Top And Shape1.Left <= zid(8).Left + zid(8).Width And Shape1.Left + Shape1.Width >= zid(8).Left And Shape1.Top <= zid(8).Top + zid(8).Height Or _ Shape1.Top + Shape1.Height + Shape3.Height >= zid(9).Top And Shape1.Left <= zid(9).Left + zid(9).Width And Shape1.Left + Shape1.Width >= zid(9).Left And Shape1.Top <= zid(9).Top + zid(9).Height Then y1 = y1 Else y1 = y1 + Razlika End If End If If Dole2 = True Then Shape4.Left = Shape2.Left + (Shape2.Width / 2) Shape4.Top = Shape2.Top + Shape2.Height topa(0).Visible = True topa(2).Visible = False topa(1).Visible = False topa(3).Visible = False If Shape2.Top + Shape2.Height + Shape4.Height >= zid(0).Top And Shape2.Left <= zid(0).Left + zid(0).Width And Shape2.Left + Shape2.Width >= zid(0).Left And Shape2.Top <= zid(0).Top + zid(0).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(1).Top And Shape2.Left <= zid(1).Left + zid(1).Width And Shape2.Left + Shape2.Width >= zid(1).Left And Shape2.Top <= zid(1).Top + zid(1).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(2).Top And Shape2.Left <= zid(2).Left + zid(2).Width And Shape2.Left + Shape2.Width >= zid(2).Left And Shape2.Top <= zid(2).Top + zid(2).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(3).Top And Shape2.Left <= zid(3).Left + zid(3).Width And Shape2.Left + Shape2.Width >= zid(3).Left And Shape2.Top <= zid(3).Top + zid(3).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(4).Top And Shape2.Left <= zid(4).Left + zid(4).Width And Shape2.Left + Shape2.Width >= zid(4).Left And Shape2.Top <= zid(4).Top + zid(4).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(5).Top And Shape2.Left <= zid(5).Left + zid(5).Width And Shape2.Left + Shape2.Width >= zid(5).Left And Shape2.Top <= zid(5).Top + zid(5).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(6).Top And Shape2.Left <= zid(6).Left + zid(6).Width And Shape2.Left + Shape2.Width >= zid(6).Left And Shape2.Top <= zid(6).Top + zid(6).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(7).Top And Shape2.Left <= zid(7).Left + zid(7).Width And Shape2.Left + Shape2.Width >= zid(7).Left And Shape2.Top <= zid(7).Top + zid(7).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(8).Top And Shape2.Left <= zid(8).Left + zid(8).Width And Shape2.Left + Shape2.Width >= zid(8).Left And Shape2.Top <= zid(8).Top + zid(8).Height Or _ Shape2.Top + Shape2.Height + Shape4.Height >= zid(9).Top And Shape2.Left <= zid(9).Left + zid(9).Width And Shape2.Left + Shape2.Width >= zid(9).Left And Shape2.Top <= zid(9).Top + zid(9).Height Then y2 = y2 Else y2 = y2 + Razlika End If End If Vreme = Timer Shape1.Left = x1 Shape1.Top = y1 Shape2.Left = x2 Shape2.Top = y2 tenk(0).Top = Shape1.Top tenk(0).Left = Shape1.Left tenk(1).Top = Shape1.Top - Shape3.Height tenk(1).Left = Shape1.Left tenk(2).Top = Shape1.Top tenk(2).Left = Shape1.Left - Shape3.Width tenk(3).Top = Shape1.Top tenk(3).Left = Shape1.Left topa(0).Top = Shape2.Top topa(0).Left = Shape2.Left topa(1).Top = Shape2.Top - Shape4.Height topa(1).Left = Shape2.Left topa(2).Top = Shape2.Top topa(2).Left = Shape2.Left - Shape4.Width topa(3).Top = Shape2.Top topa(3).Left = Shape2.Left