if whatdotcolour (x, y) = 12 and whatdotcolour (x + 60, y) = 12 and whatdotcolour (x + 120, y) = 12 and whatdotcolour (x + 180, y) = 12 then
redWon
elsif whatdotcolour (x, y) = 9 and whatdotcolour (x + 60, y) = 9 and whatdotcolour (x + 120, y) = 9 and whatdotcolour (x + 180, y) = 9 then
blueWon
elsif whatdotcolour (x, y) = 9 and whatdotcolour (x - 60, y) = 9 and whatdotcolour (x - 120, y) = 9 and whatdotcolour (x - 180, y) = 9 then
blueWon
elsif whatdotcolour (x, y) = 12 and whatdotcolour (x - 60, y) = 12 and whatdotcolour (x - 120, y) = 12 and whatdotcolour (x - 180, y) = 12 then
redWon
elsif whatdotcolour (x, y) = 9 and whatdotcolour (x, y - 70) = 9 and whatdotcolour (x, y - 140) = 9 and whatdotcolour (x, y - 210) = 9 then
blueWon
elsif whatdotcolour (x, y) = 12 and whatdotcolour (x, y - 70) = 12 and whatdotcolour (x, y - 140) = 12 and whatdotcolour (x, y - 210) = 12 then
redWon
elsif whatdotcolour (x, y) = 12 and whatdotcolour (x, y + 70) = 12 and whatdotcolour (x, y + 140) = 12 and whatdotcolour (x, y + 210) = 12 then
redWon
elsif whatdotcolour (x, y) = 9 and whatdotcolour (x, y + 70) = 9 and whatdotcolour (x, y + 140) = 9 and whatdotcolour (x, y + 210) = 9 then
blueWon
%Diagonal check starts here
elsif whatdotcolour (x, y) = 12 and whatdotcolour (x + 60, y + 70) = 12 and whatdotcolour (x + 120, y + 140) = 12 and whatdotcolour (x + 180, y + 210) = 12 then
redWon
elsif whatdotcolour (x, y) = 9 and whatdotcolour (x + 60, y + 70) = 9 and whatdotcolour (x + 120, y + 140) = 9 and whatdotcolour (x + 180, y + 210) = 9 then
blueWon
elsif whatdotcolour (x, y) = 12 and whatdotcolour (x - 60, y - 70) = 12 and whatdotcolour (x - 120, y - 140) = 12 and whatdotcolour (x - 180, y - 210) = 12 then
redWon
elsif whatdotcolour (x, y) = 9 and whatdotcolour (x - 60, y - 70) = 9 and whatdotcolour (x - 120, y - 140) = 9 and whatdotcolour (x - 180, y - 210) = 9 then
blueWon
elsif whatdotcolour (x, y) = 12 and whatdotcolour (x + 60, y - 70) = 12 and whatdotcolour (x + 120, y - 140) = 12 and whatdotcolour (x + 180, y - 210) = 12 then
redWon
elsif whatdotcolour (x, y) = 9 and whatdotcolour (x + 60, y - 70) = 9 and whatdotcolour (x + 120, y - 140) = 9 and whatdotcolour (x + 180, y - 210) = 9 then
blueWon
elsif whatdotcolour (x, y) = 12 and whatdotcolour (x - 60, y + 70) = 12 and whatdotcolour (x - 120, y + 140) = 12 and whatdotcolour (x - 180, y + 210) = 12 then
redWon
elsif whatdotcolour (x, y) = 9 and whatdotcolour (x - 60, y + 70) = 9 and whatdotcolour (x - 120, y + 140) = 9 and whatdotcolour (x - 180, y + 210) = 9 then
blueWon
end if |