USE hali_berecza;

DELIMITER //
DROP FUNCTION IF EXISTS getHarmonyScore;

CREATE FUNCTION getHarmonyScore (
a1 INTEGER, a2 INTEGER, a3 INTEGER, a4 INTEGER, a5 INTEGER, a6 INTEGER, a7 INTEGER, a8 INTEGER, a9 INTEGER, 
a10 INTEGER, a11 INTEGER, a12 INTEGER, a13 INTEGER, a14 INTEGER, a15 INTEGER, a16 INTEGER, a17 INTEGER, a18 INTEGER,
b1 INTEGER, b2 INTEGER, b3 INTEGER, b4 INTEGER, b5 INTEGER, b6 INTEGER, b7 INTEGER, b8 INTEGER, b9 INTEGER, 
b10 INTEGER, b11 INTEGER, b12 INTEGER, b13 INTEGER, b14 INTEGER, b15 INTEGER, b16 INTEGER, b17 INTEGER, b18 INTEGER
)
RETURNS INTEGER

BEGIN
DECLARE score INT DEFAULT 0;
DECLARE score1 INT DEFAULT -1;
DECLARE score2 INT DEFAULT -1;
DECLARE score4 INT DEFAULT -1;

DECLARE score1PointValue INT DEFAULT 1;
DECLARE score2PointValue INT DEFAULT 2;
DECLARE score4PointValue INT DEFAULT 4;

DECLARE a1Mathced INT DEFAULT 0;
DECLARE a2Mathced INT DEFAULT 0;
DECLARE a3Mathced INT DEFAULT 0;
DECLARE a4Mathced INT DEFAULT 0;
DECLARE a5Mathced INT DEFAULT 0;

DECLARE a6Mathced INT DEFAULT 0;
DECLARE a7Mathced INT DEFAULT 0;
DECLARE a8Mathced INT DEFAULT 0;
DECLARE a9Mathced INT DEFAULT 0;
DECLARE a10Mathced INT DEFAULT 0;

DECLARE a11Mathced INT DEFAULT 0;
DECLARE a12Mathced INT DEFAULT 0;
DECLARE a13Mathced INT DEFAULT 0;
DECLARE a14Mathced INT DEFAULT 0;
DECLARE a15Mathced INT DEFAULT 0;
DECLARE a16Mathced INT DEFAULT 0;
DECLARE a17Mathced INT DEFAULT 0;
DECLARE a18Mathced INT DEFAULT 0;

DECLARE b1Mathced INT DEFAULT 0;
DECLARE b2Mathced INT DEFAULT 0;
DECLARE b3Mathced INT DEFAULT 0;
DECLARE b4Mathced INT DEFAULT 0;
DECLARE b5Mathced INT DEFAULT 0;

DECLARE b6Mathced INT DEFAULT 0;
DECLARE b7Mathced INT DEFAULT 0;
DECLARE b8Mathced INT DEFAULT 0;
DECLARE b9Mathced INT DEFAULT 0;
DECLARE b10Mathced INT DEFAULT 0;

DECLARE b11Mathced INT DEFAULT 0;
DECLARE b12Mathced INT DEFAULT 0;
DECLARE b13Mathced INT DEFAULT 0;
DECLARE b14Mathced INT DEFAULT 0;
DECLARE b15Mathced INT DEFAULT 0;
DECLARE b16Mathced INT DEFAULT 0;
DECLARE b17Mathced INT DEFAULT 0;
DECLARE b18Mathced INT DEFAULT 0;



