Welcome to the forum, @z1fire
You’re in the right place! I think there’s many people who would be more than happy to help you.
Can you give us some more info on the game you are trying to design?
Does the player pick one of the three options, and then the computer randomly selects another?
What kind of interface would you like? Does the console suffice?
Do you have any code that we can look at so far?
Here was a humorous post recently made by @jw3126 to randomly select an enum value and print it to the console (it was funny because that’s how the forum “solution” was resolved).
From: Const slice can be mutated? - #4 by jw3126
const std = @import("std");
const rand = std.rand;
pub fn main() void {
var rng = rand.DefaultPrng.init(42);
const Answer = enum {
squeek502,
IntegratedQuantum,
};
const answer = (rng.random().enumValue(Answer));
std.debug.print("Accept: {any}\n", .{answer});
}
That may give you an idea of how to start. You’ll probably want to use some kind of a switch statement to detect if the player choice defeats the computer’s choice. That said, we can talk more about that when you give us some more info to work from