Commit graph

14 commits

Author SHA1 Message Date
Kurt
30e36579be Misc updates
add more xmldoc
revise some comments for clarity
redo a little bit of logic for perf
rename some methods for better description
2019-02-24 13:57:10 -08:00
Kurt
1095fd0811 misc alloc reductions
scan the data to determine the size of the result array
prevents list buffer resizing-copy (many times) and the final ToArray()
2019-01-06 21:00:27 -08:00
Kurt
1486b7f14a Misc style & minor tweaks
Remove move combobox flicker hack (no longer necessary)
Add more Array.Empty usages
cache mysterygift sizes
seal some classes

no functionality changes
2018-08-02 20:11:42 -07:00
Kurt
f4bfdb8311 Remove unnecessary empty array allocations
yay net 4.6
read more: http://justinvp.com/2015/07/20/array-empty/
2018-08-01 18:30:51 -07:00
Kurt
4b0a2d90b9 Add xmldoc 2018-07-20 20:22:46 -07:00
Kurt
7f6f7a7bad Misc simplifications
reduce nesting (evo.RequiresLevelUp is checked twice, only check once
and handle path)
compact some methods
seal some classes
add a little xmldoc to exposed members
2018-07-01 19:55:23 -07:00
Kurt
5579c4c80d Tidy up MoveLevelUp
use the Learn objects from prior commits for adding a range of moves
2018-06-13 22:03:58 -07:00
Kurt
39daa6c65d Split GetIsLevelUp to individual versions
static the GameVersion reference as we're excessively using it in the
switch cases, for clearer reading
2018-06-12 22:15:06 -07:00
Kurt
64a64b8ce1 Add special handling for gen1 encounter move fetch
Begin splitting of GetMovesLevelUp per-gen into per-version
2018-06-12 18:35:56 -07:00
Kurt
9b43677bb9 Refactoring
pull out some move data fetching to separate class
add methods to quickly fetch if the move is learnable via that method

eventual plan is this:
replace
'fetch all possible moves then look within' move validation
with:
'peek if learnable, and get info how' move validation

advantages:
- returns game the move was learned in and the level (if appropriate)
- infinitely less object creation (garbage collection)
- only looks for a given move, doesn't have to fetch everything before
checking
- faster than full fetch, can be made even faster by optimizing lookups.

subject to change :)
2018-06-08 20:10:41 -07:00
Kurt
b1cd68e3f3 Convert GetLevelLearnMove to use lazy dictionary
faster move lookup
2018-06-07 19:05:28 -07:00
Kurt
452ffe2369 Refactoring
relocate location of stuff
2018-03-08 21:18:32 -08:00
Kurt
cbf4038a95 Refactoring
relocate gift data storage out of legal.cs
2018-03-05 22:19:56 -08:00
Kurt
21cdf4f642 Reorganization
wonder if it's possible to provide a more lightweight core by pulling
out legality stuff to a separate project?
2018-03-05 20:49:45 -08:00