45 lines
699 B
C++
45 lines
699 B
C++
#ifndef MYSOK_H
|
|
#define MYSOK_H
|
|
|
|
#include <string>
|
|
|
|
#define NBL 20
|
|
#define NBC 20
|
|
#define MAX_CRATES 20
|
|
|
|
#define MOVE_U 0
|
|
#define MOVE_D 1
|
|
#define MOVE_L 2
|
|
#define MOVE_R 3
|
|
#define MOVE_W 4
|
|
|
|
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'
|
|
};
|
|
|
|
// const std::string move_str[] = {"Up", "Down", "Left", "Right", "Wait"};
|
|
|
|
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
|