Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 1.28 KB

README.md

File metadata and controls

32 lines (27 loc) · 1.28 KB

Minecraft generation example project

History

This example project was based on this MIT source:

Process taken:

  • Move all functions to helper file
    • Cleanup figures slightly (kwargs, simicolons)
    • Add voronoi to scatter plot
    • Make map_seed, size, and a few others explicit parameters
    • Move imports to the top
    • Fixed warning with divide by zero
    • Fixed warning about clipping to 0
    • Ran black on both (pipx run black[jupyter] *.py *.ipynb)
  • General cleanup (using Ruff)
    • Ran ruff check --select=ALL --ignore=D,ANN,ERA,PLR,E703,E402,NPY002 MinecraftGenerator.ipynb minecraft_gen.py --fix
    • Manually cleaned up a few things, like np.clip instead of custom lambda
    • Reran black
  • Work on random numbers and plotting
    • Normalize plotting code to use plt.subplots and ax/axs
    • Simplify some loops with zip
    • Remove commented out code that wasn't working
    • Simplify density example to a loop
    • Pull RNG out of the one function that used it
  • Make compute_all function
    • Factor out a few more functions
    • Remove a little duplicate code