vzbavene
This commit is contained in:
		
							parent
							
								
									240983bf56
								
							
						
					
					
						commit
						0c2f295a1e
					
				
							
								
								
									
										21
									
								
								du8/game.h
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								du8/game.h
									
									
									
									
									
								
							| @ -3,26 +3,25 @@ | ||||
| 
 | ||||
| #define BOARD_SIZE 3 | ||||
| 
 | ||||
| // Štruktúra pre stav hry
 | ||||
| typedef struct { | ||||
|     char board[BOARD_SIZE][BOARD_SIZE]; // Hracia plocha 3x3
 | ||||
|     int cursor_x;       // Pozícia kurzora (X)
 | ||||
|     int cursor_y;       // Pozícia kurzora (Y)
 | ||||
|     int current_player; // 0 = X, 1 = O
 | ||||
|     int game_over;      // 0 = pokračuje, 1 = koniec
 | ||||
|     char board[BOARD_SIZE][BOARD_SIZE]; | ||||
|     int cursor_x;        | ||||
|     int cursor_y;        | ||||
|     int current_player;  | ||||
|     int game_over;      | ||||
| } GameState; | ||||
| 
 | ||||
| // Inicializácia hry
 | ||||
| 
 | ||||
| void init_game(GameState *state); | ||||
| 
 | ||||
| // Spracovanie klávesy
 | ||||
| 
 | ||||
| void handle_key(GameState *state, int key); | ||||
| 
 | ||||
| // Vykreslenie stavu hry
 | ||||
| 
 | ||||
| void draw_game(const GameState *state); | ||||
| 
 | ||||
| // Kontrola výhercu
 | ||||
| 
 | ||||
| int check_winner(const GameState *state); | ||||
| 
 | ||||
| #endif // GAME_H
 | ||||
| #endif | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user