fixed spielfeldgröße und groß/kleinschreibung
This commit is contained in:
1 parent
61221a5b8d
commit
a48f1b961e
5 files changed
+9
-8
No files matched your search
+3
-2
@@ -1,4 +1,5 @@
|
||||
#include "game.h"
|
||||
#include "input.h"
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -40,11 +41,11 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
|
||||
|
||||
int dir = rand() % 2;
|
||||
// cant place vertically
|
||||
if(dir == 1 && MAX_SEARCH_FIELD_LEN < (y + (int) len -1)){
|
||||
if(dir == 1 && MAX_SEARCH_FIELD_LEN < (y + (int) len)){
|
||||
dir = 0;
|
||||
}
|
||||
//cant place horizontally
|
||||
if((x + (int) len -1) > MAX_SEARCH_FIELD_LEN){
|
||||
if((x + (int) len) > MAX_SEARCH_FIELD_LEN){
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user