forked from zwickethomas/Photonics-Helfer
		
	windows fix
This commit is contained in:
		
							parent
							
								
									48bee0edc1
								
							
						
					
					
						commit
						88e5d40db3
					
				@ -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:{
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										11
									
								
								src/pipes2.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								src/pipes2.c
									
									
									
									
									
								
							@ -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++){
 | 
			
		||||
 | 
			
		||||
@ -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"
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user