generated from freudenreichan/info2Praktikum-Wortsalat
newest version
This commit is contained in:
commit
5be8b48bd2
4 files changed
+5
-5
No files matched your search
+2
-3
@@ -27,9 +27,8 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
|
||||
maxLength = findmaxLength(words, wordCount);
|
||||
// Size of Field!
|
||||
if (searchFieldLen < maxLength)
|
||||
sizeOfField = maxLength;
|
||||
else
|
||||
sizeOfField = searchFieldLen;
|
||||
return returnValue;
|
||||
sizeOfField = searchFieldLen;
|
||||
initializeField(sizeOfField, salad);
|
||||
// for all words put them in
|
||||
for (unsigned int i = 0; i < wordCount; i++){
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
// Read words from file and store in 'words' array
|
||||
static int createSingleWords(char text[MAX_LINE_LEN], char words[][MAX_WORD_LEN], unsigned int maxWordCount);
|
||||
|
||||
int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
|
||||
unsigned int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
|
||||
{
|
||||
int wordCount = 0;
|
||||
char lineRead[MAX_LINE_LEN];
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@
|
||||
#define MAX_WORD_LEN 100
|
||||
#define MAX_LINE_LEN 1024
|
||||
|
||||
int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount);
|
||||
unsigned int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount);
|
||||
|
||||
#endif
|
||||
@@ -47,6 +47,7 @@ int main(int argc, char *argv[])
|
||||
// Start the game if successful
|
||||
// error message if some words couldn't be placed
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user