generated from freudenreichan/info2Praktikum-Wortsalat
Compare commits
2
Commits
9a1f2d1d8a
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c410d9287e | ||
|
|
4d09d52506 |
No files matched your search
+1
-5
@@ -8,10 +8,6 @@
|
||||
#define EMPTY_CHAR 0
|
||||
|
||||
|
||||
//TODO: Spiellogik implementieren:
|
||||
/* * Wörter aus der Wortliste zufällig horizontal oder vertikal platzieren
|
||||
* restliche Felder mit zufälligen Buchstaben füllen */
|
||||
|
||||
// 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, const char words[][MAX_WORD_LEN], unsigned int wordCount)
|
||||
{
|
||||
@@ -31,7 +27,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
|
||||
int placed = 0;
|
||||
|
||||
if(wordLen > searchFieldLen){
|
||||
printf("Word %s is too long!\n", words[w]);
|
||||
//printf("Word %s is too long!\n", words[w]);
|
||||
break;
|
||||
}
|
||||
//Try multiple times to find a valid position
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
#include "graphicalGame.h"
|
||||
|
||||
#define MAX_NUMBER_OF_WORDS 100
|
||||
#define SALAD_SIZE 10
|
||||
#define SALAD_SIZE 20
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
||||
Reference in new issue
Block a user