Commits

Nick Massey committed b438675

Salt turns plants into soil.

  • Participants
  • Parent commits 380a7fa

Comments (0)

Files changed (1)

File FallingSand/SaltP.cs

             : base(grid, x, y)
         {
             this.type = ParticleType.Salt;
-            this.density = 3;
+            this.density = 4;
         }
         public override void Tick()
         {
                     {
                         this[x, y] = new WaterP(grid, xLoc + x, yLoc + y);
                     }
+                    if (this[x, y].type == ParticleType.Plant)
+                    {
+                        this[x, y] = new SoilP(grid, xLoc + x, yLoc + y);
+                    }
                 }
             }
             if (this[0, -1].density < this.density)