From 7b5d1e3d46e94262a9c0fd3a01ab4685aea9d12d Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 1 May 2021 15:10:54 -0400 Subject: Added bash completion, amongst others --- src/dice.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/dice.cc (limited to 'src/dice.cc') diff --git a/src/dice.cc b/src/dice.cc new file mode 100644 index 0000000..dd7db55 --- /dev/null +++ b/src/dice.cc @@ -0,0 +1,11 @@ +#include "dice.h" +#include + +namespace dice { + std::mt19937 gen(std::random_device{}()); + + int roll(int d) { + std::uniform_int_distribution<> dist(1, d); + return dist(gen); + } +} -- cgit v1.2.3