Consolidation of knowledge from the book up to chapter 12

Hello, I am a self-taught programmer and I would like to deepen my knowledge. I reached chapter 12 and decided it was a good time to try writing something myself.
Maybe someone would be willing to take a look at my "game" and suggest some changes or adding new functionalities. In particular, I am interested in using Generics, Traits and lifetime, but I have no idea how I could add it to what I have now.

here is my repo:
https://github.com/drozdzu88/game/tree/develop

The purpose of mod new is unclear. Why isn't it inside character.rs directly?

It would be pointless to use these language features in a problem like yours. It would do nothing but add complexity to the code. I'd suggest you take inspiration from the exercises of rustlings, excercism, Generics - Rust By Practice

1 Like

@jendrikw Thank you for good advice. I think you're right there are many exercises in the internet. It's no use to waste my time to write useless code and figure out how to implement some complex features.