blob: d40e7d1563bff331242d82873a184b1ad5ce17d4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#ifndef SQUARE_H
#define SQUARE_H
#include "node.h" // Include node.h to use Node type.
// Define the Terrain_Type enum
typedef enum {
TERRAIN_FAIRWAY,
TERRAIN_ROUGH,
TERRAIN_GREEN,
} Terrain_Type;
// Define the Square struct
typedef struct Square {
Terrain_Type terrain;
Node *nodes[4]; // Array of Node pointers
} Square;
// Function prototypes
Square* init_square(Node *nodes[4], Terrain_Type terrain);
void change_square_height(Square* square, float diff);
#endif
|