mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-07-17 02:32:23 +01:00
Initial Commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/stack
|
||||
var/list
|
||||
contents=new
|
||||
proc
|
||||
Push(value)
|
||||
contents+=value
|
||||
|
||||
Pop()
|
||||
if(!contents.len) return null
|
||||
. = contents[contents.len]
|
||||
contents.len--
|
||||
|
||||
Top() //returns the item on the top of the stack without removing it
|
||||
if(!contents.len) return null
|
||||
return contents[contents.len]
|
||||
|
||||
Copy()
|
||||
var/stack/S=new()
|
||||
S.contents=src.contents.Copy()
|
||||
return S
|
||||
|
||||
Clear()
|
||||
contents.Cut()
|
||||
Reference in New Issue
Block a user