Skip to content
Snippets Groups Projects
Commit 4aa40ba8 authored by Arnaud Albiez's avatar Arnaud Albiez
Browse files

Correction et reagencement

parent a93b0c68
Branches
No related merge requests found
...@@ -27,11 +27,14 @@ main.o : main.c grid.h ...@@ -27,11 +27,14 @@ main.o : main.c grid.h
grid.o : grid.c grid.h grid.o : grid.c grid.h
gcc -c $(CFLAGS) grid.c gcc -c $(CFLAGS) grid.c
sokoban : main.o grid.o player.o : player.c player.h
gcc -o sokoban main.o grid.o gcc -c $(CFLAGS) player.c
test.o : test.c grid.h sokoban : main.o grid.o player.o
gcc -o sokoban main.o grid.o player.o
test.o : test.c grid.h player.h
gcc -c test.c gcc -c test.c
unittest : test.o grid.o unittest : test.o grid.o player.o
gcc -o unittest test.o grid.o gcc -o unittest test.o grid.o player.o
#include "player.h"
#ifndef GRID_HEADER #ifndef GRID_HEADER
#define GRID_HEADER #define GRID_HEADER
#include "player.h"
enum CaseType{ enum CaseType{
WALL = '#', WALL = '#',
BOX = '$', BOX = '$',
......
#ifndef __PLAYER_H
#define __PLAYER_H
struct Grid;
enum Direction{ enum Direction{
TOP = 'z', TOP = 'z',
...@@ -12,3 +16,4 @@ struct Player{ ...@@ -12,3 +16,4 @@ struct Player{
void move_player(struct Grid* grid, enum Direction direction); void move_player(struct Grid* grid, enum Direction direction);
#endif
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment