//updates position of players depending upon the keyboard input
updates position of players depending upon the keyboard input
// updates position of players depending upon the keyboard input
func (t *team) update() {
	t.LastMotion = 0
	if keyboardInput.KeyPressed == 1 {
		t.LastMotion = 1
		if t.LastStick[0].Y > boundarywidth {
			for i := range t.LastStick {
				if t.LastStick[i].Y > boundarywidth {
					t.LastStick[i].Y -= playerSpeed
				}
			}
		}
	} else if keyboardInput.KeyPressed == 2 {
		t.LastMotion = -1
		if t.LastStick[len(t.LastStick)-1].Y < boxHeight-boundarywidth-playerHeight-1 {
			for i := range t.LastStick {
				if t.LastStick[i].Y < boxHeight-playerHeight-boundarywidth-1 {
					t.LastStick[i].Y += playerSpeed
				}
			}
		}
	}
}
func ( t * team ) update ( ) { t . LastMotion = 0 if keyboardInput . KeyPressed == 1 { t . LastMotion = 1 if t . LastStick [ 0 ] . Y > boundarywidth { for i := range t . LastStick { if t . LastStick [ i ] . Y > boundarywidth { t . LastStick [ i ] . Y -= playerSpeed } } } } else if keyboardInput . KeyPressed == 2 { t . LastMotion = - 1 if t . LastStick [ len ( t . LastStick ) - 1 ] . Y < boxHeight - boundarywidth - playerHeight - 1 { for i := range t . LastStick { if t . LastStick [ i ] . Y < boxHeight - playerHeight - boundarywidth - 1 { t . LastStick [ i ] . Y += playerSpeed } } } } }
updates position of players depending upon the keyboard input
updates position of players depending upon the keyboard input