Verbessert findPossiblePositions rechtsfrei untenfrei.
This commit is contained in:
parent
d5882589c0
commit
7d48b1d990
@ -1,3 +1,4 @@
|
|||||||
|
//Bearbeitet von Lukas Wörner, 02.11.25
|
||||||
#include "game.h"
|
#include "game.h"
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -95,6 +96,10 @@ int findPossiblePositions(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN]
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rechtsfrei = 0;
|
||||||
|
}
|
||||||
//nach unten prüfen
|
//nach unten prüfen
|
||||||
if(searchFieldLen - i >= wordlen)
|
if(searchFieldLen - i >= wordlen)
|
||||||
{
|
{
|
||||||
@ -107,6 +112,10 @@ int findPossiblePositions(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN]
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
untenfrei = 0;
|
||||||
|
}
|
||||||
if(rechtsfrei) //Positions array wird mit gültigen Positionen und Richtung befüllt.
|
if(rechtsfrei) //Positions array wird mit gültigen Positionen und Richtung befüllt.
|
||||||
{
|
{
|
||||||
positions[positionamount].x = k;
|
positions[positionamount].x = k;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user