• 7 Posts
  • 325 Comments
Joined 2 years ago
cake
Cake day: July 8th, 2023

help-circle






  • Everything is easier in PHP!

    <?php
    
    /**
     * This increments $i
     * 
     * @param int $i The number to increment.
     *
     * @return int The incremented number.
     */
    function increment(int $i) {
      $factor = 1;
      $adjustment = 0;
      if ($i < 0) {
        $factor *= -1;
        $adjustment = increment(increment($adjustment));
      }
      $i *= $factor;
      $a = array_fill(1, $i, 'not_i');
      if ($i === 0) {
        array_push($a, 'not_i');
      }
      array_push($a, $i);
      return array_search($i, $a, true) * $factor + $adjustment;
    }
    












  • Minecraft is special. The launcher sets up a bunch of Java stuff and other game configurations. And it downloads updates and handles authentication. Technically you don’t need it, but it makes it a little easier for the developers and the users. There are also third party launchers with additional functionality like downloading mods.

    Other games often pretend they need that stuff when in reality they just want some more tracking that is not in the game itself.