#4-4 helyiertek
IF (
	a3 = b3 OR a3 = b6 OR a3 = b9 OR a3 = b12 OR a3 = b15 OR a3 = b18 OR 
	a6 = b3 OR a6 = b6 OR a6 = b9 OR a6 = b12 OR a6 = b15 OR a6 = b18 OR 
	a9 = b3 OR a9 = b6 OR a9 = b9 OR a9 = b12 OR a9 = b15 OR a9 = b18 OR 
	a12 = b3 OR a12 = b6 OR a12 = b9 OR a12 = b12 OR a12 = b15 OR a12 = b18 OR 
	a15 = b3 OR a15 = b6 OR a15 = b9 OR a15 = b12 OR a15 = b15 OR a15 = b18 OR 
	a18 = b3 OR a18 = b6 OR a18 = b9 OR a18 = b12 OR a18 = b15 OR a18 = b18
) THEN

	### a3 Matches ###
	
	IF (a3 = b3 && a3Mathced = 0 && b3Mathced = 0) THEN
		SET a3Mathced = 1;
		SET b3Mathced = 1;
		IF (a3=0 && b3=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	IF (a3 = b6 && a3Mathced = 0 && b6Mathced = 0) THEN
		SET a3Mathced = 1;
		SET b6Mathced = 1;
		IF (a3=0 && b6=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a3 = b9  && a3Mathced = 0 && b9Mathced = 0) THEN
		SET a3Mathced = 1;
		SET b9Mathced = 1;
		IF (a3=0 && b9=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a3 = b12  && a3Mathced = 0 && b12Mathced = 0) THEN
		SET a3Mathced = 1;
		SET b12Mathced = 1;
		IF (a3=0 && b12=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a3 = b15  && a3Mathced = 0 && b15Mathced = 0) THEN
		SET a3Mathced = 1;
		SET b15Mathced = 1;
		IF (a3=0 && b15=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	IF (a3 = b18  && a3Mathced = 0 && b18Mathced = 0) THEN
		SET a3Mathced = 1;
		SET b18Mathced = 1;
		IF (a3=0 && b18=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	### a6 Matches ###
	
	IF (a6 = b3 && a6Mathced = 0 && b3Mathced = 0) THEN
		SET a6Mathced = 1;
		SET b3Mathced = 1;
		IF (a6=0 && b3=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	IF (a6 = b6 && a6Mathced = 0 && b6Mathced = 0) THEN
		SET a6Mathced = 1;
		SET b6Mathced = 1;
		IF (a6=0 && b6=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a6 = b9  && a6Mathced = 0 && b9Mathced = 0) THEN
		SET a6Mathced = 1;
		SET b9Mathced = 1;
		IF (a6=0 && b9=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a6 = b12  && a6Mathced = 0 && b12Mathced = 0) THEN
		SET a6Mathced = 1;
		SET b12Mathced = 1;
		IF (a6=0 && b12=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a6 = b15  && a6Mathced = 0 && b15Mathced = 0) THEN
		SET a6Mathced = 1;
		SET b15Mathced = 1;
		IF (a6=0 && b15=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	IF (a6 = b18  && a6Mathced = 0 && b18Mathced = 0) THEN
		SET a6Mathced = 1;
		SET b18Mathced = 1;
		IF (a6=0 && b18=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	### a9 Matches ###
	
	IF (a9 = b3 && a9Mathced = 0 && b3Mathced = 0) THEN
		SET a9Mathced = 1;
		SET b3Mathced = 1;
		IF (a9=0 && b3=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	IF (a9 = b6 && a9Mathced = 0 && b6Mathced = 0) THEN
		SET a9Mathced = 1;
		SET b6Mathced = 1;
		IF (a9=0 && b6=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a9 = b9  && a9Mathced = 0 && b9Mathced = 0) THEN
		SET a9Mathced = 1;
		SET b9Mathced = 1;
		IF (a9=0 && b9=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a9 = b12  && a9Mathced = 0 && b12Mathced = 0) THEN
		SET a9Mathced = 1;
		SET b12Mathced = 1;
		IF (a9=0 && b12=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a9 = b15  && a9Mathced = 0 && b15Mathced = 0) THEN
		SET a9Mathced = 1;
		SET b15Mathced = 1;
		IF (a9=0 && b15=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	IF (a9 = b18  && a9Mathced = 0 && b18Mathced = 0) THEN
		SET a9Mathced = 1;
		SET b18Mathced = 1;
		IF (a9=0 && b18=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	
	### a12 Matches ###
	
	IF (a12 = b3 && a12Mathced = 0 && b3Mathced = 0) THEN
		SET a12Mathced = 1;
		SET b3Mathced = 1;
		IF (a12=0 && b3=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	IF (a12 = b6 && a12Mathced = 0 && b6Mathced = 0) THEN
		SET a12Mathced = 1;
		SET b6Mathced = 1;
		IF (a12=0 && b6=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a12 = b9  && a12Mathced = 0 && b9Mathced = 0) THEN
		SET a12Mathced = 1;
		SET b9Mathced = 1;
		IF (a12=0 && b9=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a12 = b12  && a12Mathced = 0 && b12Mathced = 0) THEN
		SET a12Mathced = 1;
		SET b12Mathced = 1;
		IF (a12=0 && b12=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a12 = b15  && a12Mathced = 0 && b15Mathced = 0) THEN
		SET a12Mathced = 1;
		SET b15Mathced = 1;
		IF (a12=0 && b15=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	IF (a12 = b18  && a12Mathced = 0 && b18Mathced = 0) THEN
		SET a12Mathced = 1;
		SET b18Mathced = 1;
		IF (a12=0 && b18=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	### a15 Matches ###
	
	IF (a15 = b3 && a15Mathced = 0 && b3Mathced = 0) THEN
		SET a15Mathced = 1;
		SET b3Mathced = 1;
		IF (a15=0 && b3=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	IF (a15 = b6 && a15Mathced = 0 && b6Mathced = 0) THEN
		SET a15Mathced = 1;
		SET b6Mathced = 1;
		IF (a15=0 && b6=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a15 = b9  && a15Mathced = 0 && b9Mathced = 0) THEN
		SET a15Mathced = 1;
		SET b9Mathced = 1;
		IF (a15=0 && b9=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a15 = b12  && a15Mathced = 0 && b12Mathced = 0) THEN
		SET a15Mathced = 1;
		SET b12Mathced = 1;
		IF (a15=0 && b12=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a15 = b15  && a15Mathced = 0 && b15Mathced = 0) THEN
		SET a15Mathced = 1;
		SET b15Mathced = 1;
		IF (a15=0 && b15=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	IF (a15 = b18  && a15Mathced = 0 && b18Mathced = 0) THEN
		SET a15Mathced = 1;
		SET b18Mathced = 1;
		IF (a15=0 && b18=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	### a18 Matches ###
	
	IF (a18 = b3 && a18Mathced = 0 && b3Mathced = 0) THEN
		SET a18Mathced = 1;
		SET b3Mathced = 1;
		IF (a18=0 && b3=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	IF (a18 = b6 && a18Mathced = 0 && b6Mathced = 0) THEN
		SET a18Mathced = 1;
		SET b6Mathced = 1;
		IF (a18=0 && b6=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a18 = b9  && a18Mathced = 0 && b9Mathced = 0) THEN
		SET a18Mathced = 1;
		SET b9Mathced = 1;
		IF (a18=0 && b9=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a18 = b12  && a18Mathced = 0 && b12Mathced = 0) THEN
		SET a18Mathced = 1;
		SET b12Mathced = 1;
		IF (a18=0 && b12=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

	IF (a18 = b15  && a18Mathced = 0 && b15Mathced = 0) THEN
		SET a18Mathced = 1;
		SET b15Mathced = 1;
		IF (a18=0 && b15=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;
	
	IF (a18 = b18  && a18Mathced = 0 && b18Mathced = 0) THEN
		SET a18Mathced = 1;
		SET b18Mathced = 1;
		IF (a18=0 && b18=0 && (score4 = -1 OR score4 = 0)) THEN
			SET score4 = 0;
		ELSE
			SET score4 = score4PointValue;
		END IF;
	END IF;

END IF;

#2-2 helyiertek
IF (
	a2 = b2 OR a2 = b5 OR a2 = b8 OR a2 = b11 OR a2 = b14 OR a2 = b17 OR
	a5 = b2 OR a5 = b5 OR a5 = b8 OR a5 = b11 OR a5 = b14 OR a8 = b17 OR
	a8 = b2 OR a8 = b5 OR a8 = b8 OR a8 = b11 OR a8 = b14 OR  a8 = b17 OR
	a11 = b2 OR a11 = b5 OR a11 = b8 OR a11 = b11 OR a11 = b14 OR a11 = b17 OR
	a14 = b2 OR a14 = b5 OR a14 = b8 OR a14 = b11 OR a14 = b14 OR a14 = b17 OR
	a17 = b2 OR a17 = b5 OR a17 = b8 OR a17 = b11 OR a17 = b14 OR a17 = b17 
) THEN

	### a2 Matches ###

	IF (a2 = b2 && a2Mathced = 0 && b2Mathced = 0) THEN 
		SET a2Mathced = 1;
		SET b2Mathced = 1;
		
		IF (a2=0 && b2=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
	IF (a2 = b5 && a2Mathced = 0 && b5Mathced = 0) THEN 
		SET a2Mathced = 1;
		SET b5Mathced = 1;
		
		IF (a2=0 && b5=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
	IF (a2 = b8 && a2Mathced = 0 && b8Mathced = 0) THEN 
		SET a2Mathced = 1;
		SET b8Mathced = 1;
		
		IF (a2=0 && b8=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a2 = b11 && a2Mathced = 0 && b11Mathced = 0) THEN 
		SET a2Mathced = 1;
		SET b11Mathced = 1;
		
		IF (a2=0 && b11=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a2 = b14 && a2Mathced = 0 && b14Mathced = 0) THEN 
		SET a2Mathced = 1;
		SET b14Mathced = 1;
		
		IF (a2=0 && b14=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a2 = b17 && a2Mathced = 0 && b17Mathced = 0) THEN 
		SET a2Mathced = 1;
		SET b17Mathced = 1;
		
		IF (a2=0 && b17=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
### a5 Matches ###

	IF (a5 = b2 && a5Mathced = 0 && b2Mathced = 0) THEN 
		SET a5Mathced = 1;
		SET b2Mathced = 1;
		
		IF (a5=0 && b2=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
	IF (a5 = b5 && a5Mathced = 0 && b5Mathced = 0) THEN 
		SET a5Mathced = 1;
		SET b5Mathced = 1;
		
		IF (a5=0 && b5=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
	IF (a5 = b8 && a5Mathced = 0 && b8Mathced = 0) THEN 
		SET a5Mathced = 1;
		SET b8Mathced = 1;
		
		IF (a5=0 && b8=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a5 = b11 && a5Mathced = 0 && b11Mathced = 0) THEN 
		SET a5Mathced = 1;
		SET b11Mathced = 1;
		
		IF (a5=0 && b11=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a5 = b14 && a5Mathced = 0 && b14Mathced = 0) THEN 
		SET a5Mathced = 1;
		SET b14Mathced = 1;
		
		IF (a5=0 && b14=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
	IF (a5 = b17 && a5Mathced = 0 && b17Mathced = 0) THEN 
		SET a5Mathced = 1;
		SET b17Mathced = 1;
		
		IF (a5=0 && b17=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
### a8 Matches ###

	IF (a8 = b2 && a8Mathced = 0 && b2Mathced = 0) THEN 
		SET a8Mathced = 1;
		SET b2Mathced = 1;
		
		IF (a8=0 && b2=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
	IF (a8 = b5 && a8Mathced = 0 && b5Mathced = 0) THEN 
		SET a8Mathced = 1;
		SET b5Mathced = 1;
		
		IF (a8=0 && b5=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
	IF (a8 = b8 && a8Mathced = 0 && b8Mathced = 0) THEN 
		SET a8Mathced = 1;
		SET b8Mathced = 1;
		
		IF (a8=0 && b8=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a8 = b11 && a8Mathced = 0 && b11Mathced = 0) THEN 
		SET a8Mathced = 1;
		SET b11Mathced = 1;
		
		IF (a8=0 && b11=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a8 = b14 && a8Mathced = 0 && b14Mathced = 0) THEN 
		SET a8Mathced = 1;
		SET b14Mathced = 1;
		
		IF (a8=0 && b14=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a8 = b17 && a8Mathced = 0 && b17Mathced = 0) THEN 
		SET a8Mathced = 1;
		SET b17Mathced = 1;
		
		IF (a8=0 && b17=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
### a11 Matches ###

	IF (a11 = b2 && a11Mathced = 0 && b2Mathced = 0) THEN 
		SET a11Mathced = 1;
		SET b2Mathced = 1;
		
		IF (a11=0 && b2=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
	IF (a11 = b5 && a11Mathced = 0 && b5Mathced = 0) THEN 
		SET a11Mathced = 1;
		SET b5Mathced = 1;
		
		IF (a11=0 && b5=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
	IF (a11 = b8 && a11Mathced = 0 && b8Mathced = 0) THEN 
		SET a11Mathced = 1;
		SET b8Mathced = 1;
		
		IF (a11=0 && b8=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a11 = b11 && a11Mathced = 0 && b11Mathced = 0) THEN 
		SET a11Mathced = 1;
		SET b11Mathced = 1;
		
		IF (a11=0 && b11=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a11 = b14 && a11Mathced = 0 && b14Mathced = 0) THEN 
		SET a11Mathced = 1;
		SET b14Mathced = 1;
		
		IF (a11=0 && b14=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
	IF (a11 = b17 && a11Mathced = 0 && b17Mathced = 0) THEN 
		SET a11Mathced = 1;
		SET b17Mathced = 1;
		
		IF (a11=0 && b17=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
### a14 Matches ###

	IF (a14 = b2 && a14Mathced = 0 && b2Mathced = 0) THEN 
		SET a14Mathced = 1;
		SET b2Mathced = 1;
		
		IF (a14=0 && b2=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
	IF (a14 = b5 && a14Mathced = 0 && b5Mathced = 0) THEN 
		SET a14Mathced = 1;
		SET b5Mathced = 1;
		
		IF (a14=0 && b5=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
	IF (a14 = b8 && a14Mathced = 0 && b8Mathced = 0) THEN 
		SET a14Mathced = 1;
		SET b8Mathced = 1;
		
		IF (a14=0 && b8=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a14 = b11 && a14Mathced = 0 && b11Mathced = 0) THEN 
		SET a14Mathced = 1;
		SET b11Mathced = 1;
		
		IF (a14=0 && b11=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a14 = b14 && a14Mathced = 0 && b14Mathced = 0) THEN 
		SET a14Mathced = 1;
		SET b14Mathced = 1;
		
		IF (a14=0 && b14=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a14 = b17 && a14Mathced = 0 && b17Mathced = 0) THEN 
		SET a14Mathced = 1;
		SET b17Mathced = 1;
		
		IF (a14=0 && b17=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

### a17 Matches ###

	IF (a17 = b2 && a17Mathced = 0 && b2Mathced = 0) THEN 
		SET a17Mathced = 1;
		SET b2Mathced = 1;
		
		IF (a17=0 && b2=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
	IF (a17 = b5 && a17Mathced = 0 && b5Mathced = 0) THEN 
		SET a17Mathced = 1;
		SET b5Mathced = 1;
		
		IF (a17=0 && b5=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;
	
	IF (a17 = b8 && a17Mathced = 0 && b8Mathced = 0) THEN 
		SET a17Mathced = 1;
		SET b8Mathced = 1;
		
		IF (a17=0 && b8=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a17 = b11 && a17Mathced = 0 && b11Mathced = 0) THEN 
		SET a17Mathced = 1;
		SET b11Mathced = 1;
		
		IF (a17=0 && b11=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a17 = b14 && a17Mathced = 0 && b14Mathced = 0) THEN 
		SET a17Mathced = 1;
		SET b14Mathced = 1;
		
		IF (a17=0 && b14=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

	IF (a17 = b17 && a17Mathced = 0 && b17Mathced = 0) THEN 
		SET a17Mathced = 1;
		SET b17Mathced = 1;
		
		IF (a17=0 && b17=0 && (score1 = -1 OR score1 = 0) ) THEN
			SET score2 = 0;
		ELSE
			SET score2 = score2PointValue;
		END IF;
	END IF;

END IF;


#1-1 helyiertek
IF (
	a1 = b1 OR a1 = b4 OR a1 = b7 OR a1 = b10 OR a1 = b13 OR a1 = b16 OR 
	a4 = b1 OR a4 = b4 OR a4 = b7 OR a4 = b10 OR a4 = b13 OR a4 = b16 OR 
	a7 = b1 OR a7 = b4 OR a7 = b7 OR a7 = b10 OR a7 = b13 OR a7 = b16 OR 
	a10 = b1 OR a10 = b4 OR a10 = b7 OR a10 = b10 OR a10 = b13 OR a10 = b16 OR 
	a13 = b1 OR a13 = b4 OR a13 = b7 OR a13 = b10 OR a13 = b13 OR a13 = b16 OR
	a16 = b1 OR a16 = b4 OR a16 = b7 OR a16 = b10 OR a16 = b13 OR a16 = b16
	
) THEN
	### a1 Matches ###

	IF (a1 = b1 && a1Mathced = 0 && b1Mathced = 0) THEN
		SET a1Mathced = 1;
		SET b1Mathced = 1;
		
		IF (a1=0 && b1=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a1 = b4 && a1Mathced = 0 && b4Mathced = 0) THEN
		SET a1Mathced = 1;
		SET b4Mathced = 1;
		
		IF (a1=0 && b4=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a1 = b7 && a1Mathced = 0 && b7Mathced = 0) THEN
		SET a1Mathced = 1;
		SET b7Mathced = 1;
		
		IF (a1=0 && b7=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a1 = b10 && a1Mathced = 0 && b10Mathced = 0) THEN
		SET a1Mathced = 1;
		SET b10Mathced = 1;
		IF (a1=0 && b10=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a1 = b13 && a1Mathced = 0 && b13Mathced = 0) THEN
		SET a1Mathced = 1;
		SET b13Mathced = 1;
		IF (a1=0 && b13=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a1 = b16 && a1Mathced = 0 && b16Mathced = 0) THEN
		SET a1Mathced = 1;
		SET b16Mathced = 1;
		IF (a1=0 && b16=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;	
	
	### a4 Matches ###

	IF (a4 = b1 && a4Mathced = 0 && b1Mathced = 0) THEN
		SET a4Mathced = 1;
		SET b1Mathced = 1;
		IF (a4=0 && b1=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a4 = b4 && a4Mathced = 0 && b4Mathced = 0) THEN
		SET a4Mathced = 1;
		SET b4Mathced = 1;
		IF (a4=0 && b4=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a4 = b7  && a4Mathced = 0 && b7Mathced = 0) THEN
		SET a4Mathced = 1;
		SET b7Mathced = 1;
		IF (a4=0 && b7=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a4 = b10  && a4Mathced = 0 && b10Mathced = 0) THEN
		SET a4Mathced = 1;
		SET b10Mathced = 1;
		IF (a4=0 && b10=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a4 = b13  && a4Mathced = 0 && b13Mathced = 0) THEN
		SET a4Mathced = 1;
		SET b13Mathced = 1;
		IF (a4=0 && b13=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;
	
	IF (a4 = b16 && a4Mathced = 0 && b16Mathced = 0) THEN
		SET a4Mathced = 1;
		SET b16Mathced = 1;
		IF (a4=0 && b16=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;	


	### a7 Matches ###

	IF (a7 = b1 && a7Mathced = 0 && b1Mathced = 0) THEN
		SET a7Mathced = 1;
		SET b1Mathced = 1;
		IF (a7=0 && b1=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a7 = b4 && a7Mathced = 0 && b4Mathced = 0) THEN
		SET a7Mathced = 1;
		SET b4Mathced = 1;
		IF (a7=0 && b4=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a7 = b7  && a7Mathced = 0 && b7Mathced = 0) THEN
		SET a7Mathced = 1;
		SET b7Mathced = 1;
		IF (a7=0 && b7=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a7 = b10  && a7Mathced = 0 && b10Mathced = 0) THEN
		SET a7Mathced = 1;
		SET b10Mathced = 1;
		IF (a7=0 && b10=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a7 = b13  && a7Mathced = 0 && b13Mathced = 0) THEN
		SET a7Mathced = 1;
		SET b13Mathced = 1;
		IF (a7=0 && b13=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;
	
	IF (a7 = b16 && a7Mathced = 0 && b16Mathced = 0) THEN
		SET a7Mathced = 1;
		SET b16Mathced = 1;
		IF (a7=0 && b16=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;	

	### a10 Matches ###

	IF (a10 = b1 && a10Mathced = 0 && b1Mathced = 0) THEN
		SET a10Mathced = 1;
		SET b1Mathced = 1;
		IF (a10=0 && b1=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a10 = b4 && a10Mathced = 0 && b4Mathced = 0) THEN
		SET a10Mathced = 1;
		SET b4Mathced = 1;
		IF (a10=0 && b4=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a10 = b7  && a10Mathced = 0 && b7Mathced = 0) THEN
		SET a10Mathced = 1;
		SET b7Mathced = 1;
		IF (a10=0 && b7=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a10 = b10  && a10Mathced = 0 && b10Mathced = 0) THEN
		SET a10Mathced = 1;
		SET b10Mathced = 1;
		IF (a10=0 && b10=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a10 = b13  && a10Mathced = 0 && b13Mathced = 0) THEN
		SET a10Mathced = 1;
		SET b13Mathced = 1;
		IF (a10=0 && b13=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;
	
	IF (a10 = b16 && a10Mathced = 0 && b16Mathced = 0) THEN
		SET a10Mathced = 1;
		SET b16Mathced = 1;
		IF (a10=0 && b16=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;	

	### a13 Matches ###

	IF (a13 = b1 && a13Mathced = 0 && b1Mathced = 0) THEN
		SET a13Mathced = 1;
		SET b1Mathced = 1;
		IF (a13=0 && b1=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a13 = b4 && a13Mathced = 0 && b4Mathced = 0) THEN
		SET a13Mathced = 1;
		SET b4Mathced = 1;
		IF (a13=0 && b4=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a13 = b7  && a13Mathced = 0 && b7Mathced = 0) THEN
		SET a13Mathced = 1;
		SET b7Mathced = 1;
		IF (a13=0 && b7=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a13 = b10  && a13Mathced = 0 && b10Mathced = 0) THEN
		SET a13Mathced = 1;
		SET b10Mathced = 1;
		IF (a13=0 && b10=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a13 = b13  && a13Mathced = 0 && b13Mathced = 0) THEN
		SET a13Mathced = 1;
		SET b13Mathced = 1;
		IF (a13=0 && b13=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;
	
	IF (a13 = b16 && a13Mathced = 0 && b16Mathced = 0) THEN
		SET a13Mathced = 1;
		SET b16Mathced = 1;
		IF (a13=0 && b16=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;	

	### a16 Matches ###

	IF (a16 = b1 && a16Mathced = 0 && b1Mathced = 0) THEN
		SET a16Mathced = 1;
		SET b1Mathced = 1;
		IF (a16=0 && b1=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a16 = b4 && a16Mathced = 0 && b4Mathced = 0) THEN
		SET a16Mathced = 1;
		SET b4Mathced = 1;
		IF (a16=0 && b4=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a16 = b7  && a16Mathced = 0 && b7Mathced = 0) THEN
		SET a16Mathced = 1;
		SET b7Mathced = 1;
		IF (a16=0 && b7=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a16 = b10  && a16Mathced = 0 && b10Mathced = 0) THEN
		SET a16Mathced = 1;
		SET b10Mathced = 1;
		IF (a16=0 && b10=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;

	IF (a16 = b13  && a16Mathced = 0 && b13Mathced = 0) THEN
		SET a16Mathced = 1;
		SET b13Mathced = 1;
		IF (a16=0 && b13=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;
	
	IF (a16 = b16 && a16Mathced = 0 && b16Mathced = 0) THEN
		SET a16Mathced = 1;
		SET b16Mathced = 1;
		IF (a16=0 && b16=0 && (score2 = -1 OR score2 = 0)) THEN
			SET score1 = 0;
		ELSE
			SET score1 = score1PointValue;
		END IF;
	END IF;	
	
	#Az osszes 1-es helyierteket vizsgaltnak vehetjuk, nincs ertelme tovabbi parositasnak, mert meg 1 pontot ugysem adhat hozza a vegosszeghez
	SET a1Mathced = 1;
	SET a4Mathced = 1;
	SET a7Mathced = 1;
	SET a10Mathced = 1;
	SET a13Mathced = 1;
	SET a16Mathced = 1;

	SET b1Mathced = 1;
	SET b4Mathced = 1;
	SET b7Mathced = 1;
	SET b10Mathced = 1;
	SET b13Mathced = 1;
	SET b16Mathced = 1;
	
END IF;

######################
### 2-4 helyiertek ###
######################

### a2 indul ###

IF (a2Mathced = 0 && b3Mathced = 0 && a2 = b3 && a2 != 0 && b3 != 0) THEN

SET score2 = score2PointValue;
SET b3Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a2Mathced = 0 && b6Mathced = 0 && a2 = b6 && a2 != 0 && b6 != 0) THEN

SET score2 = score2PointValue;
SET b6Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a2Mathced = 0 && b9Mathced = 0 && a2 = b9 && a2 != 0 && b9 != 0) THEN

SET score2 = score2PointValue;
SET b9Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a2Mathced = 0 && b12Mathced = 0 && a2 = b12 && a2 != 0 && b12 != 0) THEN

SET score2 = score2PointValue;
SET b12Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a2Mathced = 0 && b15Mathced = 0 && a2 = b15 && a2 != 0 && b15 != 0) THEN

SET score2 = score2PointValue;
SET b15Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a2Mathced = 0 && b18Mathced = 0 && a2 = b18 && a2 != 0 && b18 != 0) THEN

SET score2 = score2PointValue;
SET b18Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

### a2 vege ###

### a5 indul ###

IF (a5Mathced = 0 && b3Mathced = 0 && a5 = b3 && a5 != 0 && b3 != 0) THEN

SET score2 = score2PointValue;
SET b3Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a5Mathced = 0 && b6Mathced = 0 && a5 = b6 && a5 != 0 && b6 != 0) THEN

SET score2 = score2PointValue;
SET b6Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a5Mathced = 0 && b9Mathced = 0 && a5 = b9 && a5 != 0 && b9 != 0) THEN

SET score2 = score2PointValue;
SET b9Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a5Mathced = 0 && b12Mathced = 0 && a5 = b12 && a5 != 0 && b12 != 0) THEN

SET score2 = score2PointValue;
SET b12Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a5Mathced = 0 && b15Mathced = 0 && a5 = b15 && a5 != 0 && b15 != 0) THEN

SET score2 = score2PointValue;
SET b15Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a5Mathced = 0 && b18Mathced = 0 && a5 = b18 && a5 != 0 && b18 != 0) THEN

SET score2 = score2PointValue;
SET b18Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

### a5 vege ###

### a8 indul ###

IF (a8Mathced = 0 && b3Mathced = 0 && a8 = b3 && a8 != 0 && b3 != 0) THEN

SET score2 = score2PointValue;
SET b3Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a8Mathced = 0 && b6Mathced = 0 && a8 = b6 && a8 != 0 && b6 != 0) THEN

SET score2 = score2PointValue;
SET b6Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a8Mathced = 0 && b9Mathced = 0 && a8 = b9 && a8 != 0 && b9 != 0) THEN

SET score2 = score2PointValue;
SET b9Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a8Mathced = 0 && b12Mathced = 0 && a8 = b12 && a8 != 0 && b12 != 0) THEN

SET score2 = score2PointValue;
SET b12Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a8Mathced = 0 && b15Mathced = 0 && a8 = b15 && a8 != 0 && b15 != 0) THEN

SET score2 = score2PointValue;
SET b15Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a8Mathced = 0 && b18Mathced = 0 && a8 = b18 && a8 != 0 && b18 != 0) THEN

SET score2 = score2PointValue;
SET b18Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

### a8 vege ###

### a11 indul ###

IF (a11Mathced = 0 && b3Mathced = 0 && a11 = b3 && a11 != 0 && b3 != 0) THEN

SET score2 = score2PointValue;
SET b3Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a11Mathced = 0 && b6Mathced = 0 && a11 = b6 && a11 != 0 && b6 != 0) THEN

SET score2 = score2PointValue;
SET b6Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a11Mathced = 0 && b9Mathced = 0 && a11 = b9 && a11 != 0 && b9 != 0) THEN

SET score2 = score2PointValue;
SET b9Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a11Mathced = 0 && b12Mathced = 0 && a11 = b12 && a11 != 0 && b12 != 0) THEN

SET score2 = score2PointValue;
SET b12Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a11Mathced = 0 && b15Mathced = 0 && a11 = b15 && a11 != 0 && b15 != 0) THEN

SET score2 = score2PointValue;
SET b15Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a11Mathced = 0 && b18Mathced = 0 && a11 = b18 && a11 != 0 && b18 != 0) THEN

SET score2 = score2PointValue;
SET b18Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

### a11 vege ###

### a14 indul ###

IF (a14Mathced = 0 && b3Mathced = 0 && a14 = b3 && a14 != 0 && b3 != 0) THEN

SET score2 = score2PointValue;
SET b3Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a14Mathced = 0 && b6Mathced = 0 && a14 = b6 && a14 != 0 && b6 != 0) THEN

SET score2 = score2PointValue;
SET b6Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a14Mathced = 0 && b9Mathced = 0 && a14 = b9 && a14 != 0 && b9 != 0) THEN

SET score2 = score2PointValue;
SET b9Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a14Mathced = 0 && b12Mathced = 0 && a14 = b12 && a14 != 0 && b12 != 0) THEN

SET score2 = score2PointValue;
SET b12Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a14Mathced = 0 && b15Mathced = 0 && a14 = b15 && a14 != 0 && b15 != 0) THEN

SET score2 = score2PointValue;
SET b15Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a14Mathced = 0 && b18Mathced = 0 && a14 = b18 && a14 != 0 && b18 != 0) THEN

SET score2 = score2PointValue;
SET b18Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

### a14 vege ###

### a17 indul ###

IF (a17Mathced = 0 && b3Mathced = 0 && a17 = b3 && a17 != 0 && b3 != 0) THEN

SET score2 = score2PointValue;
SET b3Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a17Mathced = 0 && b6Mathced = 0 && a17 = b6 && a17 != 0 && b6 != 0) THEN

SET score2 = score2PointValue;
SET b6Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a17Mathced = 0 && b9Mathced = 0 && a17 = b9 && a17 != 0 && b9 != 0) THEN

SET score2 = score2PointValue;
SET b9Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a17Mathced = 0 && b12Mathced = 0 && a17 = b12 && a17 != 0 && b12 != 0) THEN

SET score2 = score2PointValue;
SET b12Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a17Mathced = 0 && b15Mathced = 0 && a17 = b15 && a17 != 0 && b15 != 0) THEN

SET score2 = score2PointValue;
SET b15Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a17Mathced = 0 && b18Mathced = 0 && a17 = b18 && a17 != 0 && b18 != 0) THEN

SET score2 = score2PointValue;
SET b18Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 2-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

### a17 vege ###

### a3 indul ###

IF (a3Mathced = 0 && b2Mathced = 0 && a3 = b2 && a3 != 0 && b2 != 0) THEN

SET score2 = score2PointValue;
SET a3Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a3Mathced = 0 && b5Mathced = 0 && a3 = b5 && a3 != 0 && b5 != 0) THEN

SET score2 = score2PointValue;
SET a3Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a3Mathced = 0 && b8Mathced = 0 && a3 = b8 && a3 != 0 && b8 != 0) THEN

SET score2 = score2PointValue;
SET a3Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a3Mathced = 0 && b11Mathced = 0 && a3 = b11 && a3 != 0 && b11 != 0) THEN

SET score2 = score2PointValue;
SET a3Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a3Mathced = 0 && b14Mathced = 0 && a3 = b14 && a3 != 0 && b14 != 0) THEN

SET score2 = score2PointValue;
SET a3Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a3Mathced = 0 && b17Mathced = 0 && a3 = b17 && a3 != 0 && b17 != 0) THEN

SET score2 = score2PointValue;
SET a3Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
SET b17Mathced = 1;

END IF;

### a3 vege ###

### a6 indul ###

IF (a6Mathced = 0 && b2Mathced = 0 && a6 = b2 && a6 != 0 && b2 != 0) THEN

SET score2 = score2PointValue;
SET a6Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a6Mathced = 0 && b5Mathced = 0 && a6 = b5 && a6 != 0 && b5 != 0) THEN

SET score2 = score2PointValue;
SET a6Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a6Mathced = 0 && b8Mathced = 0 && a6 = b8 && a6 != 0 && b8 != 0) THEN

SET score2 = score2PointValue;
SET a6Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a6Mathced = 0 && b11Mathced = 0 && a6 = b11 && a6 != 0 && b11 != 0) THEN

SET score2 = score2PointValue;
SET a6Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;
END IF;

IF (a6Mathced = 0 && b14Mathced = 0 && a6 = b14 && a6 != 0 && b14 != 0) THEN

SET score2 = score2PointValue;
SET a6Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a6Mathced = 0 && b17Mathced = 0 && a6 = b17 && a6 != 0 && b17 != 0) THEN

SET score2 = score2PointValue;
SET a6Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
SET b17Mathced = 1;

END IF;

### a6 vege ###

### a9 indul ###

IF (a9Mathced = 0 && b2Mathced = 0 && a9 = b2 && a9 != 0 && b2 != 0) THEN

SET score2 = score2PointValue;
SET a9Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a9Mathced = 0 && b5Mathced = 0 && a9 = b5 && a9 != 0 && b5 != 0) THEN

SET score2 = score2PointValue;
SET a9Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;
END IF;

IF (a9Mathced = 0 && b8Mathced = 0 && a9 = b8 && a9 != 0 && b8 != 0) THEN

SET score2 = score2PointValue;
SET a9Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a9Mathced = 0 && b11Mathced = 0 && a9 = b11 && a9 != 0 && b11 != 0) THEN

SET score2 = score2PointValue;
SET a9Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;
END IF;

IF (a9Mathced = 0 && b14Mathced = 0 && a9 = b14 && a9 != 0 && b14 != 0) THEN

SET score2 = score2PointValue;
SET a9Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a9Mathced = 0 && b17Mathced = 0 && a9 = b17 && a9 != 0 && b17 != 0) THEN

SET score2 = score2PointValue;
SET a9Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
SET b17Mathced = 1;

END IF;

### a9 vege ###

### a12 indul ###

IF (a12Mathced = 0 && b2Mathced = 0 && a12 = b2 && a12 != 0 && b2 != 0) THEN

SET score2 = score2PointValue;
SET a12Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a12Mathced = 0 && b5Mathced = 0 && a12 = b5 && a12 != 0 && b5 != 0) THEN

SET score2 = score2PointValue;
SET a12Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a12Mathced = 0 && b8Mathced = 0 && a12 = b8 && a12 != 0 && b8 != 0) THEN

SET score2 = score2PointValue;
SET a12Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a12Mathced = 0 && b11Mathced = 0 && a12 = b11 && a12 != 0 && b11 != 0) THEN

SET score2 = score2PointValue;
SET a12Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a12Mathced = 0 && b14Mathced = 0 && a12 = b14 && a12 != 0 && b14 != 0) THEN

SET score2 = score2PointValue;
SET a12Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a12Mathced = 0 && b17Mathced = 0 && a12 = b17 && a12 != 0 && b17 != 0) THEN

SET score2 = score2PointValue;
SET a12Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
SET b17Mathced = 1;

END IF;

### a12 vege ###

### a15 indul ###

IF (a15Mathced = 0 && b2Mathced = 0 && a15 = b2 && a15 != 0 && b2 != 0) THEN

SET score2 = score2PointValue;
SET a15Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a15Mathced = 0 && b5Mathced = 0 && a15 = b5 && a15 != 0 && b5 != 0) THEN

SET score2 = score2PointValue;
SET a15Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a15Mathced = 0 && b8Mathced = 0 && a15 = b8 && a15 != 0 && b8 != 0) THEN

