public void Move_vertically(StackPos temp_stackpos) { // At each stack there are four possible vertical position. // The following lines check and set the right height of each moved element. switch (Check_stack_counter(temp_stackpos)) { case 0: Set_vertical_position(y_settop0); break; case 1: Set_vertical_position(y_settop1); break; case 2: Set_vertical_position(y_settop2); break; case 3: Set_vertical_position(y_settop3); break; case 4: Set_vertical_position(y_settop4); break; default: break; } }
public int Check_stack_counter(StackPos temp_stackpos) { // The following lines check which number of elements a stack holds. int count = 0; switch (temp_stackpos) { case StackPos.position_start: count = Stack_Start.Count; break; case StackPos.position_support: count = Stack_Support.Count; break; case StackPos.position_destination: count = Stack_Destination.Count; break; } return(count); }
public override string ToString() { return("LuaTableOnStack:" + StackPos.ToString()); }
public void Move(Operation temp_op, StackPos temp_stackpos) { Move_horizontally(temp_op); Move_vertically(temp_stackpos); }