private static void addRandomPit(WorldMap w, Random r)
    {
        boolean valid = false;
        while (!valid)
        {
            int x = rnd(r);
            int y = rnd(r);
            if (!(x == 1 && y == 1) && !w.hasPit(x, y))
            {
                valid = true;
                w.addPit(x, y);
            }
        }
    }