SET score2 = score2PointValue;
SET a15Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a15Mathced = 0 && b11Mathced = 0 && a15 = b11 && a15 != 0 && b11 != 0) THEN

SET score2 = score2PointValue;
SET a15Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a15Mathced = 0 && b14Mathced = 0 && a15 = b14 && a15 != 0 && b14 != 0) THEN

SET score2 = score2PointValue;
SET a15Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a15Mathced = 0 && b17Mathced = 0 && a15 = b17 && a15 != 0 && b17 != 0) THEN

SET score2 = score2PointValue;
SET a15Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
SET b17Mathced = 1;

END IF;

### a15 vege ###

### a18 indul ###

IF (a18Mathced = 0 && b2Mathced = 0 && a18 = b2 && a18 != 0 && b2 != 0) THEN

SET score2 = score2PointValue;
SET a18Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a18Mathced = 0 && b5Mathced = 0 && a18 = b5 && a18 != 0 && b5 != 0) THEN

SET score2 = score2PointValue;
SET a18Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a18Mathced = 0 && b8Mathced = 0 && a18 = b8 && a18 != 0 && b8 != 0) THEN

SET score2 = score2PointValue;
SET a18Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a18Mathced = 0 && b11Mathced = 0 && a18 = b11 && a18 != 0 && b11 != 0) THEN

