This repository has been archived on 2023-04-18. You can view files and clone it, but cannot push or open issues or pull requests.
iaj/TP1/C-Cpp/includes/mysok.h

42 lines
676 B
C
Raw Normal View History

2023-01-27 17:24:27 +01:00
#ifndef MYSOK_H
#define MYSOK_H
2023-01-27 17:49:36 +01:00
2023-01-27 17:24:27 +01:00
#include <string>
#define NBL 20
#define NBC 20
#define MAX_CRATES 20
2023-02-17 16:29:44 +01:00
enum movement { MOVE_U = 0, MOVE_D, MOVE_L, MOVE_R, MOVE_W };
2023-01-27 17:24:27 +01:00
2023-01-27 17:37:08 +01:00
enum board_str {
OUT = ' ',
FREE = '_',
TARGET = '.',
WALL = '#',
CRATE_ON_FREE = '$',
CRATE_ON_TARGET = '*',
MAN1_ON_FREE = '1',
MAN1_ON_TARGET = 'u',
MAN2_ON_FREE = '2',
MAN2_ON_TARGET = 'd',
END_OF_LINE = 'a'
};
2023-01-27 17:24:27 +01:00
2023-01-27 17:49:36 +01:00
// const std::string move_str[] = {"Up", "Down", "Left", "Right", "Wait"};
2023-01-27 17:24:27 +01:00
struct sok_board_t {
int board[NBL][NBC];
int board_nbl;
int man1_x;
int man1_y;
int man2_x;
int man2_y;
sok_board_t();
void print_board();
void load(char *_file);
};
#endif