6 Code Smells REFACTORED to Patterns!

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

ความคิดเห็น • 133

  • @git-amend
    @git-amend  6 หลายเดือนก่อน +16

    Happy Sunday! Would you be interested in having a system in your project reviewed and refactored on the channel? Make sure to join the Discord - in the future we may refactor more advanced examples than this simple system!
    Also, I've added new extension methods Vector2 and Vector3 RandomPointInAnnulus to the Utility library that ensure uniform distribution - see description for explanation!

  • @MagicPigGames
    @MagicPigGames 6 หลายเดือนก่อน +36

    I'm betting I'm not the only one who thought about the first half, "Oh yeah, that's easy, makes sense, that's what I would have done" and the second half "Wait, pause, what's that now??" :D Great stuff.

    • @techdave99
      @techdave99 6 หลายเดือนก่อน +2

      Great to see you watch these videos. It would be great if @git-amend would be a guest on the gamedev show. I don't know if Jason watches these videos.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      Thanks for the comment! Glad you enjoyed the vid!

  • @sima19995
    @sima19995 6 หลายเดือนก่อน +20

    Ever since I started watching your videos my programming skills have literally skyrocketed. Your videos are a godsend. Unfortunately TH-cam is full of tutorials teaching you very very wrong concepts which a beginner will gladly consume. I did at least. Realizing how misleading they were took a lot of time. I guess that's part of the learning process...
    One thing I noticed: When referencing the prefab in the EnemyConfig class you could actually reference the prefab as type Enemy. That way there's no need to get the component when initializing. It's less prone to human error when dragging the prefab in the inspector too.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +4

      Thanks for the comment! Great tip too, I totally missed that optimization while refactoring, good catch!

    • @ryaz4704
      @ryaz4704 6 หลายเดือนก่อน +1

      ​@@git-amenda part 2 video incoming?

  • @thehuggz-i9k
    @thehuggz-i9k 6 หลายเดือนก่อน +8

    Your videos are a step above the standard Unity tutorials. This series is great! What better way to show how to apply what you've already been talking about than showing it in the bad code we're already writing :D Thanks!

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      Glad you like them!

    • @TuberTugger
      @TuberTugger 6 หลายเดือนก่อน +1

      I agree. It's like an actual dev vs content creators. Just condensed, actual knowledge flowing straight into my brain.

  • @NinjaPodslash
    @NinjaPodslash 25 วันที่ผ่านมา

    I AM SO HAPPY I STUMBLED UPON YOUR CHANNEL! I recently made a game during a game project for my school that took 3 weeks, and i was pretty happy about with how it went. When I then came back to the project, I realized that everything was a complete mess. Every component was soo tightly coupled to eachother that every change i made meant i needed to change 10 other scripts. We slightly touched on design patterns in school but not enough to really make a difference in how i code. I did some research on different patterns and after stumbling upon your channel and watching almost all of your videos i realized i would need to break my baby (the game) and put it back together for the better.
    For the longest time i've been looking for a channel that teaches good coding practices and standards but all i've ever found are videos that are either too beginner friendly or don't touch on certain topics because they're "too complicated". YOU ARE DOING GODS WORK HERE! THANK YOU FOR THESE AMAZING VIDEOS!

    • @git-amend
      @git-amend  25 วันที่ผ่านมา +1

      I'm very happy to hear that. Actually the video I'm working on right now for Sunday is very similar to this one, it's all about refactoring, so stay tuned!

  • @MarushiaDark316
    @MarushiaDark316 6 หลายเดือนก่อน +9

    Wow! This is amazing. Exactly what I've been hoping you'd make - beginner's guide to practical applications of patterns. I look forward to more of these.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Glad it was helpful!

  • @franciscooteiza
    @franciscooteiza 6 หลายเดือนก่อน +8

    Hey Adam,
    Thanks to your videos, I'm getting a better handle on all these programming patterns every day. I really appreciate you teaching us how to be better programmers.
    Cheers,

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Great to hear! Thanks for the comment!

  • @TuberTugger
    @TuberTugger 6 หลายเดือนก่อน +1

    This is EXACTLY the type of coding I like to watch.
    Refactoring is an art form. Knowing how or when to use a tool is arguably more important than knowing the tool itself.
    Very impressed.
    I can't wait for the next one of these!

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Great, glad to hear that! Thanks for the comment!

  • @Fitz0fury
    @Fitz0fury 6 หลายเดือนก่อน +2

    This as a series is going to be awesome. Excited to see your process for reviewing and improving others code. Glad to see you're starting these.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thanks! Maybe we can do one of these every couple months, I'll announce a bit before hand and take some submissions on Discord I think.

  • @MaximumAxiom
    @MaximumAxiom 6 หลายเดือนก่อน +1

    I like this more concrete explanation for patterns, its usually hard to see where to utilize them when its more abstract

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      Thanks! Will probably do a few more like this in the future

  • @MarkRiverbank
    @MarkRiverbank 6 หลายเดือนก่อน

    Thank you so much for your content. I've been doing this a long time--I'm usually the old guy on the team shaking his fist at the clouds and saying, "why don't they teach GoF patterns to these kids?"--it's rare to find content that actually pushes me and exposes me to new things.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thanks for that! I know exactly what you mean! Glad to have you here.

  • @owencoopersfx
    @owencoopersfx 6 หลายเดือนก่อน

    This is a great format to show where it actually makes practical sense to implement the design patterns. I vote for more :)

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Glad you like it!

  • @cloudPvP
    @cloudPvP 6 หลายเดือนก่อน

    I loved this format, and it really show us a more hands on approach on how to refactor using patterns.
    If you want do more videos of this style please :D

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thanks will do!

  • @techdave99
    @techdave99 6 หลายเดือนก่อน

    Worth watching multiple times. The flyweight pattern used here helped me understand where it can be used.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thanks! Maybe next time we'll tackle something a bit more complex as well.

  • @jeffreyhersh908
    @jeffreyhersh908 6 หลายเดือนก่อน

    Thank you for your videos. There is a dearth of intermediate to advanced tutorials for Unity on TH-cam. Many of the examples you have made I have adapted into my own projects and it has made me a much better coder.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      You're very welcome!

  • @4rcant
    @4rcant 6 หลายเดือนก่อน

    Most valuable channel on youtube for me right now

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thank you so much!

  • @notkieran2259
    @notkieran2259 6 หลายเดือนก่อน

    10/10 you always knock these videos out of the park! good practices for audio sounds like a fun topic to explore!

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thank you!

  • @TheArghnono
    @TheArghnono 6 หลายเดือนก่อน

    You really help me push my Unity programming to the next level.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      Great, glad to hear that!

  • @darrencook7168
    @darrencook7168 6 หลายเดือนก่อน

    Love this one! Thank you so much! You asked for video ideas so, if you haven't already done this, I would like to see a video or even a series on creating a template project. More specifically, code that you would want pre-existing for any new project so that you could quickly either copy the project or import the package(s), and start building/prototyping.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      I’ve got a video on that topic coming soon!

  • @OskGame
    @OskGame 6 หลายเดือนก่อน

    It's great to learn one more pattern and apply it to simple examples, it helps me understand them and know in what situations to apply it to them. Thank you very much, hopefully there will be a DI + pattern video soon!

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      Glad it was helpful!

  • @successor0
    @successor0 6 หลายเดือนก่อน +1

    This was great! One thing about the command pattern part of the video though. I feel like the jump from the old implementation with the strings and likely ifs to the whole command pattern implementation is too much. Someone who did the string implementation would be overwhelmed with the sudden new rather complex approach, especially given that they were in a level that uses magic strings.
    I'd love the refactors to cover some alternative ways to achieve things before jumping into the related pattern, talking about the problems current implementation has and the solutions new approach will provide. For example, before writing the command patterns implementation on this video, we could switch the magic strings to enums, talking about the problems this approach solves and does not solve, then go about implementing the pattern.
    Also must say I especially loved the factory pattern. I always had difficutly understanding the concept for some reason but this video made it so easy to understand.
    Also as a last nitpick, the new spawning logic with the strategy pattern looks like it can't actually achieve the old behaviour as it required the index of the loop to be used in the positioning logic, which the SetPosition method signature does not currently allow passing. How would one achieve this with the new implementation?
    Thank you :)

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thanks for the comment. In regard to the strategy, that's a good observation. I would probably suggest overloading the method in the strategy to accept optional params, perhaps a count or a ref to the List of enemies that have already been spawned.

  • @TheKr0ckeR
    @TheKr0ckeR 6 หลายเดือนก่อน

    Cool concept! I love flyweight SO approach "until we upgrade values" like you said in health example. That would also required me to refactor it. To be told, I would really love to see a modular upgrade system where we upgrade heroes & save it.
    Thanks for the huge effort on the video.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thanks for the comment. That's an interesting idea for a video, I'll give it some thought!

  • @melipefello
    @melipefello 6 หลายเดือนก่อน

    First video that actually doesn't teach anything new to me, and I'm extremely happy about it! It means I've improved a lot since the first videos :)

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Great to hear!

  • @donmacsween2842
    @donmacsween2842 6 หลายเดือนก่อน

    Thank you, vey useful. Hearing your thought process as you go along is almost unique at this level of Unity tutorial and so integral in understanding why a pattern is useful and how it can fit with other patterns. Hope you do more of these across differing use cases.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Glad it was helpful!

  • @DissolvedMotions
    @DissolvedMotions 6 หลายเดือนก่อน +1

    Absolutely fantastic video! 🤩 More just like this please!

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thank you! Will do!

  • @bromanguy
    @bromanguy 6 หลายเดือนก่อน

    Love the refactor vids! Great insight and examples of how to write clean and expandable code. Thanks as always!

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      My pleasure! Glad you liked it!

  • @정동우-n2x
    @정동우-n2x 6 หลายเดือนก่อน +1

    I like this content
    Because looking at the mechanism of code modification helps beginners like me

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      Great, glad it's helpful! I'm glad this video resonates with people who are at different levels.

  • @shrimpindustries
    @shrimpindustries 6 หลายเดือนก่อน

    Hey, just wanted to say that this is some amazing content right there.
    Been watching your vids for some time and these are still some of the most useful, real-world usecases of programming patterns and more advanced coding techniques. No other creators bother to teach actual programming that is used in gamedev day-jobs, but stick to solo-dev, cutting-corners BS ^^ I certainly appreciated another take on that.
    Keep up the good work, hope your channel keeps on growing!

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thanks for the comment, I appreciate that! Lots more to come!

  • @prometheus1100
    @prometheus1100 6 หลายเดือนก่อน

    Love this! Definitely keep this series going i.m.o. As for a topic suggestion, what about an async/coroutine deep dive?

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      Great suggestion! I'll put that on the list!

  • @agrandcanyonoffucksgiven2776
    @agrandcanyonoffucksgiven2776 6 หลายเดือนก่อน +1

    This was a fantastic video. More refactoring videos with more advanced patterns. Great channel!

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thank you!

  • @k3ln
    @k3ln 6 หลายเดือนก่อน

    this is one of the best videos so far and they're pretty great all of them, so congrats!

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thanks for the kind words!

  • @Broudy001
    @Broudy001 6 หลายเดือนก่อน

    This is fantastic. This is really helpful for me. And as much as I like surprises, an Audio System would be interesting as well

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Great to hear! Something interesting coming next week!

  • @techdave99
    @techdave99 6 หลายเดือนก่อน

    I followed along with the video. Took a while, but in the end it helped me understand the various patterns better. Also, it gave me a start on setting up an enemy spawner. Great stuff🤩😎

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Awesome, glad to hear that!

  • @techdave99
    @techdave99 6 หลายเดือนก่อน

    Yay! Another refactoring video! Hope this video does well.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      You know it!

  • @metsker4876
    @metsker4876 6 หลายเดือนก่อน

    I'd love to learn more about audio systems c:
    Thanks for the video, never thought of using a strategy pattern with scriptable objects, it can be very useful

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Glad it was helpful! Audio will be a topic soon for sure!

  • @radishmonster2760
    @radishmonster2760 6 หลายเดือนก่อน

    Yep, this new format is very useful.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Glad you think so!

  • @fokeyjo
    @fokeyjo 6 หลายเดือนก่อน

    I'm chuffed that I at least managed to do a generator and factory for my spawners in a game jam recently. Though beyond that it got a little scrappy because of the pace! It was a sort-of RTS-cum-tower-defence, and where I got stuck was what you do with multiple things attacking a unit, and also balancing the game where things can attack from different distances

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      Nice... I guess in a Game Jam scenario you do what you gotta do! Sounds fun though.

  • @TheAndyW19
    @TheAndyW19 6 หลายเดือนก่อน

    Amazing as always. Keep it up!

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thank you!

  • @rutchjohnson
    @rutchjohnson 6 หลายเดือนก่อน

    This is amazing! Great idea for a video.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thanks! Glad you enjoyed it!

  • @lordfrazao1026
    @lordfrazao1026 6 หลายเดือนก่อน

    5:56 How do you put those icons in the hierarchy? Is it an asset?
    In addition, great video, high quality content!

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      I've added a link to that Asset into the description, it's a handy tool you can buy for cheap. Also, Warped Imagination has a video on his channel about how to do that yourself.

  • @erlexfortin3413
    @erlexfortin3413 5 หลายเดือนก่อน

    ohhh! I love this content. so juicy. thank you!

    • @git-amend
      @git-amend  5 หลายเดือนก่อน

      You're welcome!

  • @MrOfearos
    @MrOfearos 6 หลายเดือนก่อน

    Amazing! As per topics for future videos- how to handle card based games, both in terms of having many instances of cards with variations and global/local stats, and in terms of handling holders/placements etc. :)

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      Not a bad idea, I'll write that one down!

    • @MrOfearos
      @MrOfearos 6 หลายเดือนก่อน

      @@git-amend legend!

  • @TheKr0ckeR
    @TheKr0ckeR 6 หลายเดือนก่อน

    How would you approach that if you have different enemy prefabs? Would you create new factories like RangedEnemy etc?

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      I wouldn't necessarily make a new factory for every enemy type, but it really depends on the context of your larger game. What I might do instead is add an additional public method for the different type of enemy if it is significantly different than the first one. Another approach is to have factory return you a Builder instead of a completely configured enemy - that way the consumer class can configure the enemy as needed.

  • @nixonscherbarth1974
    @nixonscherbarth1974 6 หลายเดือนก่อน

    Thanks a lot! I really like this format a lot, yes it covers everything you have already covered on this channel, but it is a great refresher and gives us a lot of use cases. It isn’t only about understanding, but also about knowing when to use them. To be honest, If this was my project that you showed there, I would have used flyweight an that is it 🙂‍↔️.
    But yea thank you so much for that! I wish you a wonderful week.
    By the way, there is a big big discussion in my friend group. We are Dev Students studying Game Design, but we found our passion is in programming. So we want to work in the industry after finishing our bachelors. I really am in love with Unity, but I am kind of not too sure how the future will look like. Can you still recommend pushing in unity? :)

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thanks for the comment! In regard to your question, I personally think that Unity has a bright future - but to be honest, I wouldn't worry too much about the game engine itself. Once your skill level as a programmer reaches a certain level, it won't matter what engine you want to use - in a sense you will become language agnostic - the principles of software engineering and things like programming patterns apply to everything.

    • @nixonscherbarth1974
      @nixonscherbarth1974 6 หลายเดือนก่อน

      @@git-amend I value your reply a lot. I owe you a coffee :)!

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      @@nixonscherbarth1974 Haha cheers!

  • @ewwitsantonio
    @ewwitsantonio 6 หลายเดือนก่อน

    Great video! I'm curious where you've learned most of these patterns and how you developed a sense for when to use them or not. Were there any particular learning resources that helped you guide you?

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Mostly it comes from experience in software engineering. One good place I can recommend is refactoring.guru/

    • @ewwitsantonio
      @ewwitsantonio 6 หลายเดือนก่อน

      @@git-amend Thanks for the link! Appreciate it.

  • @aaatthh
    @aaatthh 6 หลายเดือนก่อน

    Another amazing video✅ I could guess some of the ways because of the all amazing videos before, keep up 👍

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Awesome! Thank you!

  • @Wanderlust_Duo
    @Wanderlust_Duo 6 หลายเดือนก่อน

    You are awesome, dude!😎

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      Thanks! Glad you liked the vid!

  • @-Engineering01-
    @-Engineering01- 5 หลายเดือนก่อน

    The first code this dude wrote was more readable to me, I mean for solo devs it's an overkill, wasting of cpu cycles, abstraction nightmare and makes code harder to debug.
    I think it's like using a bazooka to kill an ant for small scale games, but good fit for big sized projects like MMOs. As backend devs we call this as abstraction hell. Big fat IAbstractionSpringBeanFactories are killing our sector that's why we are started to seeing more adaptation for golang like languages to reduce abstraction hell. Thanks ! Btw it'd be great if you could make a rewiev video on Casey Muratori's "Clean code horrible performance" video.

    • @git-amend
      @git-amend  5 หลายเดือนก่อน +1

      I understand your perspective; for solo developers or small-scale projects, abstraction can sometimes feel like overkill. I'll have a look at that video you mentioned.

  • @iliqnikushev3820
    @iliqnikushev3820 6 หลายเดือนก่อน

    What do you think about wrapping the Action instead of the command? That way the builder can still return the concrete class, not the interface
    BattleCommand.Build()
    {
    command.action = CommandActionDecorator.Wrap(command.action); // logging, etc
    return command;
    }
    for more flexibility, CommandActionDecorator has a Dictionary handlers that the user can register additional decoration for specific types. If none present - return the action

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      That might work in some scenarios, and might even be an improvement. But I also envision the BattleCommand becoming more complex, even having multiple Actions such as a pre and post action. I think it would really depend on the requirements of the user, but it's definitely something to consider.

  • @AngersFiction
    @AngersFiction 6 หลายเดือนก่อน

    Great content as usual. I swear, I'm going to use these tips and definitely not leave my code as spaghetti.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Haha awesome, glad to hear that!

  • @inkofthedragon
    @inkofthedragon 6 หลายเดือนก่อน

    How would you go about spawning the prefabs into specific locations in the game world using the strategy pattern you've setup? Would you create a list of transforms in a scriptable object? Or something else? Thanks

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      Yeah, I'd probably make a strategy that exposed a list of transforms that could be configured in the editor.

    • @inkofthedragon
      @inkofthedragon 6 หลายเดือนก่อน

      @@git-amend how would you expand this in order to have a list of transforms for each different enemy type in a clean way? Like a list for the ogres and for the goblins. Thanks again

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      @@inkofthedragon It depends what you are doing I guess. You could just create a different spawner for each type if you need them separated.

    • @inkofthedragon
      @inkofthedragon 6 หลายเดือนก่อน

      @@git-amend hmm I tried playing around using the Placement Strategy Scriptable Object approach. But because it's a SO, I can't drag transforms in the game world into it

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      @@inkofthedragon You'll likely have to save the waypoints as a prefab to use this approach.

  • @RafaelAzriaiev-kv9qm
    @RafaelAzriaiev-kv9qm 6 หลายเดือนก่อน

    Amazing vids man love theam

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thank you! I appreciate that!

  • @damonfedorick
    @damonfedorick 6 หลายเดือนก่อน +1

    Nice.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thank you! Cheers!

  • @tst2648
    @tst2648 6 หลายเดือนก่อน

    audio systems "sounds" great :D

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Lol +1 points

  • @carnagebfr
    @carnagebfr 6 หลายเดือนก่อน +8

    Bro, I just found gold in form of your channel

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +2

      Welcome aboard! Thanks for the comment!

    • @Thomas-yz3ny
      @Thomas-yz3ny 6 หลายเดือนก่อน

      Agree, it's way underrated! Love this channel! I'm a professional developer and it's a blessing to watch his content.

  • @Hazzel31337
    @Hazzel31337 6 หลายเดือนก่อน

    good video thank you

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Glad you enjoyed it

  • @Anerisian
    @Anerisian 6 หลายเดือนก่อน

    Hi Adam, how about Blackbord pt2.

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      Maybe… what would you like to see in that?

    • @Anerisian
      @Anerisian 6 หลายเดือนก่อน +1

      @@git-amend Would be interesting to see how you would combine it with the state machine. How to make it a bit less boilerplate so you can more quickly set and get variables. You’ve touched on also the scriptable object, I guess that’s key to reduce some of the setup in script. Thanks for your great content, by the way!

    • @Anerisian
      @Anerisian 6 หลายเดือนก่อน

      also how to combine/interface with the Ipredicates and such, I think there are probably some neat tricks

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +1

      @@Anerisian Hmm, yes that's a good idea.

  • @crazyfox55
    @crazyfox55 6 หลายเดือนก่อน

    The flyweight and strategy design patterns seem like a good fit. However, is the command pattern really needed?

    • @git-amend
      @git-amend  6 หลายเดือนก่อน +2

      Well, I can't force anyone to adopt a specific implementation in their project, just offer suggestions on how I'd approach it. I certainly would not pass around actions as string values and have a series of conditional logic to handle those strings, and I also would not hard code that behaviour into the Enemy class. Of course there is always more than one way to solve a problem, and often will need to be considered in the larger context of the entire project.

  • @justlama0
    @justlama0 6 หลายเดือนก่อน

    nice

    • @git-amend
      @git-amend  6 หลายเดือนก่อน

      Thank you!