Compare commits
3
Commits
b9ca7ff70c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b6699b543 | ||
|
|
e3e5d4d434 | ||
|
|
97ed155236 |
@@ -13,6 +13,8 @@
|
||||
// Creates the word salad by placing words randomly and filling empty spaces
|
||||
int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, char words[][MAX_WORD_LEN], unsigned int wordCount)
|
||||
{
|
||||
srand(time(NULL));
|
||||
|
||||
int row, col, placedWords = 0;
|
||||
|
||||
// Gesamtes Feld auf 0 setzen
|
||||
|
||||
+2
-1
@@ -6,6 +6,7 @@
|
||||
|
||||
#define MAX_NUMBER_OF_WORDS 100
|
||||
#define SALAD_SIZE 20
|
||||
#define WINDOW_WIDTH 800
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -47,7 +48,7 @@ int main(int argc, char *argv[])
|
||||
// Start game if at least 1 word was successfully placed
|
||||
if (placedWords > 0)
|
||||
{
|
||||
startGame(wordSalad, SALAD_SIZE, words, wordCount, 800);
|
||||
startGame(wordSalad, SALAD_SIZE, words, placedWords, WINDOW_WIDTH);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
// Creates the word salad by placing words randomly and filling empty spaces
|
||||
int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, char words[][MAX_WORD_LEN], unsigned int wordCount)
|
||||
{
|
||||
srand(time(NULL));
|
||||
|
||||
int row, col, placedWords = 0;
|
||||
|
||||
// Gesamtes Feld auf 0 setzen
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#define MAX_NUMBER_OF_WORDS 100
|
||||
#define SALAD_SIZE 20
|
||||
#define WINDOW_WIDTH 800
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -47,7 +48,7 @@ int main(int argc, char *argv[])
|
||||
// Start game if at least 1 word was successfully placed
|
||||
if (placedWords > 0)
|
||||
{
|
||||
startGame(wordSalad, SALAD_SIZE, words, wordCount, 800);
|
||||
startGame(wordSalad, SALAD_SIZE, words, placedWords, WINDOW_WIDTH);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user