mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-14 03:12:30 +00:00
* sdf * fsda * fuck * fuck2 * toolz * sdaf * sdfa * saf * sdfa * sdfa * sdf * sdfa * temp rename * temp rename * temp rename * sdaf * the pain is immensurable in the land of byond * the curse of rah * safd * sadf * sadf * gf * asf * fssdfa * sfd * sadf * sfda * brah * brah * it's easier for you to fix this * ffs * brah * brah
29 lines
409 B
Plaintext
29 lines
409 B
Plaintext
// This file contains data structures such as Stack and Queue
|
|
|
|
|
|
///////////
|
|
///Queue///
|
|
///////////
|
|
|
|
/Queue
|
|
var/list/contents
|
|
|
|
/Queue/New()
|
|
contents = list()
|
|
|
|
/Queue/proc/enqueue(var/element)
|
|
contents += element
|
|
|
|
/Queue/proc/dequeue()
|
|
if(!contents.len)
|
|
return null
|
|
var/item = contents[1]
|
|
contents.Cut(1, 2)
|
|
return item
|
|
|
|
/Queue/proc/size()
|
|
return contents.len
|
|
|
|
/Queue/proc/as_list()
|
|
return contents
|