SET score2 = score2PointValue;
SET a18Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
SET b11Mathced = 1;
#SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a18Mathced = 0 && b14Mathced = 0 && a18 = b14 && a18 != 0 && b14 != 0) THEN

SET score2 = score2PointValue;
SET a18Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
SET b14Mathced = 1;
#SET b17Mathced = 1;

END IF;

IF (a18Mathced = 0 && b17Mathced = 0 && a18 = b17 && a18 != 0 && b17 != 0) THEN

SET score2 = score2PointValue;
SET a18Mathced = 1;

#Az 2-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
#SET a2Mathced = 1;
#SET a5Mathced = 1;
#SET a8Mathced = 1;
#SET a11Mathced = 1;
#SET a14Mathced = 1;
#SET a17Mathced = 1;

#SET b2Mathced = 1;
#SET b5Mathced = 1;
#SET b8Mathced = 1;
#SET b11Mathced = 1;
#SET b14Mathced = 1;
SET b17Mathced = 1;

END IF;

### a18 vege ###


######################
### 1-4 helyiertek ###
######################

### a1 indul ###

IF (a1Mathced = 0 && b3Mathced = 0 && a1 = b3 && a1 != 0 && b3 != 0) THEN

SET score1 = score1PointValue;
SET b3Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a1Mathced = 0 && b6Mathced = 0 && a1 = b6 && a1 != 0 && b6 != 0) THEN

