1 2 3 4 5 6 7 8 9
#pragma once #include <random> std::mt19937 gen(std::random_device{}()); int roll(int d) { std::uniform_int_distribution<> dist(1, d); return dist(gen); }