public Counter winningMove(Move lastMove, Board b) {
		boolean blackWins = false;
		boolean whiteWins = false;
		boolean end = false;
		int x = Board.MINWIDTH;
		int y = b.getHeight();
		Counter winner = Counter.EMPTY;
		
		while((y >= Board.MINHEIGHT) && (!whiteWins || !blackWins)) {
			while ((x <= b.getWidth()) && (!whiteWins || !blackWins)) {
				//Check up
				end = Util.checkCellInDirection(b, x, y, DirectionX.NOTHING, DirectionY.UP);
				//Check right
				if (!end) end = Util.checkCellInDirection(b, x, y, DirectionX.RIGHT, DirectionY.NOTHING);
				//Check up-left diagonal
				if (!end) end = Util.checkCellInDirection(b, x, y, DirectionX.LEFT, DirectionY.UP);
				//Check up-right diagonal
				if (!end) end = Util.checkCellInDirection(b, x, y, DirectionX.RIGHT, DirectionY.UP);
				
				//Assign winner (if any)
				if (end){ //end is true
					if (b.getPosition(x, y) == Counter.BLACK) {
						blackWins = true;
					} else if (b.getPosition(x, y) == Counter.WHITE) {
						whiteWins = true;
					}
				}
				
				if (((whiteWins && !blackWins) || (!whiteWins && blackWins)) && end) {
					winner = b.getPosition(x, y);
				} else if (whiteWins && blackWins){
					winner = Counter.EMPTY;
				} 
				//Increase x counter
				if(!whiteWins || !blackWins) {
					x++;
				} 
			}
			
			x = Board.MINWIDTH;
			y--;
		}
		
		return winner;
	}