windows fix

pipes2game
MuedeHydra 2024-12-13 18:26:13 +01:00
parent 48bee0edc1
commit 88e5d40db3
4 changed files with 15 additions and 14 deletions

View File

@ -31,10 +31,10 @@ Datum: 04.12.2024
#endif
// import sub programme
// #include "pipes_test.h"
#include "Ramen_Physik.h"
#include "test_prog.h"
#include "pipes_test.h"
#include "pipes2.h"
@ -357,7 +357,8 @@ int main(int argc, char **argv){
case 'q': run = false; break;
case '?': print_help(); break;
case 'p': pipes_2(width, height); break;
case 'p': pipes(width, height); break;
case 'P': pipes_2(width, height); break;
// windows
case -32:{

View File

@ -52,17 +52,6 @@ void print_at(int x, int y, char c[4])
printf("\033[%d;%dH%s", y, x, c);
}
void print_grid(char **grid){
for (int i = 0; i < GRID_GROESSE_Y; i++) {
for (int j = 0; j < GRID_GROESSE_X; j++) {
printf("%i", grid[i][j]);
// printf(" ");
}
printf("\n");
}
}
char print_pipe(int *x, int *y, int x_max, int y_max, int length, char direction, char direction_old){
bool start = true;
for(int i = 0; i < length; i++){

View File

@ -21,7 +21,8 @@
//#define GRID_GROESSE_Y 60
#define MIN_LAENGE_PIPE 6
#define MAX_LAENGE_PIPE 6
#define SLEEP_TIMER 5000 // in nano seconds
#define SLEEP_TIMER 0 // in nano seconds
// #define SLEEP_TIMER 5000 // in nano seconds
#define COLOR_CHANGING_PROBABILITY 5 // format: "(1 : your_number)", for every direction change
#define RESET_COLOR "\033[0m"

View File

@ -1 +1,11 @@
#ifndef pipes_test_H_
#define pipes_test_H_
// #ifndef _FILE_NAME_H_
// #define _FILE_NAME_H_
// extern int pipes(int width, int height);
// int pipes_2(int width, int height);
int pipes(int GRIG_GROESSE_X, int GRID_GROESSE_Y);
#endif