« first day (4 days earlier)    last day (14 days later) » 

8:12 AM
@AndréF. sure, hit me :)
 
 
7 hours later…
3:11 PM
@Kuba I was trying to add another condition in the code but because the way its written I'm finding it very hard too. I tryed to make it remember just the last position he was and add that position to the `Complement`.
What I did was include an `AppendTo[last, pos]` to record the position and "reset" it right after the `RandomChoice` doing `last={}`. The problem I'm having is with this part here:

If[# === {}, last = {};
RandomChoice[
Composition[Thread[{#, Extract[world, #]}] &,
Complement[#, two, start] &][# + p & /@ {{1, 0}, {0, 1}, {-1,
If could help me understand how to implement it or maybe help to change the code to a different format easier to work with.
 
 
4 hours later…
7:37 PM
But what is the problem?
I mean, have you understood the previous code well?
 
8:05 PM
I understood what he's doing and how. But I'm not succeeding in including this idea I had. @Kuba
 
 
1 hour later…
9:10 PM
you can name each function inside Composition with a name you want and use it instead of pure functions. maybe it will be clear what is going on step by step.
 
9:51 PM
hmmm
ok
 
@AndréF. so instead of:
Composition[
  #^2 &,
  #/2 &
  ][{1, 2, 3}]
you can do:
square = #^2 &;
half = #/2 &;
Composition[
  square,
  half
  ][{1, 2, 3}]
 
10:21 PM
Ok
Ill try to do that
But the logic I said is right? Or you notice something there?
something wrogn*
 

« first day (4 days earlier)    last day (14 days later) »