FlowArithmeticCalculator 1.0.0
Flow Arithmetic Calculator
Loading...
Searching...
No Matches
constants.h
Go to the documentation of this file.
1#ifndef BUSINESS_LOGIC_CONSTANTS_H
2#define BUSINESS_LOGIC_CONSTANTS_H
3
4#include <chrono>
5
10 // Port-related constants; note: most of these constants could have been moved to the GUI
11 // module, however most of them are dependencies of TOTAL_PORT_HITBOX_RADIUS, which is needed in
12 // the business_logic module; therefore, for coherence, all of them were decided upon to stay in
13 // this file
14 constexpr int PORT_CIRCLE_RADIUS = 10;
15 static_assert(PORT_CIRCLE_RADIUS > 0, "PORT_CIRCLE_RADIUS must be greater than 0");
16 static_assert(PORT_CIRCLE_RADIUS % 2 == 0, "PORT_CIRCLE_RADIUS must be divisible by 2");
17
19
20 constexpr int PORT_CIRCLE_OUTLINE_WIDTH = 6;
21 static_assert(PORT_CIRCLE_OUTLINE_WIDTH > 0,
22 "PORT_CIRCLE_OUTLINE_WIDTH must be greater than 0");
24 "PORT_CIRCLE_OUTLINE_WIDTH must be less than PORT_CIRCLE_RADIUS");
25
29
32
33 // Block-related constants
34 constexpr int BLOCK_OUTLINE_WIDTH = 4;
35 static_assert(BLOCK_OUTLINE_WIDTH > 0, "BLOCK_OUTLINE_WIDTH must be greater than 0");
36 static_assert(BLOCK_OUTLINE_WIDTH % 2 == 0, "BLOCK_OUTLINE_WIDTH must be divisible by 2");
37
38 constexpr int MAX_INPUT_CHOICES_PER_ROW = 3;
44 constexpr std::chrono::milliseconds DOUBLE_CLICK_TIME_THRESHOLD_MS(200);
45
46} // namespace business_logic::constants
47
48#endif // BUSINESS_LOGIC_CONSTANTS_H
General logic constants.
Definition constants.h:9
constexpr int TOTAL_PORT_HITBOX_RADIUS
Definition constants.h:26
constexpr std::chrono::milliseconds DOUBLE_CLICK_TIME_THRESHOLD_MS(200)
constexpr int PORT_CIRCLE_MARGIN_HALF
Definition constants.h:31
constexpr int PORT_CIRCLE_OUTLINE_WIDTH
Definition constants.h:20
constexpr int PORT_CIRCLE_RADIUS_HALF
Definition constants.h:18
constexpr int PORT_CIRCLE_MARGIN
Definition constants.h:30
constexpr int TOTAL_PORT_RADIUS_HALF
Definition constants.h:28
constexpr int MAX_INPUT_CHOICES_PER_ROW
Definition constants.h:38
constexpr int TOTAL_PORT_RADIUS
Definition constants.h:27
constexpr int BLOCK_OUTLINE_WIDTH
Definition constants.h:34
constexpr int PORT_CIRCLE_RADIUS
Definition constants.h:14
constexpr int DEFAULT_VALUE_DISPLAY_PRECISION
Definition constants.h:39