He/Him | Hu/En/some Jp | ASD | Bi | C/C++/D/C#/Java

  • 45 Posts
  • 720 Comments
Joined 2 years ago
cake
Cake day: March 16th, 2024

help-circle





  • Some yes, those whose only political view is “America bad”, and doesn’t think about the potential fallout of the US disappearing from the world.

    When the Soviet Union fell apart, the USA and EU filled its place for the most part.

    If the USA falls apart, get ready for traditional Chinese medicine and faux gay conversion therapies pushed by Russia to get mainstreamed by the WHO.

    I can understand if someone, to reduce harm, voted (or will vote) for Kamala Harris. Sometimes I even think that would have been the obvious choice, but she and Biden didn’t do the obvious of arresting diddler Don. I cannot really think the same with Gavin Newsom.









  • Now someone needs to make it an entity component system!

    Attempt 1:

    public struct Entity {
      bool isDog : 1;
      bool isAircraftCarrier : 1;
      bool isFlea : 1;
      bool canFlyInAir : 1;
      ubyte opt_numOfAircrafts : 4;
      int entityID;
      int opt_parentID;
      static Entity createDog(int entityID) {
        Entity result;
        result.isDog = true;
        result.entityID = entityID;
        return result;
      }
      static Entity createFlea(int entityID) {
        Entity result;
        result.isFlea = true;
        result.canFlyInAir = true;
        result.entityID = entityID;
        return result;
      }
      void addAirCraft(ref Entity aircraft) {
        if (aircraft.canFlyInAir && this.isAircraftCarrier) {
          aircraft.opt_parentID = this.entityID;
          this.opt_numOfAircrafts++;
        }
      }
      void woof() {
        if (isDog) {
          if (isAircraftCarrier) writeln("I'm a motherfucking aircraft carrier");
          else writeln("Woof!");
        }
      }
    }
    
    void main() {
      Entity dog = Entity.createDog(1);
      Entity flea = Entity.createFlea(2);
      dog.woof();
      dog.isAircraftCarrier = true;
      dog.addAirCraft(flea);
      dog.woof();
    }