Description
Create a function that takes a seed and a canvas size and returns a grid of random numbers that size. The canvas covers the whole region at full resolution, since the windows get cut out of it at the size the pipeline takes as input.
Use a generator that you create and seed yourself rather than the global one, otherwise anything else in the program drawing random numbers will change the result.
A canvas is the right thing for a region of known size and is all this ticket asks for. Worth knowing that it changes later: in the paper the starting static is never stored at all. It is worked out from the seed and a position whenever a window needs it, which is what lets it cover an endless world without holding any of it. Keep this function to making a grid from a seed so that the change is contained when it comes.
Testing:
- Assert the same seed twice gives identical grids
- Assert two different seeds give different grids
- Assert the grid is the size asked for
Description
Create a function that takes a seed and a canvas size and returns a grid of random numbers that size. The canvas covers the whole region at full resolution, since the windows get cut out of it at the size the pipeline takes as input.
Use a generator that you create and seed yourself rather than the global one, otherwise anything else in the program drawing random numbers will change the result.
A canvas is the right thing for a region of known size and is all this ticket asks for. Worth knowing that it changes later: in the paper the starting static is never stored at all. It is worked out from the seed and a position whenever a window needs it, which is what lets it cover an endless world without holding any of it. Keep this function to making a grid from a seed so that the change is contained when it comes.
Testing: