aboutsummaryrefslogtreecommitdiffstats
path: root/src/entity.cpp
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-01-11 17:06:20 +0100
committersalaaad2 <arthurdurant263@gmail.com>2022-01-11 17:06:20 +0100
commit59d902df725c2d6a1b7cad016326ca51316b937f (patch)
treeeae43bbc5d3faf3799fe242f1648115e17a9df67 /src/entity.cpp
parentclang-format chromium test (diff)
downloadthreshold-59d902df725c2d6a1b7cad016326ca51316b937f.tar.gz
threshold-59d902df725c2d6a1b7cad016326ca51316b937f.tar.bz2
threshold-59d902df725c2d6a1b7cad016326ca51316b937f.tar.xz
threshold-59d902df725c2d6a1b7cad016326ca51316b937f.tar.zst
threshold-59d902df725c2d6a1b7cad016326ca51316b937f.zip
clang format blind letsgo !
Diffstat (limited to 'src/entity.cpp')
-rw-r--r--src/entity.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/entity.cpp b/src/entity.cpp
index eda350f..8427479 100644
--- a/src/entity.cpp
+++ b/src/entity.cpp
@@ -8,35 +8,31 @@
#include "entity.hpp"
-Entity::Entity()
-: Entity(1) {}
+Entity::Entity() : Entity(1) {}
-Entity::Entity(int const & h) : hp(h)
-{
+Entity::Entity(int const& h) : hp(h) {
auto dir = GetRandomValue(0, 3);
- switch (dir)
- {
- case (0):
- {
- posX = GetRandomValue((SCREENWIDTH / 2) - 30, (SCREENWIDTH / 2) + 30);
+ switch (dir) {
+ case (0): {
+ posX =
+ GetRandomValue((SCREENWIDTH / 2) - 30, (SCREENWIDTH / 2) + 30);
posY = GetRandomValue(0, 40);
break;
}
- case (1):
- {
+ case (1): {
posX = GetRandomValue(SCREENWIDTH - 20, SCREENWIDTH + 20);
- posY = GetRandomValue((SCREENHEIGHT / 2) - 30, (SCREENHEIGHT / 2) + 30);
+ posY = GetRandomValue((SCREENHEIGHT / 2) - 30,
+ (SCREENHEIGHT / 2) + 30);
break;
}
- case (2):
- {
- posX = GetRandomValue((SCREENWIDTH / 2) - 30, (SCREENWIDTH / 2) + 30);
+ case (2): {
+ posX =
+ GetRandomValue((SCREENWIDTH / 2) - 30, (SCREENWIDTH / 2) + 30);
posY = GetRandomValue(SCREENHEIGHT - 20, SCREENHEIGHT + 20);
break;
}
- case (3):
- {
+ case (3): {
posX = GetRandomValue(SCREENWIDTH - 20, SCREENWIDTH + 20);
posY = GetRandomValue((SCREENHEIGHT / 2), (SCREENHEIGHT / 2) + 10);
break;