Java Finite State Machine

Поділитися
Вставка
  • Опубліковано 25 гру 2024

КОМЕНТАРІ • 14

  • @anthonygrear6226
    @anthonygrear6226 3 роки тому +1

    Great video for my current level of learning! I was able to see how you use an abstract class, and a simple state machine. Well done. I need to make something similar with enum, but this helps.

    • @alleyb62
      @alleyb62  3 роки тому

      Glad to hear it, thanks for the feedback.

  • @jobdob7823
    @jobdob7823 Рік тому

    You are my savior

  • @נויכהן-ת1ס
    @נויכהן-ת1ס 2 роки тому +1

    thanks that helped a lot. It also would be helpful if you will upload the code.

  • @examplewastaken
    @examplewastaken 3 роки тому

    The abstraction is all wrong though. Why didn't you make enter() and update() abstract?

    • @sirfalcon1
      @sirfalcon1 3 роки тому +1

      Because it doesn't matter or effect the performance. You can make them abstract but it won't change anything. The abstract property only enforces an override in the subclasses.

    • @examplewastaken
      @examplewastaken 3 роки тому

      I just don't get why you don't use conventions in a tutorial.

    • @alleyb62
      @alleyb62  3 роки тому +2

      It is probably better to stick to conventions in tutorials, but I am more focused on the logic and functionality of the program. I don't use private variables or constants either unless there is a need for it. All of these conventions impose restrictions on the rest of the programming that often leads to regret in my own personal experience. So its not right or wrong, just my choice.

    • @examplewastaken
      @examplewastaken 3 роки тому

      @@alleyb62 you've got a point

  • @ayushjadhao1001
    @ayushjadhao1001 3 роки тому +1

    can you by any way give ascess to the code of this video

    • @alleyb62
      @alleyb62  3 роки тому

      Hey thanks for watching. Unfortunately I don't think I have this code any more.

    • @ayushjadhao1001
      @ayushjadhao1001 3 роки тому

      @@alleyb62 ok anyways I understand
      Thank you

  • @ankitrathore3946
    @ankitrathore3946 3 роки тому +3

    This is not state machine it .. state design patern

    • @kitkarson4226
      @kitkarson4226 10 місяців тому

      "state machine" is the problem. "state design pattern" is a pattern to solve the problem.