public void keyPressed(KeyEvent e) {
		if(e.getKeyCode() == KeyEvent.VK_LEFT) {
			xa = -1;
			if (left) {
				sAngle = 225;
				limit = 225;
				fill = 270;
				limit2 = 180;
			}

			right = true;
			up = true;
			left = false;
			down = true;
		}

		if(e.getKeyCode() == KeyEvent.VK_RIGHT) {
			//countMoves = 0;
					
			xa = 1;
			if (right) {
			sAngle = 45;
			limit = 0;
			fill = 270;
			limit2 = 0;
			}

			right = false;
			up = true;
			left = true;
			down = true;
		}
		
		if(e.getKeyCode() == KeyEvent.VK_UP) {
			ya = -1;
			if (up) {
			sAngle = 135;
			limit = 135;
			fill = 270;
			limit2 = 90;
			}

			right = true;
			up = false;
			left = true;
			down = true;
			
			//countMoves++;
			
		}

		if(e.getKeyCode() == KeyEvent.VK_DOWN) {
			ya = 1;
			if (down) {
				sAngle = 315;
				limit = 315;
				fill = 270;
				limit2 = 270;
			}

			right = true;
			up = true;
			left = true;
			down = false;
		}
	}