Ijee / Amazeing

This project aims to visualize various algorithms to create or traverse mazes.
https://amazeing.app/
MIT License
43 stars 5 forks source link

[Bug]: Multiple recursive division problems #3

Open Ijee opened 1 month ago

Ijee commented 1 month ago

What happened?

I fixed a few problems that will be found in v1.2.3 but these still occur:

  1. Clicking on "complete algorithm" in the algorithm controller doesn't work.
  2. Going back and forth between iterations can skip divisions and leaves unpainted sections (screenshot 1).
  3. Sometimes it is missing the last node in a painted division. In screenshot 2 the node I marked with blue is missing in the maze I created.
  4. The second to last iteration also throws an error (see error further down)

This algorithm is one of the messiest ones I wrote. It may be a good idea to just rewrite it and could then also be implemented recursively as the name suggests which then only shows the .

Reproduction steps

Not needed.

Version

1.2.2

What browser did you use?

Chrome, Firefox

Screenshots (optional)

1. image

2. image

Console Logs (optional)

simulation.service.ts:91 ERROR TypeError: Cannot read properties of undefined (reading 'xEnd')
    at RecursiveDivision.nextStep (recursive-division.ts:149:30)
    at _AlgorithmService.getNextStep (algorithm.service.ts:265:34)
    at _SimulationService.stepForward (simulation.service.ts:121:41)
    at simulation.service.ts:92:28
    at timer (zone.js:1716:37)
    at _ZoneDelegate.invokeTask (zone.js:398:33)
    at core.mjs:15428:55
    at AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:15428:36)
    at _ZoneDelegate.invokeTask (zone.js:397:38)
    at Object.onInvokeTask (core.mjs:15730:33)
jdegand commented 1 month ago

You need to look into code analysis tools to help find issues. The CodeScene VS Code extension can be a quick way to help pinpoint problem areas. There are other tools like Code Climate that you can intergrate with your repo that can also find code smells.

Ijee commented 1 month ago

You need to look into code analysis tools to help find issues. The CodeScene VS Code extension can be a quick way to help pinpoint problem areas. There are other tools like Code Climate that you can intergrate with your repo that can also find code smells.

Thank you. Currently I only rely on open source projects for all the tools I use to work on my projects but I admit something like you mentioned would certainly help. 👍

I'll most likely fix the problems I described above for the next release unless someone wants to work on this. The next release will also have quite a few bug fixes in itself.

jdegand commented 1 month ago

Check this list for more tools.