Skip to content

A workshop to gain practice with object oriented state machines.

License

Notifications You must be signed in to change notification settings

BurlingtonCodeAcademy/trainlines-workshop

Repository files navigation

createdDate timeRequired topics
2021-12-13
1 Hour
instruction,workshop, OOP, state machine, lookup table, recursion

Overview

A workshop designed to get more familiarity with state machines, look up tables, and recursive loops.

To start, begin in trainlines.js and follow the scaffolded comment instructions.

Objective

By the end, you will have a piece of command line software that allows the user to look at their map, transfer lines, and exit the program via "relaxing".

Topics

  • Object oriented programming
  • State machines
  • Lookup tables
  • Recursive loops

Context

What is a class constructor?

All a class constructor is, is a template for similar objects to be based off of. For example, in this workshop, all train lines have the same traits, therefore they are of the same class. This allows us to be more efficient in our code.

What is a recursive loop?

A recursive loop is a function that calls itself until an exit condition is met. For example, in this workshop, the riding function is recursive until the player selects the relax action which exits the process.

Additional Resources

About

A workshop to gain practice with object oriented state machines.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published