Ich habe mal ein vier-gewinnt programmiert, da ist die Gewinnprüfung ja ähnlich. Ich hatte damals ein Array von Feldern. ("Feld" war ein eigenes GUI-Element)
Die Gewinnprüfung sah dann so aus:
												| 1:2:
 3:
 4:
 5:
 6:
 7:
 8:
 9:
 10:
 11:
 12:
 13:
 14:
 15:
 16:
 17:
 18:
 19:
 20:
 21:
 22:
 23:
 24:
 25:
 26:
 27:
 28:
 29:
 30:
 31:
 32:
 33:
 34:
 35:
 36:
 37:
 38:
 39:
 40:
 41:
 42:
 43:
 44:
 45:
 46:
 47:
 48:
 49:
 50:
 51:
 52:
 53:
 54:
 55:
 56:
 57:
 58:
 59:
 60:
 
 | function TAboutForm.Gewonnen: Boolean;var
 i, j: Integer;
 begin
 Result := False;
 
 for i := 0 to 6 do
 for j := 0 to 4 do
 if Felder[i, j].Tag = CurrPlayer then
 if CheckForVictory(i, j) then
 begin
 Result := True;
 Exit;
 end;
 end;
 
 function TAboutForm.CheckForVictory(Col, Row: Integer): Boolean;
 begin
 Result := False;
 
 if (Col + 3 in [0..6]) and (Row + 0 in [0..4]) and
 (Felder[Col + 1, Row + 0].Tag = CurrPlayer) and
 (Felder[Col + 2, Row + 0].Tag = CurrPlayer) and
 (Felder[Col + 3, Row + 0].Tag = CurrPlayer) then
 begin
 Result := True;
 Exit;
 end;
 
 if (Col + 3 in [0..6]) and (Row + 3 in [0..4]) and
 (Felder[Col + 1, Row + 1].Tag = CurrPlayer) and
 (Felder[Col + 2, Row + 2].Tag = CurrPlayer) and
 (Felder[Col + 3, Row + 3].Tag = CurrPlayer) then
 begin
 Result := True;
 Exit;
 end;
 
 if (Col + 0 in [0..6]) and (Row + 3 in [0..4]) and
 (Felder[Col + 0, Row + 1].Tag = CurrPlayer) and
 (Felder[Col + 0, Row + 2].Tag = CurrPlayer) and
 (Felder[Col + 0, Row + 3].Tag = CurrPlayer) then
 begin
 Result := True;
 Exit;
 end;
 
 if (Col - 3 in [0..6]) and (Row + 3 in [0..4]) and
 (Felder[Col - 1, Row + 1].Tag = CurrPlayer) and
 (Felder[Col - 2, Row + 2].Tag = CurrPlayer) and
 (Felder[Col - 3, Row + 3].Tag = CurrPlayer) then
 begin
 Result := True;
 Exit;
 end;
 end;
 | 
		
	  
Aber das ist schon lange her ^^ Man sollte die Bedingung am Besten auch noch in eine eigene Funktion auslagern.
Der Grundgedanke ist hier, dass man ja nur vier der möglichen acht Richtungen untersuchen muss, weil die anderen ja vom anderen Ende aus geprüft werden.