2spooky2play
Branching paths for a text based adventure game (language agnostic)
How would i create a system of branching paths for a text based adventure game? i dont want it to devolve into a ton of if-statements because i have done that before and it is a mess to keep track of and maintain
16 replies
✅ Pass in arguments to a generic constructor
i want to be able to create new instances of
T
in the method, but i get the error 'T': cannot provide arguments when creating an instance of a variable type
. how can i make this work? one precondition is that all child of Component
will only have one argument in their constructor13 replies