Esempio n. 1
0
    public int Arena()
    {
        var ar = new Arena <DisableBoundsCheck, NonZeroMemory>(new Span <byte>(buffer, size));

        var men     = ar.AllocSpan <Man>(N);
        var elves   = ar.AllocSpan <Elf>(N);
        var dwarves = ar.AllocSpan <Dwarf>(N);

        return(men.Length + elves.Length + dwarves.Length);
    }