SET score1 = score1PointValue;
SET b6Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a1Mathced = 0 && b9Mathced = 0 && a1 = b9 && a1 != 0 && b9 != 0) THEN

SET score1 = score1PointValue;
SET b9Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a1Mathced = 0 && b12Mathced = 0 && a1 = b12 && a1 != 0 && b12 != 0) THEN

SET score1 = score1PointValue;
SET b12Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a1Mathced = 0 && b15Mathced = 0 && a1 = b15 && a1 != 0 && b15 != 0) THEN

SET score1 = score1PointValue;
SET b15Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a1Mathced = 0 && b18Mathced = 0 && a1 = b18 && a1 != 0 && b18 != 0) THEN

SET score1 = score1PointValue;
SET b18Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a1 vege ###
### a4 indul ###

IF (a4Mathced = 0 && b3Mathced = 0 && a4 = b3 && a4 != 0 && b3 != 0) THEN

SET score1 = score1PointValue;
SET b3Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a4Mathced = 0 && b6Mathced = 0 && a4 = b6 && a4 != 0 && b6 != 0) THEN

SET score1 = score1PointValue;
SET b6Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a4Mathced = 0 && b9Mathced = 0 && a4 = b9 && a4 != 0 && b9 != 0) THEN

SET score1 = score1PointValue;
SET b9Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a4Mathced = 0 && b12Mathced = 0 && a4 = b12 && a4 != 0 && b12 != 0) THEN

