CSchank / finsm

An Elm app for building and simulating deterministic and non-deterministic finite automata (DFAs and NFAs).
https://finsm.io
10 stars 5 forks source link

Add functionality to change start states with error checking in Build mode #108

Closed Necried closed 3 years ago

Necried commented 3 years ago

This adds the above feature and deals with the issue mentioned in #105

Though one thing that could be a minor inconvenience - users can only currently change their machine type in Simulating mode, and that ties in with the behavior of modifying start states.

CSchank commented 3 years ago

Yes. There are two options for this:

  1. Allow the user to choose DFA/NFA on both screens.
  2. Choose DFA/NFA from the start when a machine is created.

Option 2 is perhaps more consistent with how "most apps" work. You create a document of a certain type then you're stuck in that type. But that leads me to what I don't like about it: I think it will be very common to realize half way through designing a machine that "actually I wanted an NFA" or vice versa. So maybe option 1 is better? Now that DFA/NFA actually affects the Build mode in a more visceral way, it probably makes sense to have it in both places?

Necried commented 3 years ago

Yeah, in this context I rather like Option 1 as well; other than the flexibility of choice that the users have, they could also potentially learn better if they toggle between these two options, particularly in SImulating mode, to see what the differences between the two are.

CSchank commented 3 years ago

Yes. Okay. Would you be able to make this change as part of this PR, by any chance?

Necried commented 3 years ago

Yeah, I'll add it tonight, so don't approve this PR yet.

CSchank commented 3 years ago

Great, thank you!

Necried commented 3 years ago

@CSchank Should be good to merge now

CSchank commented 3 years ago

Great, thank you!! I wonder why Travis is so glitchy!

Necried commented 3 years ago

Travis just can't keep up after 1 year of inactivity...