Untested NEXT() source code

Geovanni 2022-04-21 09:01:52

As a programmer, this is the most reminiscent of work I've ever seen. So much so that I really want to use the program to explain the logic of the movie.
Because the male protagonist in the film did not show any frowning stares or shout the name of his nirvana in a loud voice before "foreseeing", it can be considered that there is a process in the male lead's mind to deal with "foreseeing", and he does not need to do it. drive.
Because a certain future of change affects the whole process, after the change, it is necessary to "predict" on the basis of the change. Once the irreversible "DeadEnd" is encountered, the prediction will reset to zero.
Here is the code, where undefined functions are provided by God.
Untested~~

ARRAY LINE=NULL; //This is a two-minute security action queue
Next(NOW,120);
LINE;

FUNCTION String NEXT(NOW,SPAN)
{
Int ISDeadEnd;
//Because the protagonist can only foresee at first The content of 2 minutes, so the loop time is 120 seconds.
For (INT i=0;i{
DefaultActvalue=actvalue;//The default behavior of this second

//The dangerous value after i seconds is judged, if there is danger, return true Loop Action Directive Safe
WHILE(ISDangours(i, GetAction(Actvalue)))
{
IF(ISDangours(I, GetAction(Actvalue))==”DeadEnd”)
{
IsDeadEnd=1;
Continue;
}
Actvalue=GetReActValue();

}


IF(IsDeadEnd!=1)
{
IF(DefaultActvalue!=Actvalue)
{
NEXT(NOW+I,SPAN-I); //When the security of a certain second is found When the behavior is different from the default behavior
}
Else
{
LINE.ADD(Actvalue); //If there is no danger, put the safe behavior if the behavior queue
I++;
}
}
ELSE
{
LINE.DEL(ALL);
I=0;
}
}
SetTimeOut(Next( ), 120); // call again after 2 minutes
}


View more about Next reviews

Extended Reading
  • Elton 2021-12-30 17:20:54

    The original is well written

  • Kaci 2022-04-23 07:01:49

    That CAGE no longer exists. . .

Next quotes

  • Cris Johnson: I have a small magic act back in Vegas. The Frank Cadillac Show.

    Liz: I thought your name was Cris.

    Cris Johnson: It is. Frank Cadillac is my stage name.

    Liz: How'd you come up with that?

    Cris Johnson: I picked two things I really like and put them together. Frankenstein and Cadillacs.

  • Callie Ferris: Don't do it.

    Cris Johnson: I already have.