2017-10-31 23:09:36 -04:00
|
|
|
const { Class } = easejs;
|
2012-05-05 14:09:27 -04:00
|
|
|
|
2017-10-31 23:09:36 -04:00
|
|
|
const Stack = Class( 'Stack',
|
2011-03-25 00:08:23 -04:00
|
|
|
{
|
2012-05-05 14:09:27 -04:00
|
|
|
'private _stack': [],
|
2011-11-05 13:04:55 -04:00
|
|
|
|
2017-10-31 23:09:36 -04:00
|
|
|
'public push'( value )
|
2011-11-05 13:04:55 -04:00
|
|
|
{
|
2012-05-05 14:09:27 -04:00
|
|
|
this._stack.push( value );
|
2011-11-05 13:04:55 -04:00
|
|
|
},
|
|
|
|
|
2017-10-31 23:09:36 -04:00
|
|
|
'public pop'()
|
2011-03-25 00:08:23 -04:00
|
|
|
{
|
2012-05-05 14:09:27 -04:00
|
|
|
return this._stack.pop();
|
|
|
|
},
|
2011-03-25 00:08:23 -04:00
|
|
|
} );
|