runarberg / random-go-stone-placements

Generate a random starting position for your go games
https://runarberg.github.io/random-go-stone-placements
MIT License
1 stars 0 forks source link

Idea for new `/src/generators/utils` directory structure #16

Closed sabu36 closed 4 years ago

sabu36 commented 4 years ago
/src/generators/utils
|   common.js
|
|___allocation
|       points.js   // star
|       regions.js  // quadrant, domino
|   
|___placement
        prob-dist.js
        weights.js

For mix-and-matching.

sabu36 commented 4 years ago

I realized that allocation can use weights or probability distributions as well. I also made the structure of allocators analogous to generators directory.

generators
|   index.js
|   ...
|
|___utils
|       common.js
|       prob-dist.js
|       weights.js
|       weights.test.js
|
|___allocators
     |  index.js
     |
     |__points
     |      stars.js
     |
     |__regions
            dominoes.js
            quadrants.js