malikhollins / HungerGamesSimulator

A hunger games simulator built using the .net blazor framework
0 stars 1 forks source link

Reading on coding standards [Should Read!] #34

Open malikhollins opened 11 months ago

malikhollins commented 11 months ago

I am going to post some interesting blogs about things we could've done differently with some notes.

malikhollins commented 11 months ago

https://ericlippert.com/2015/04/27/wizards-and-warriors-part-one/

interesting read. For our simulation, we'd have an actor who has states. Each state has rules and effects. Would be an interesting re-factor for our system. A really good read. Think about business logic and not C# types!

malikhollins commented 11 months ago

https://en.wikipedia.org/wiki/Single-responsibility_principle

Should we remove business logic from actors and create an Interaction class? This is doing something similar to the page above.

Going beyond, maybe we just want Tributes to be tributes not actors. We don't need the IActor interface which locks everything together, for little reason.

The initial idea was that IActors can be anything, but that's so we can group actors unnecessarily. We should treat different objects as different objects. Let's try to move away from Type based programming in the future.