AllocateSheet() public static method

public static AllocateSheet ( SheetType type, int sheetSize ) : Sheet
type SheetType
sheetSize int
return Sheet
Example #1
0
        SheetBuilder CreateSheetBuilder()
        {
            var          allocated = false;
            Func <Sheet> allocate  = () =>
            {
                if (allocated)
                {
                    throw new SheetOverflowException("");
                }
                allocated = true;
                return(SheetBuilder.AllocateSheet());
            };

            return(new SheetBuilder(SheetType.DualIndexed, allocate));
        }
Example #2
0
        static SheetBuilder CreateSheetBuilder()
        {
            var          allocated = false;
            Func <Sheet> allocate  = () =>
            {
                if (allocated)
                {
                    throw new SheetOverflowException("");
                }
                allocated = true;
                return(SheetBuilder.AllocateSheet(SheetType.Indexed, Game.Settings.Graphics.SheetSize));
            };

            return(new SheetBuilder(SheetType.Indexed, allocate));
        }