Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)ST
Posts
2
Comments
3
Joined
2 wk. ago

  • Played a few rounds just to get an idea of what the game's like. Seems interesting. It took a while to actually figure out what controls were available and what the cards might do. Sometimes the stickmen would group up in the left corner and stay there for a good while, and there was seemingly nothing that could be done about it. The mechanism for scrolling felt a bit awkward to me, especially since the screen scrolled by such a large amount per click. Just some general notes about my experience, take them into account in whatever way best suits your game's vision.

  • Rust @programming.dev

    Patterns for Modeling Overlapping Variant Data in Rust

  • Can't resist pointing out how you should actually write the function in a "real" scenario (but still not handling errors properly), in case anyone wants to know.

    If the list is guaranteed to have exactly two elements:

     rust
        
    fn is_second_num_positive_exact(input: &str) -> bool {
        let (_, n) = input.split_once(',').unwrap();
        n.parse::<i32>().unwrap() > 0
    }
    
      

    If you want to test the last element:

     rust
        
    fn is_last_num_positive(input: &str) -> bool {
        let n = input.split(',').next_back().unwrap();
        n.parse::<i32>().unwrap() > 0
    }
    
      

    If you want to test the 2nd (1-indexed) element:

     rust
        
    fn is_second_num_positive(input: &str) -> bool {
        let n = input.split(',').nth(1).unwrap();
        n.parse::<i32>().unwrap() > 0
    }
    
      
  • Programming @programming.dev

    This Overly Long Variable Name Could Have Been a Comment | Jonathan's Blog