#ifndef POSITION_STACK_H #define POSITION_STACK_H #define STACK_ERR_OVERFLOW 0xFFF01 #define STACK_ERR_UNDERFLOW 0xFFF02 typedef struct Position { int x; int y; } Position; typedef struct PositionStack { int capacity; int top; Position *items; } PositionStack; PositionStack *pos_stack_create(int capacity); void pos_stack_destroy(PositionStack *pos_stack); void pos_stack_push(PositionStack *pos_stack, Position pos); Position pos_stack_peek(PositionStack *pos_stack); Position pos_stack_pop(PositionStack *pos_stack); #endif