Skip to content
Snippets Groups Projects
Commit fbe98337 authored by Jake Feddersen's avatar Jake Feddersen
Browse files

Move position to the generic util.h file, since several other files reference it circularly

parent 49d2a662
No related branches found
No related tags found
No related merge requests found
......@@ -24,4 +24,6 @@
overflow
Print the distance maps and unreachable areas as they are displayed
in the sample output file
2/23: Split up codebase into several seperate files to modularize the code
Update makefile based on Dr. Sheaffer's make file to more generically
compile the code
#ifndef CHARACTER_H
#define CHARACTER_H
typedef struct {
uint8_t x;
uint8_t y;
} position_t;
#include "util.h"
typedef struct player_character {
// No special data for PC right now
......
......@@ -4,6 +4,7 @@
#include <stdint.h>
#include "character.h"
#include "util.h"
#define MAP_WIDTH 80
#define MAP_HEIGHT 21
......
#ifndef UTIL_H
#define UTIL_H
#include <stdint.h>
/**
* Generate a random number between min and max, inclusive
**/
......@@ -25,6 +27,11 @@ typedef struct args {
int nummon;
} args_t;
typedef struct {
uint8_t x;
uint8_t y;
} position_t;
/**
* Parses command line arguments
* Provides default values for arguments that do not exist
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment