/tg/ Station 13 - Modules - TypesVar Details - Proc Details

ticket_machine

Vars

current_numberWhat ticket number are we currently serving?
current_ticketCurrent ticket to be served, essentially the head of the tickets queue
max_numberAt this point, you need to refill it.
ticket_numberIncrement the ticket number whenever the HOP presses his button
ticketsList of tickets that exist currently

Procs

incrementIncrements the counter by one, if there is a ticket after the current one we are serving. If we have a current ticket, remove it from the top of our tickets list and replace it with the next one if applicable

Var Details

current_number

What ticket number are we currently serving?

current_ticket

Current ticket to be served, essentially the head of the tickets queue

max_number

At this point, you need to refill it.

ticket_number

Increment the ticket number whenever the HOP presses his button

tickets

List of tickets that exist currently

Proc Details

increment

Increments the counter by one, if there is a ticket after the current one we are serving. If we have a current ticket, remove it from the top of our tickets list and replace it with the next one if applicable