Skip to content

Instantly share code, notes, and snippets.

@MX-2000
Created March 26, 2025 11:04
Show Gist options
  • Save MX-2000/6746f34ef12c93c088a72ffa00c613d3 to your computer and use it in GitHub Desktop.
Save MX-2000/6746f34ef12c93c088a72ffa00c613d3 to your computer and use it in GitHub Desktop.
#define EMPTY 0
#define NORMAL_FOOD 1
#define INTERACTIVE_FOOD 2
// Anything above Wall should be obstacles
#define WALL 3
#define AGENTS 4
#define LOG_BUFFER_SIZE 8192
#define SET_BIT(arr, i) (arr[(i) / 8] |= (1 << ((i) % 8)))
#define CLEAR_BIT(arr, i) (arr[(i) / 8] &= ~(1 << ((i) % 8)))
#define CHECK_BIT(arr, i) (arr[(i) / 8] & (1 << ((i) % 8)))
#define min(a, b) ((a) < (b) ? (a) : (b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment