/** * @file common.h * @author OSUE Team * @date 2017-10-06 * * @brief Common definitions for OSUE exercise 1B `Battleship'. */ // guard block: #ifndef COMMON_H #define COMMON_H // default hostname and port: #define DEFAULT_HOST "localhost" #define DEFAULT_PORT "1280" // Length of each side of the map: #define MAP_SIZE 10 // Minimum and maximum length of the ships: #define MIN_SHIP_LEN 2 #define MAX_SHIP_LEN 4 // Number of ships of each length: #define SHIP_CNT_LEN2 2 // 2 ships of length 2 #define SHIP_CNT_LEN3 3 // 3 ships of length 3 #define SHIP_CNT_LEN4 1 // 1 ship of length 4 // Maximum number of rounds after which the client loses the game: #define MAX_ROUNDS 80 #define MIN(x,y) (x < y) ? x : y #define MAX(x,y) (x > y) ? x : y #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif // COMMON_H