oakmound / oak

A pure Go game engine
Apache License 2.0
1.55k stars 83 forks source link

Dlog console review #155

Closed 200sc closed 3 years ago

codecov-commenter commented 3 years ago

Codecov Report

Merging #155 (7578ce8) into dbg-console-tack2 (821130a) will decrease coverage by 0.06%. The diff coverage is 0.00%.

Impacted file tree graph

@@                  Coverage Diff                  @@
##           dbg-console-tack2     #155      +/-   ##
=====================================================
- Coverage              95.68%   95.61%   -0.07%     
=====================================================
  Files                    128      128              
  Lines                   4215     4222       +7     
=====================================================
+ Hits                    4033     4037       +4     
- Misses                   150      155       +5     
+ Partials                  32       30       -2     
Impacted Files Coverage Δ
render/debugMap.go 41.66% <0.00%> (-58.34%) :arrow_down:
collision/rtree.go 99.15% <0.00%> (+1.68%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b505e34...7578ce8. Read the comment docs.

200sc commented 3 years ago

License issue resolved, it thought we brought in aws?

Other notes:

// strToInt32 helps align to the window scope handles
func strToInt32(potentialInt string) (int32, error) {
    i64, err := strconv.ParseInt(potentialInt, 10, 32)
    return int32(i64), err
}

// parseTokenAsInt is a convience function for parsing from our string slice of strings
func parseTokenAsInt(tokenString []string, arrIndex int, defaultVal int) int {
    if len(tokenString) > arrIndex {
        tmp, err := strconv.Atoi(tokenString[arrIndex])
        if err == nil {
            return tmp
        }
    }
    return defaultVal
}

I would drop these comments or move them to an internal utility parsing package, see the similar utilities we have in particle demo