SET score1 = score1PointValue;
SET b12Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a4Mathced = 0 && b15Mathced = 0 && a4 = b15 && a4 != 0 && b15 != 0) THEN

SET score1 = score1PointValue;
SET b15Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a4Mathced = 0 && b18Mathced = 0 && a4 = b18 && a4 != 0 && b18 != 0) THEN

SET score1 = score1PointValue;
SET b18Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a4 vege ###

### a7 indul ###

IF (a7Mathced = 0 && b3Mathced = 0 && a7 = b3 && a7 != 0 && b3 != 0) THEN

SET score1 = score1PointValue;
SET b3Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a7Mathced = 0 && b6Mathced = 0 && a7 = b6 && a7 != 0 && b6 != 0) THEN

SET score1 = score1PointValue;
SET b6Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a7Mathced = 0 && b9Mathced = 0 && a7 = b9 && a7 != 0 && b9 != 0) THEN

SET score1 = score1PointValue;
SET b9Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a7Mathced = 0 && b12Mathced = 0 && a7 = b12 && a7 != 0 && b12 != 0) THEN

SET score1 = score1PointValue;
SET b12Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a7Mathced = 0 && b15Mathced = 0 && a7 = b15 && a7 != 0 && b15 != 0) THEN

SET score1 = score1PointValue;
SET b15Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a7Mathced = 0 && b18Mathced = 0 && a7 = b18 && a7 != 0 && b18 != 0) THEN

SET score1 = score1PointValue;
SET b18Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a7 vege ###

### a10 indul ###

IF (a10Mathced = 0 && b3Mathced = 0 && a10 = b3 && a10 != 0 && b3 != 0) THEN

SET score1 = score1PointValue;
SET b3Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a10Mathced = 0 && b6Mathced = 0 && a10 = b6 && a10 != 0 && b6 != 0) THEN

SET score1 = score1PointValue;
SET b6Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a10Mathced = 0 && b9Mathced = 0 && a10 = b9 && a10 != 0 && b9 != 0) THEN

SET score1 = score1PointValue;
SET b9Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a10Mathced = 0 && b12Mathced = 0 && a10 = b12 && a10 != 0 && b12 != 0) THEN

SET score1 = score1PointValue;
SET b12Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a10Mathced = 0 && b15Mathced = 0 && a10 = b15 && a10 != 0 && b15 != 0) THEN

SET score1 = score1PointValue;
SET b15Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a10Mathced = 0 && b18Mathced = 0 && a10 = b18 && a10 != 0 && b18 != 0) THEN

SET score1 = score1PointValue;
SET b18Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a10 vege ###

### a13 indul ###

IF (a13Mathced = 0 && b3Mathced = 0 && a13 = b3 && a13 != 0 && b3 != 0) THEN

SET score1 = score1PointValue;
SET b3Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a13Mathced = 0 && b6Mathced = 0 && a13 = b6 && a13 != 0 && b6 != 0) THEN

SET score1 = score1PointValue;
SET b6Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a13Mathced = 0 && b9Mathced = 0 && a13 = b9 && a13 != 0 && b9 != 0) THEN

SET score1 = score1PointValue;
SET b9Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a13Mathced = 0 && b12Mathced = 0 && a13 = b12 && a13 != 0 && b12 != 0) THEN

SET score1 = score1PointValue;
SET b12Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a13Mathced = 0 && b15Mathced = 0 && a13 = b15 && a13 != 0 && b15 != 0) THEN

SET score1 = score1PointValue;
SET b15Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a13Mathced = 0 && b18Mathced = 0 && a13 = b18 && a13 != 0 && b18 != 0) THEN

SET score1 = score1PointValue;
SET b18Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a13 vege ###

### a16 indul ###

IF (a16Mathced = 0 && b3Mathced = 0 && a16 = b3 && a16 != 0 && b3 != 0) THEN

SET score1 = score1PointValue;
SET b3Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a16Mathced = 0 && b6Mathced = 0 && a16 = b6 && a16 != 0 && b6 != 0) THEN

SET score1 = score1PointValue;
SET b6Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a16Mathced = 0 && b9Mathced = 0 && a16 = b9 && a16 != 0 && b9 != 0) THEN

SET score1 = score1PointValue;
SET b9Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a16Mathced = 0 && b12Mathced = 0 && a16 = b12 && a16 != 0 && b12 != 0) THEN

SET score1 = score1PointValue;
SET b12Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a16Mathced = 0 && b15Mathced = 0 && a16 = b15 && a16 != 0 && b15 != 0) THEN

SET score1 = score1PointValue;
SET b15Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a16Mathced = 0 && b18Mathced = 0 && a16 = b18 && a16 != 0 && b18 != 0) THEN

SET score1 = score1PointValue;
SET b18Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a16 vege ###


### a3 indul ###

IF (a3Mathced = 0 && b1Mathced = 0 && a3 = b1 && a3 != 0 && b1 != 0) THEN

SET score1 = score1PointValue;
SET a3Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a3Mathced = 0 && b4Mathced = 0 && a3 = b4 && a3 != 0 && b4 != 0) THEN

SET score1 = score1PointValue;
SET a3Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a3Mathced = 0 && b7Mathced = 0 && a3 = b7 && a3 != 0 && b7 != 0) THEN

SET score1 = score1PointValue;
SET a3Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a3Mathced = 0 && b10Mathced = 0 && a3 = b10 && a3 != 0 && b10 != 0) THEN

SET score1 = score1PointValue;
SET a3Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a3Mathced = 0 && b13Mathced = 0 && a3 = b13 && a3 != 0 && b13 != 0) THEN

SET score1 = score1PointValue;
SET a3Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a3Mathced = 0 && b16Mathced = 0 && a3 = b16 && a3 != 0 && b16 != 0) THEN

SET score1 = score1PointValue;
SET a3Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a3 vege ###

### a6 indul ###

IF (a6Mathced = 0 && b1Mathced = 0 && a6 = b1 && a6 != 0 && b1 != 0) THEN

SET score1 = score1PointValue;
SET a6Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a6Mathced = 0 && b4Mathced = 0 && a6 = b4 && a6 != 0 && b4 != 0) THEN

SET score1 = score1PointValue;
SET a6Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a6Mathced = 0 && b7Mathced = 0 && a6 = b7 && a6 != 0 && b7 != 0) THEN

SET score1 = score1PointValue;
SET a6Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a6Mathced = 0 && b10Mathced = 0 && a6 = b10 && a6 != 0 && b10 != 0) THEN

SET score1 = score1PointValue;
SET a6Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a6Mathced = 0 && b13Mathced = 0 && a6 = b13 && a6 != 0 && b13 != 0) THEN

SET score1 = score1PointValue;
SET a6Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a6Mathced = 0 && b16Mathced = 0 && a6 = b16 && a6 != 0 && b16 != 0) THEN

SET score1 = score1PointValue;
SET a6Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a6 vege ###

### a9 indul ###

IF (a9Mathced = 0 && b1Mathced = 0 && a9 = b1 && a9 != 0 && b1 != 0) THEN

SET score1 = score1PointValue;
SET a9Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a9Mathced = 0 && b4Mathced = 0 && a9 = b4 && a9 != 0 && b4 != 0) THEN

SET score1 = score1PointValue;
SET a9Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a9Mathced = 0 && b7Mathced = 0 && a9 = b7 && a9 != 0 && b7 != 0) THEN

SET score1 = score1PointValue;
SET a9Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a9Mathced = 0 && b10Mathced = 0 && a9 = b10 && a9 != 0 && b10 != 0) THEN

SET score1 = score1PointValue;
SET a9Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a9Mathced = 0 && b13Mathced = 0 && a9 = b13 && a9 != 0 && b13 != 0) THEN

SET score1 = score1PointValue;
SET a9Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a9Mathced = 0 && b16Mathced = 0 && a9 = b16 && a9 != 0 && b16 != 0) THEN

SET score1 = score1PointValue;
SET a9Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a9 vege ###

### a12 indul ###

IF (a12Mathced = 0 && b1Mathced = 0 && a12 = b1 && a12 != 0 && b1 != 0) THEN

