HOMEBLOGFLASHCARD CLASHCREATURE SWEEPER

Flashcard Clash Development Update 11

Adam C. Clifton
6 Oct 2022

Another long break between updates, in fact, when I uploaded the latest build to Google Play today, the site said it was a year and a day since the last build!

If you've also taken a long break from Flashcard Clash, when you return, the amount of cards waiting for you might be overwhelming. It's best to try and work through them over time, a bit every day, the spaced repetition algorithm will eventually space them back out. But if you've really forgotten everything and it would be a lot easier just to declare card bankruptcy and start again, then this latest build comes with a feature that will be very helpful to you.

This button, at the bottom of the decks menu, will allow you to reset all your cards and decks to the initial state, so you can start again from the beginning.

This new version 1.0.4 is now live on iOS and Android.

Another feature added in this build is the ability to delete your account if you wish.

To make the delete more elegant, I made some changes to the database structure to enforce cascade delete. So when a user row is deleted from the user table, any linked rows in other tables, eg: owned monsters, are automatically deleted as well. This works well enough, but one problem I'm having is due to the SQLite database I'm using. It is not possible to alter an existing table, you have to jump through a few a few hoops instead.

  1. Create a new temporary table with the structural changes you want.
  2. Insert into the temporary table everything from the original table.
  3. Delete the original table.
  4. Rename the temporary table to take the place of the original table.

That also works well enough. Currently our database isn't too big as well so this process is fairly quick. The problem is in step 3, deleting the table triggers the cascade delete on all other linked tables. So currently modifying the user table will cause all of the users monsters to be deleted :(.

This is a bit of a pain, and something I'll need to look at solving in the future.

Previous: Flashcard Clash Development Update 10
Next: Flashcard Clash Development Update 12
© Numbat Logic Pty Ltd 2014 - 2021
Privacy Policy