Skip to content
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

Step through notation not efficient #25

Open
chaitu236 opened this issue Apr 24, 2016 · 1 comment
Open

Step through notation not efficient #25

chaitu236 opened this issue Apr 24, 2016 · 1 comment

Comments

@chaitu236
Copy link
Owner

Step through clears all scene objects and creates them again. This is not efficient and results in a little delay.

@TreffnonX
Copy link
Contributor

TreffnonX commented Apr 24, 2016

I have a solution, though it applies to my current modified fork. If you want it, I can write it here in plain lines, so you can copy the functions into your version. It requires a bit of fiddling here and there though.

My general solution was not to completely remove all board and piece objects from the scene, but to put them back into the stock (board.piece_objects) and clear them from their board positions, as well as mark them as 'onsquare = false'.

I did this by creating a new function in board that arranges the pieces. It does, what board.addpieces did during process. That is now modularized, so it can be modified more easiely. And also be called from within 'board.resetpieces'.

I can integrate it into your master, if you let me know when i can work on it without collision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants