Stack255 getEmptyIntentionStack ( ) { // If the active stack is empty then return it (don't check other stacks) if ( ! stacks . isEmpty ( ) && getActiveStack ( ) . isEmpty ( ) ) { return getActiveStack ( ) ; } // else create an empty stack, add it to the list ot stacks, and return it Stack255 stack = new Stack255 ( ( byte ) 8 , ( byte ) 2 ) ; stacks . push ( stack ) ; return stack ; }
Returns an empty intentions stack . Creates a new intentions stack and adds it to the list of stacks if needed .