Good vs. Evil

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
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.....
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
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.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
14
15. Don't create an account for something you don't want to pay for... thankfully I have not learned the hard way.
Who said anything about paying?

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.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
13 managed to work on arena_keeper again.

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 :( .....
upload_2019-6-23_23-55-29.png
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.
upload_2019-6-24_0-0-2.png

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.