SET score1 = score1PointValue;
SET a12Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a12Mathced = 0 && b4Mathced = 0 && a12 = b4 && a12 != 0 && b4 != 0) THEN

SET score1 = score1PointValue;
SET a12Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a12Mathced = 0 && b7Mathced = 0 && a12 = b7 && a12 != 0 && b7 != 0) THEN

SET score1 = score1PointValue;
SET a12Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a12Mathced = 0 && b10Mathced = 0 && a12 = b10 && a12 != 0 && b10 != 0) THEN

SET score1 = score1PointValue;
SET a12Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a12Mathced = 0 && b13Mathced = 0 && a12 = b13 && a12 != 0 && b13 != 0) THEN

SET score1 = score1PointValue;
SET a12Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a12Mathced = 0 && b16Mathced = 0 && a12 = b16 && a12 != 0 && b16 != 0) THEN

SET score1 = score1PointValue;
SET a12Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a12 vege ###

### a15 indul ###

IF (a15Mathced = 0 && b1Mathced = 0 && a15 = b1 && a15 != 0 && b1 != 0) THEN

SET score1 = score1PointValue;
SET a15Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a15Mathced = 0 && b4Mathced = 0 && a15 = b4 && a15 != 0 && b4 != 0) THEN

SET score1 = score1PointValue;
SET a15Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a15Mathced = 0 && b7Mathced = 0 && a15 = b7 && a15 != 0 && b7 != 0) THEN

SET score1 = score1PointValue;
SET a15Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a15Mathced = 0 && b10Mathced = 0 && a15 = b10 && a15 != 0 && b10 != 0) THEN

SET score1 = score1PointValue;
SET a15Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a15Mathced = 0 && b13Mathced = 0 && a15 = b13 && a15 != 0 && b13 != 0) THEN

SET score1 = score1PointValue;
SET a15Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a15Mathced = 0 && b16Mathced = 0 && a15 = b16 && a15 != 0 && b16 != 0) THEN

SET score1 = score1PointValue;
SET a15Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a15 vege ###

### a18 indul ###

IF (a18Mathced = 0 && b1Mathced = 0 && a18 = b1 && a18 != 0 && b1 != 0) THEN

SET score1 = score1PointValue;
SET a18Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a18Mathced = 0 && b4Mathced = 0 && a18 = b4 && a18 != 0 && b4 != 0) THEN

SET score1 = score1PointValue;
SET a18Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a18Mathced = 0 && b7Mathced = 0 && a18 = b7 && a18 != 0 && b7 != 0) THEN

SET score1 = score1PointValue;
SET a18Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a18Mathced = 0 && b10Mathced = 0 && a18 = b10 && a18 != 0 && b10 != 0) THEN

SET score1 = score1PointValue;
SET a18Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a18Mathced = 0 && b13Mathced = 0 && a18 = b13 && a18 != 0 && b13 != 0) THEN

SET score1 = score1PointValue;
SET a18Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a18Mathced = 0 && b16Mathced = 0 && a18 = b16 && a18 != 0 && b16 != 0) THEN

SET score1 = score1PointValue;
SET a18Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a18 vege ###


######################
### 1-2 helyiertek ###
######################

### a1 indul ###

IF (a1Mathced = 0 && b2Mathced = 0 && a1 = b2 && a1 != 0 && b2 != 0) THEN

SET score1 = score1PointValue;
SET b2Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET a16Mathced = 1;

END IF;

IF (a1Mathced = 0 && b5Mathced = 0 && a1 = b5 && a1 != 0 && b5 != 0) THEN

SET score1 = score1PointValue;
SET b5Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET a16Mathced = 1;

END IF;

IF (a1Mathced = 0 && b8Mathced = 0 && a1 = b8 && a1 != 0 && b8 != 0) THEN

SET score1 = score1PointValue;
SET b8Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET a16Mathced = 1;

END IF;

IF (a1Mathced = 0 && b11Mathced = 0 && a1 = b11 && a1 != 0 && b11 != 0) THEN

SET score1 = score1PointValue;
SET b11Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET a16Mathced = 1;

END IF;

IF (a1Mathced = 0 && b14Mathced = 0 && a1 = b14 && a1 != 0 && b14 != 0) THEN

SET score1 = score1PointValue;
SET b14Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET a16Mathced = 1;

END IF;

IF (a1Mathced = 0 && b17Mathced = 0 && a1 = b17 && a1 != 0 && b17 != 0) THEN

SET score1 = score1PointValue;
SET b17Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a1 vege ###

### a4 indul ###

IF (a4Mathced = 0 && b2Mathced = 0 && a4 = b2 && a4 != 0 && b2 != 0) THEN

SET score1 = score1PointValue;
SET b2Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a4Mathced = 0 && b5Mathced = 0 && a4 = b5 && a4 != 0 && b5 != 0) THEN

SET score1 = score1PointValue;
SET b5Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a4Mathced = 0 && b8Mathced = 0 && a4 = b8 && a4 != 0 && b8 != 0) THEN

SET score1 = score1PointValue;
SET b8Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a4Mathced = 0 && b11Mathced = 0 && a4 = b11 && a4 != 0 && b11 != 0) THEN

SET score1 = score1PointValue;
SET b11Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a4Mathced = 0 && b14Mathced = 0 && a4 = b14 && a4 != 0 && b14 != 0) THEN

SET score1 = score1PointValue;
SET b14Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a4Mathced = 0 && b17Mathced = 0 && a4 = b17 && a4 != 0 && b17 != 0) THEN

SET score1 = score1PointValue;
SET b17Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a4 vege ###

### a7 indul ###

IF (a7Mathced = 0 && b2Mathced = 0 && a7 = b2 && a7 != 0 && b2 != 0) THEN

SET score1 = score1PointValue;
SET b2Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a7Mathced = 0 && b5Mathced = 0 && a7 = b5 && a7 != 0 && b5 != 0) THEN

SET score1 = score1PointValue;
SET b5Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a7Mathced = 0 && b8Mathced = 0 && a7 = b8 && a7 != 0 && b8 != 0) THEN

SET score1 = score1PointValue;
SET b8Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a7Mathced = 0 && b11Mathced = 0 && a7 = b11 && a7 != 0 && b11 != 0) THEN

SET score1 = score1PointValue;
SET b11Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a7Mathced = 0 && b14Mathced = 0 && a7 = b14 && a7 != 0 && b14 != 0) THEN

SET score1 = score1PointValue;
SET b14Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a7Mathced = 0 && b17Mathced = 0 && a7 = b17 && a7 != 0 && b17 != 0) THEN

SET score1 = score1PointValue;
SET b17Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a7 vege ###

### a10 indul ###

IF (a10Mathced = 0 && b2Mathced = 0 && a10 = b2 && a10 != 0 && b2 != 0) THEN

SET score1 = score1PointValue;
SET b2Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a10Mathced = 0 && b5Mathced = 0 && a10 = b5 && a10 != 0 && b5 != 0) THEN

SET score1 = score1PointValue;
SET b5Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a10Mathced = 0 && b8Mathced = 0 && a10 = b8 && a10 != 0 && b8 != 0) THEN

SET score1 = score1PointValue;
SET b8Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a10Mathced = 0 && b11Mathced = 0 && a10 = b11 && a10 != 0 && b11 != 0) THEN

SET score1 = score1PointValue;
SET b11Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a10Mathced = 0 && b14Mathced = 0 && a10 = b14 && a10 != 0 && b14 != 0) THEN

SET score1 = score1PointValue;
SET b14Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a10Mathced = 0 && b17Mathced = 0 && a10 = b17 && a10 != 0 && b17 != 0) THEN

SET score1 = score1PointValue;
SET b17Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a10 vege ###

### a13 indul ###

IF (a13Mathced = 0 && b2Mathced = 0 && a13 = b2 && a13 != 0 && b2 != 0) THEN

SET score1 = score1PointValue;
SET b2Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a13Mathced = 0 && b5Mathced = 0 && a13 = b5 && a13 != 0 && b5 != 0) THEN

SET score1 = score1PointValue;
SET b5Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a13Mathced = 0 && b8Mathced = 0 && a13 = b8 && a13 != 0 && b8 != 0) THEN

SET score1 = score1PointValue;
SET b8Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a13Mathced = 0 && b11Mathced = 0 && a13 = b11 && a13 != 0 && b11 != 0) THEN

SET score1 = score1PointValue;
SET b11Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a13Mathced = 0 && b14Mathced = 0 && a13 = b14 && a13 != 0 && b14 != 0) THEN

SET score1 = score1PointValue;
SET b14Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a13Mathced = 0 && b17Mathced = 0 && a13 = b17 && a13 != 0 && b17 != 0) THEN

SET score1 = score1PointValue;
SET b17Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a13 vege ###

### a16 indul ###

