You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
652 B
24 lines
652 B
using CarStateMachine.Model;
|
|
|
|
namespace CarStateMachine;
|
|
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
Car car = new Car();
|
|
System.Console.WriteLine($"State: {car.CurrentState}");
|
|
|
|
car.TakeAction(Car.Action.Start);
|
|
System.Console.WriteLine($"State: {car.CurrentState}");
|
|
|
|
car.TakeAction(Car.Action.Start);
|
|
System.Console.WriteLine($"State: {car.CurrentState}");
|
|
|
|
car.TakeAction(Car.Action.Accelerate);
|
|
System.Console.WriteLine($"State: {car.CurrentState}");
|
|
|
|
car.TakeAction(Car.Action.Stop);
|
|
System.Console.WriteLine($"State: {car.CurrentState}");
|
|
}
|
|
}
|
|
|