public void think() {
		List<MouseEvent> mouseEvents = board.getMouseEvents();
		//System.out.println("MOUSEVENTS: " + mouseEvents.size());
		if(mouseEvents.size() > 0) {
			MouseEvent e = mouseEvents.get(0);
			//System.out.println("Clicked: " + e.getX() + "-" + e.getY());
			int x = e.getX() / (int)Chess.SQUARE_PIXEL_WIDTH;
			int y = e.getY() / (int)Chess.SQUARE_PIXEL_HEIGHT;
			if(game.getActive() != null && game.getActive().getPiece() != null && game.getActive().getPiece().getColor() == game.getLocal()) {
				//System.out.println("Active");
				if(game.canMove(x, y)) {
					nextMove[0] = game.getActive().getX();
					nextMove[1] = game.getActive().getY();
					nextMove[2] = x;
					nextMove[3] = y;
					moved = true;
					board.clearMouseEvents();
					return;
				}
				

			}
	
			game.setActive(x, y);
				if(game.getActive().getPiece() != null && game.getActive().getPiece().getColor() == game.getLocal()) {
					//game.getActive().getPiece().createPossibleMoves();
	
			}

		}

		board.clearMouseEvents();

	}