Note that enumeration is a SystemVerilog addition: not supported by Verilog compilers
You can declare your state machine in 1-3 procedures:
A single always_ff block: for simple state machines, but bigger FSMs get complex
always_ff for state transitions + always_comb for next state and ouput logic: usually preferred
always_ff for state transitions + separate always_comb blocks for next state and ouput logic
a case structure is very useful for next state logic
Experiment with your code.
Finally: write a simple testbench for simulating your state machine
Exercise returns
None
(Helpful?) Tips / good practices / conventions
Between sessions you lose the "sourced" paths so if you get an error that the run script cannot find the compiler/simulator run the sourcing script as before
Always comment what you're doing in the code! Commenting in SystemVerilog works as in C/C++ i.e. // or /* ... */
Remember to indent the code and use descriptive variable/class names (as in the given code package or some other sensible way..), readibility is nice.