-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Game code is circular dependant. #83
Comments
This sounds like an enhancement for making unit tests. |
I'm sharing this dependancy graph generated by Idonotus. The red scripts are all circular dependant. #222 Would work on converting each game script into an ESM, to help us make them more modular, and allow use of the same scripts on both the server and client-side. |
Once the new gamefile format is finished, and the server is able to borrow the same logic to perform legal move calculations, that opens the door for #25 , as that feature should wait until the new gamefile format, because games will need to be converted into BigInts instead of integers when people move beyond |
The game code currently is majorly circular-dependent. Issues this creates:
Solution
Gradually reduce the dependancies of each game script, one by one, reformatting them to not depend on so many other scripts.
Theoretically, scripts like
math.js
,gamefileutility.js
, andmovesscript.js
should have zero or very close to zero dependancies. Andmain.js
would be at the top of the tree, depending on everything else, but nothing depending onmain.js
!The text was updated successfully, but these errors were encountered: