Beispiel #1
0
        public void PayOut(Action toVacant)
        {
            var newState = new Vacant();

            newState.SetTableModel(_tableModel);
            SetTableState(newState);
            toVacant();
        }
Beispiel #2
0
        public static ITableState getTableStateByCode(int tableState)
        {
            ITableState ret;

            switch (tableState)
            {
            case 0:
                ret = new Vacant();
                break;

            case 1:
                ret = new Occupied();
                break;

            case 2:
                ret = new CheckedOut();
                break;

            default:
                ret = new Vacant();
                break;
            }
            return(ret);
        }