IF (a16Mathced = 0 && b2Mathced = 0 && a16 = b2 && a16 != 0 && b2 != 0) THEN

SET score1 = score1PointValue;
SET b2Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a16Mathced = 0 && b5Mathced = 0 && a16 = b5 && a16 != 0 && b5 != 0) THEN

SET score1 = score1PointValue;
SET b5Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a16Mathced = 0 && b8Mathced = 0 && a16 = b8 && a16 != 0 && b8 != 0) THEN

SET score1 = score1PointValue;
SET b8Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a16Mathced = 0 && b11Mathced = 0 && a16 = b11 && a16 != 0 && b11 != 0) THEN

SET score1 = score1PointValue;
SET b11Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a16Mathced = 0 && b14Mathced = 0 && a16 = b14 && a16 != 0 && b14 != 0) THEN

SET score1 = score1PointValue;
SET b14Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a16Mathced = 0 && b17Mathced = 0 && a16 = b17 && a16 != 0 && b17 != 0) THEN

SET score1 = score1PointValue;
SET b17Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a16 vege ###

### a2 indul ###

IF (a2Mathced = 0 && b1Mathced = 0 && a2 = b1 && a2 != 0 && b1 != 0) THEN

SET score1 = score1PointValue;
SET a2Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a2Mathced = 0 && b4Mathced = 0 && a2 = b4 && a2 != 0 && b4 != 0) THEN

SET score1 = score1PointValue;
SET a2Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a2Mathced = 0 && b7Mathced = 0 && a2 = b7 && a2 != 0 && b7 != 0) THEN

SET score1 = score1PointValue;
SET a2Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a2Mathced = 0 && b10Mathced = 0 && a2 = b10 && a2 != 0 && b10 != 0) THEN

SET score1 = score1PointValue;
SET a2Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a2Mathced = 0 && b13Mathced = 0 && a2 = b13 && a2 != 0 && b13 != 0) THEN

SET score1 = score1PointValue;
SET a2Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a2Mathced = 0 && b16Mathced = 0 && a2 = b16 && a2 != 0 && b16 != 0) THEN

SET score1 = score1PointValue;
SET a2Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a2 vege ###

### a5 indul ###

IF (a5Mathced = 0 && b1Mathced = 0 && a5 = b1 && a5 != 0 && b1 != 0) THEN

SET score1 = score1PointValue;
SET a5Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a5Mathced = 0 && b4Mathced = 0 && a5 = b4 && a5 != 0 && b4 != 0) THEN

SET score1 = score1PointValue;
SET a5Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a5Mathced = 0 && b7Mathced = 0 && a5 = b7 && a5 != 0 && b7 != 0) THEN

SET score1 = score1PointValue;
SET a5Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a5Mathced = 0 && b10Mathced = 0 && a5 = b10 && a5 != 0 && b10 != 0) THEN

SET score1 = score1PointValue;
SET a5Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a5Mathced = 0 && b13Mathced = 0 && a5 = b13 && a5 != 0 && b13 != 0) THEN

SET score1 = score1PointValue;
SET a5Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a5Mathced = 0 && b16Mathced = 0 && a5 = b16 && a5 != 0 && b16 != 0) THEN

SET score1 = score1PointValue;
SET a5Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a5 vege ###

### a8 indul ###

IF (a8Mathced = 0 && b1Mathced = 0 && a8 = b1 && a8 != 0 && b1 != 0) THEN

SET score1 = score1PointValue;
SET a8Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a8Mathced = 0 && b4Mathced = 0 && a8 = b4 && a8 != 0 && b4 != 0) THEN

SET score1 = score1PointValue;
SET a8Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a8Mathced = 0 && b7Mathced = 0 && a8 = b7 && a8 != 0 && b7 != 0) THEN

SET score1 = score1PointValue;
SET a8Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a8Mathced = 0 && b10Mathced = 0 && a8 = b10 && a8 != 0 && b10 != 0) THEN

SET score1 = score1PointValue;
SET a8Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a8Mathced = 0 && b13Mathced = 0 && a8 = b13 && a8 != 0 && b13 != 0) THEN

SET score1 = score1PointValue;
SET a8Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a8Mathced = 0 && b16Mathced = 0 && a8 = b16 && a8 != 0 && b16 != 0) THEN

SET score1 = score1PointValue;
SET a8Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a8 vege ###

### a11 indul ###

IF (a11Mathced = 0 && b1Mathced = 0 && a11 = b1 && a11 != 0 && b1 != 0) THEN

SET score1 = score1PointValue;
SET a11Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a11Mathced = 0 && b4Mathced = 0 && a11 = b4 && a11 != 0 && b4 != 0) THEN

SET score1 = score1PointValue;
SET a11Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a11Mathced = 0 && b7Mathced = 0 && a11 = b7 && a11 != 0 && b7 != 0) THEN

SET score1 = score1PointValue;
SET a11Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a11Mathced = 0 && b10Mathced = 0 && a11 = b10 && a11 != 0 && b10 != 0) THEN

SET score1 = score1PointValue;
SET a11Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a11Mathced = 0 && b13Mathced = 0 && a11 = b13 && a11 != 0 && b13 != 0) THEN

SET score1 = score1PointValue;
SET a11Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a11Mathced = 0 && b16Mathced = 0 && a11 = b16 && a11 != 0 && b16 != 0) THEN

SET score1 = score1PointValue;
SET a11Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a11 vege ###

### a14 indul ###

IF (a14Mathced = 0 && b1Mathced = 0 && a14 = b1 && a14 != 0 && b1 != 0) THEN

SET score1 = score1PointValue;
SET a14Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a14Mathced = 0 && b4Mathced = 0 && a14 = b4 && a14 != 0 && b4 != 0) THEN

SET score1 = score1PointValue;
SET a14Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a14Mathced = 0 && b7Mathced = 0 && a14 = b7 && a14 != 0 && b7 != 0) THEN

SET score1 = score1PointValue;
SET a14Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a14Mathced = 0 && b10Mathced = 0 && a14 = b10 && a14 != 0 && b10 != 0) THEN

SET score1 = score1PointValue;
SET a14Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a14Mathced = 0 && b13Mathced = 0 && a14 = b13 && a14 != 0 && b13 != 0) THEN

SET score1 = score1PointValue;
SET a14Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a14Mathced = 0 && b16Mathced = 0 && a14 = b16 && a14 != 0 && b16 != 0) THEN

SET score1 = score1PointValue;
SET a14Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a14 vege ###

### a17 indul ###

IF (a17Mathced = 0 && b1Mathced = 0 && a17 = b1 && a17 != 0 && b1 != 0) THEN

SET score1 = score1PointValue;
SET a17Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a17Mathced = 0 && b4Mathced = 0 && a17 = b4 && a17 != 0 && b4 != 0) THEN

SET score1 = score1PointValue;
SET a17Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a17Mathced = 0 && b7Mathced = 0 && a17 = b7 && a17 != 0 && b7 != 0) THEN

SET score1 = score1PointValue;
SET a17Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a17Mathced = 0 && b10Mathced = 0 && a17 = b10 && a17 != 0 && b10 != 0) THEN

SET score1 = score1PointValue;
SET a17Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a17Mathced = 0 && b13Mathced = 0 && a17 = b13 && a17 != 0 && b13 != 0) THEN

SET score1 = score1PointValue;
SET a17Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

IF (a17Mathced = 0 && b16Mathced = 0 && a17 = b16 && a17 != 0 && b16 != 0) THEN

SET score1 = score1PointValue;
SET a17Mathced = 1;

#Az 1-es helyiertekek letiltasa (tovabbi 1-es parositasnak mar nincs ertelme)
SET a1Mathced = 1;
SET a4Mathced = 1;
SET a7Mathced = 1;
SET a10Mathced = 1;
SET a13Mathced = 1;
SET a16Mathced = 1;

SET b1Mathced = 1;
SET b4Mathced = 1;
SET b7Mathced = 1;
SET b10Mathced = 1;
SET b13Mathced = 1;
SET b16Mathced = 1;

END IF;

### a17 vege ###


#################
### Osszegzes ###
#################

IF (score1 = 0 && score2 = score2PointValue && score4 = score4PointValue) THEN
	SET score1 = score1PointValue;
END IF;

IF (score2 = 0 && score1 = score1PointValue && score4 = score4PointValue) THEN
	SET score2 = score2PointValue;
END IF;

IF (score4 = 0 && score1 = score1PointValue && score2 = score2PointValue) THEN
	SET score4 = score4PointValue;
END IF;


IF (score1 = -1) THEN
	SET score1 = 0;
END IF;

IF (score2 = -1) THEN
	SET score2 = 0;
END IF;

IF (score4 = -1) THEN
	SET score4 = 0;
END IF;

SET score = score1 + score2 + score4;

RETURN score;
END//
DELIMITER ;
