Files are now in a src directory and I'm using a src/meson.build and tests/meson.build to specify what to build.

This commit is contained in:
Zed A. Shaw 2026-02-27 10:49:19 -05:00
parent 4778677647
commit 1d4ae911b9
108 changed files with 94 additions and 83 deletions

16
src/combat.cpp Normal file
View file

@ -0,0 +1,16 @@
#include "components.hpp"
#include "rand.hpp"
namespace components {
int Combat::attack(Combat &target) {
int attack = Random::uniform<int>(0,1);
int my_dmg = 0;
if(attack) {
my_dmg = Random::uniform<int>(1, damage);
target.hp -= my_dmg;
}
return my_dmg;
}
}