Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
gruff5526yThat is one big program.cs Would it not make more sense to have class Deck { List<Card> Card{get; set; } where Card is an abstract class and Mage/Warrior act are specialisations
-
gruff5526ywhere you say you wish you could collapse that big block just do
#region "Lots of declarations"
... yourcode...
#endregion
and you will get collapse markers like you do for methods etc -
gruff5526ystring toPrint = ""; //this is faster than lots of Console.WriteLine() calls
You then add to this by doing toPrint += something + something_else
If instead you used a string builder and appended to it this it would be more efficient. The += and + operators on string for concatenation are the least efficient as it has to create an extra string allocation. StringBuilder doesn't -
@gruff
Deck is already a class in the HearthDB library. I know HearthSim has a much more efficient and flexible algorithm for guessing deck archetypes (they use it for HSReplay.net), but I don't have access to that and a massive if block works well enough for my purposes.
I should probably split the Google Sheets reader into a separate file, though.
Thanks for the #region tip 🙂
And thanks for the tip about StringBuilder. I think I vaguely remember using it in class once, but after that we went back to += so I forgot all about it :/
How do you like the readme? Did it get you set up without any extra searching? -
gruff5526yI only browsed through the repository to see if there was any pointers I could give you to be honest
-
@gruff I did try extra hard to make it look nice since it's the first time I've made my code public 😛
I made a script that performs some analysis on data from a trading card game tournament and I would appreciate your input
I made a script that performs some analysis on data from a trading card game tournament and I would appreciate your input