Skip to content

Instantly share code, notes, and snippets.

Last active June 1, 2017 14:33
What would you like to do?
// we have a school which has 10 teachers
teachers = [10]
// each lesson requires a teacher
// when the lesson starts get an available teacher
on start
teacher = school.get available teacher
// when the lesson finishes the teacher is no longer needed
on finish
school.put back teacher
// run 20 lessons throughout the day one after the other
for 1 to 20
new lesson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment