Compare commits
2 Commits
8ce6c24db2
...
ebab3a110e
| Author | SHA1 | Date | |
|---|---|---|---|
| ebab3a110e | |||
| 248044c79b |
@ -59,12 +59,13 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
|
||||
unsigned int erfolgreichGesetzt = 0;
|
||||
|
||||
//Wörter zufällig platzieren
|
||||
for(unisgned int w = 0; w < wordCount; w++) {
|
||||
int platziert = 0;
|
||||
//for(unsigned int w = 0, w < wordCount, w++) {
|
||||
|
||||
for (unsigned int w = 0; w < wordCount; w++)
|
||||
|
||||
for (unsigned int w = 0, w < wordCount, w++)
|
||||
{
|
||||
for (int versuch = 0; versuch < MAX_RAND_TRIES_PER_WORD && !platziert; versuch++) {
|
||||
int platziert = 0;
|
||||
for (int versuch = 0; versuch < MAX_RAND_TRIES_PER_WORD && !platziert; versuch++) {
|
||||
int richtung = rand() % 2; // 0 = horizontal, 1 = vertikal
|
||||
int zeile = rand() % searchFieldLen;
|
||||
int spalte = rand() % searchFieldLen;
|
||||
@ -83,10 +84,11 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
|
||||
if (salad[i][j] == EMPTY_CHAR)
|
||||
salad[i][j] = 'A' + rand() % 26;
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
return erfolgreichGesetzt;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BIN
Start_Windows/input.o
Normal file
BIN
Start_Windows/input.o
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user