protected function getTreeSize($fighterCount, $groupSize)
    {
        $squareMultiplied = collect([1, 2, 4, 8, 16, 32, 64])
            ->map(function ($item) use ($groupSize) {
                return $item * $groupSize;
            }); // [4, 8, 16, 32, 64,...]

        foreach ($squareMultiplied as $limit) {
            if ($fighterCount <= $limit) {
                $treeSize = $limit;
                $numAreas = $this->settings->fightingAreas;
                $fighterCountPerArea = $treeSize / $numAreas;
                if ($fighterCountPerArea < $groupSize) {
                    $treeSize = $treeSize * $numAreas;
                }

                return $treeSize;
            }
        }

        return 64 * $groupSize;
    }
protected function getTreeSize($fighterCount, $groupSize)
    {
        $squareMultiplied = collect([1, 2, 4, 8, 16, 32, 64])
            ->map(function ($item) use ($groupSize) {
                return $item * $groupSize;
            }); // [4, 8, 16, 32, 64,...]

        foreach ($squareMultiplied as $limit) {
            if ($fighterCount <= $limit) {
                $treeSize = $limit;
                $numAreas = $this->settings->fightingAreas;
                $fighterCountPerArea = $treeSize / $numAreas;
                if ($fighterCountPerArea < $groupSize) {
                    $treeSize = $treeSize * $numAreas;
                }

                return $treeSize;
            }
        }

        return 64 * $groupSize;
    }
protected function getTreeSize ( $ fighterCount , $ groupSize ) { $ squareMultiplied = collect ( [ 1 , 2 , 4 , 8 , 16 , 32 , 64 ] ) -> map ( function ( $ item ) use ( $ groupSize ) { return $ item * $ groupSize ; } ) ; // [4, 8, 16, 32, 64,...] foreach ( $ squareMultiplied as $ limit ) { if ( $ fighterCount <= $ limit ) { $ treeSize = $ limit ; $ numAreas = $ this -> settings -> fightingAreas ; $ fighterCountPerArea = $ treeSize / $ numAreas ; if ( $ fighterCountPerArea < $ groupSize ) { $ treeSize = $ treeSize * $ numAreas ; } return $ treeSize ; } } return 64 * $ groupSize ; }
Get the size the first round will have.

@param $fighterCount
@param $groupSize

@return int
Get the size the first round will have .