Sphere: Difference between revisions

194 bytes removed ,  27 November 2021
→‎Combining spheres: If you assume the Spheres are sorted by size, you can actually account for the largest sphere being excluded in the formulae (and automatically makes clear what happens in the case of a tie, which is otherwise difficult to explain clearly)
(→‎Burying spheres: Attempting to improve the clarity of this section: Renaming variables to meaningful names. | I had trouble understanding the previous text until I actually worked through the example calculations, so figured the working for them would be valuable.)
(→‎Combining spheres: If you assume the Spheres are sorted by size, you can actually account for the largest sphere being excluded in the formulae (and automatically makes clear what happens in the case of a tie, which is otherwise difficult to explain clearly))
Line 25: Line 25:


===Combining spheres===
===Combining spheres===
To get larger Spheres, they can be combined by burying more than one of the same color Sphere in the same spot.
Spheres of the same color can combined by burying them in the same spot, in order to produce a single larger Sphere.


When combined, the size of the resulting Sphere is determined by the following formula:
When combined, the size of the resulting Sphere is determined by the following formula (capped at 99):


<math>newsize = \max(size_n) + \left(\left\lfloor{size_1 \over 5}\right\rfloor + 1\right) + \left(\left\lfloor{size_2 \over 5}\right\rfloor + 1\right) + \left(\left\lfloor{size_3 \over 5}\right\rfloor + 1\right) \ldots</math>
<math>newsize = size_1 + \left(\left\lfloor{size_2 \over 5}\right\rfloor + 1\right) + \left(\left\lfloor{size_3 \over 5}\right\rfloor + 1\right) + \left(\left\lfloor{size_4 \over 5}\right\rfloor + 1\right) \ldots</math>


If spheres are buried on top of a sphere that has already grown at least once since a sphere was buried there, the new size is instead determined by the following formula:
If spheres are buried on top of a sphere that has already grown at least once since a sphere was buried there, the new size is instead determined by the following formula (capped at 99):


<math>newsize = size_{buried} + \max(size_n) + \left(\left\lfloor{size_1 \over 5}\right\rfloor + 1\right) + \left(\left\lfloor{size_2 \over 5}\right\rfloor + 1\right) + \left(\left\lfloor{size_3 \over 5}\right\rfloor + 1\right) \ldots</math>
<math>newsize = size_{buried} + size_1 + \left(\left\lfloor{size_2 \over 5}\right\rfloor + 1\right) + \left(\left\lfloor{size_3 \over 5}\right\rfloor + 1\right) + \left(\left\lfloor{size_4 \over 5}\right\rfloor + 1\right) \ldots</math>


Where <math>size_{buried}</math> is the size of previously buried Sphere that has grown, <math>\max(size_n)</math> is the size of the largest Sphere buried (excluding any previously-buried grown Sphere), and <math>size_n</math> are the respective sizes of the buried spheres other than the largest Sphere and previously-buried grown Sphere. In the event of a tie for the largest size, one of the largest Spheres will be used as <math>size_n</math> while the others of the same size will be treated like any other size Sphere.
Where:
* <math>size_{buried}</math> is the current size of the grown previously-buried Sphere
* <math>size_n</math> are the respective sizes of the buried spheres (excluding any previously-buried grown Sphere), sorted in descending order of size, such that <math>size_1</math> is the size of the largest Sphere


====Example====
====Example====
Burying a Prism Sphere 15, a Prism Sphere 12, a Prism Sphere 7, and two Prism Sphere 1s produces a Prism Sphere 22.
Burying a Prism Sphere 15, a Prism Sphere 12, a Prism Sphere 7, and two Prism Sphere 1s yields a Prism Sphere 22.


<math>
<math>