generated from freudenreichan/info2Praktikum-Wortsalat
Compare commits
No commits in common. "branch1_Jonas" and "main" have entirely different histories.
branch1_Jo
...
main
@ -7,13 +7,6 @@
|
|||||||
#define MAX_NUMBER_OF_WORDS 100
|
#define MAX_NUMBER_OF_WORDS 100
|
||||||
#define SALAD_SIZE 20
|
#define SALAD_SIZE 20
|
||||||
|
|
||||||
// selbstgeschriebene Definitionen:
|
|
||||||
// annahmen ist das windowWidth in pixeln gegeben
|
|
||||||
// werden muss, da auch andere funktionen wie
|
|
||||||
// createCharSquarePanel in Pixeln arbeiten
|
|
||||||
#define WINDOW_WIDTH 540
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int exitCode = EXIT_SUCCESS;
|
int exitCode = EXIT_SUCCESS;
|
||||||
@ -43,24 +36,10 @@ int main(int argc, char *argv[])
|
|||||||
// Create the word salad by placing words into grid
|
// Create the word salad by placing words into grid
|
||||||
placedWords = createWordSalad(wordSalad, SALAD_SIZE, words, wordCount);
|
placedWords = createWordSalad(wordSalad, SALAD_SIZE, words, wordCount);
|
||||||
|
|
||||||
// DONE:
|
// TODO:
|
||||||
// Check if all words were successfully placed
|
// Check if all words were successfully placed
|
||||||
// Start the game if successful
|
// Start the game if successful
|
||||||
// error message if some words couldn't be placed
|
// error message if some words couldn't be placed
|
||||||
if (placedWords != wordCount)
|
|
||||||
{
|
|
||||||
// selbe error message wird auch von wordsalad_inital.exe ausgegeben,
|
|
||||||
// wenn diese einen fehler produziert
|
|
||||||
printf("Could only place %d of %d words.", placedWords, wordCount);
|
|
||||||
printf(" Possible solution is to choose a larger search field ...\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// annahme: windowWidth wird in Pixeln gesucht,
|
|
||||||
// da auch andere funktionen, wie createCharSquarePanel
|
|
||||||
// in Pixeln arbeiten
|
|
||||||
startGame(wordSalad, MAX_SEARCH_FIELD_LEN, words, placedWords, WINDOW_WIDTH);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -13,13 +13,6 @@ wordsalad_initial:
|
|||||||
$(CC) -o wordsalad_initial $(BINARIES)/libwordsalad_complete.a $(BINARIES)/libraylib.a $(LDFLAGS)
|
$(CC) -o wordsalad_initial $(BINARIES)/libwordsalad_complete.a $(BINARIES)/libraylib.a $(LDFLAGS)
|
||||||
|
|
||||||
|
|
||||||
# --------------------------
|
|
||||||
# eigenes Spiel bauen
|
|
||||||
# --------------------------
|
|
||||||
wordsalad_myversion:
|
|
||||||
$(CC) -o $(CFLAGS) main.c $(BINARIES)/libwordsalad.a
|
|
||||||
|
|
||||||
|
|
||||||
# --------------------------
|
# --------------------------
|
||||||
# Normales Spiel bauen
|
# Normales Spiel bauen
|
||||||
# --------------------------
|
# --------------------------
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user