summaryrefslogtreecommitdiff
path: root/height-map-display/src/map/square.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--height-map-display/src/map/square.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/height-map-display/src/map/square.h b/height-map-display/src/map/square.h
new file mode 100644
index 0000000..d40e7d1
--- /dev/null
+++ b/height-map-display/src/map/square.h
@@ -0,0 +1,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
+