Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int isBlocked(Game *game, int x, int y)
- {
- if (game->map.tile[y][x] == TILE_OPEN) {
- return 0;
- }
- if (game->map.tile[y][x] == TILE_ROOM) {
- return 0;
- }
- if (game->map.tile[y][x] == TILE_WALL) {
- return 1;
- }
- for (unsigned int i = 0; i < game->numMonsters; i++) {
- if (game->monsters[i].pos.y == y && game->monsters[i].pos.x == x) {
- return 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement