The FTB Forum is now read-only, and is here as an archive.
To participate in our community discussions, please join our Discord! https://ftb.team/discord
14 I lost a bottle of medicine. Luckily, I found an old one that still contained some, less lucky is that I need the repeat number of the one that I lost to order a new one.....
16 well, luckily there is another way to order them. It just meant I had to create an account first. Which I didn't want to do simply because that takes effort. Also, because I don't like the idea of being able to login anywhere and see on what medicine I need (and probably more, haven't looked) because I like to think that getting the login information and the sms code is easier than either breaking in to the database or social engineering your way to that information.
The only reason I didn't like to make an account is because it creates another way to get to my medical information. Not really a big deal as it uses 2 factor authorization but so far there was also little to no benefit to having one.
It is now done using quicksilver instead of yew, quicksilver being an actual 2d game engine written in rust.
Its not the first time I tried to switch to quicksilver, but this time it is going a lot more successful. Especially the code to only draw parts of the map that are on the screen seems to have been improved a lot. This is because I managed to use .split_at to remove two (potentially) large chunks of the matrix holding the map that I need to check.
One thing that could make it faster if I could return an iterator instead of a Vec but... lifetimes get in the way if I do that .....
I also started to use doc tests. A doc test is just some code you put in the documentation of your program as an example HOWEVER cargo makes sure those test actually work.
Because of this you can use these examples not as just examples but also as automated unit tests.
the stuff between ``` is the example code and if the line starts with an # then it gets run during testing but it doesn't show up in the documentation generated by cargo doc.