Skip to main content
. 2024 Feb 18;24(4):1308. doi: 10.3390/s24041308
Algorithm 2 DetectEvent algorithm
Require: N2
Require:  xz action performed by the player at the iteration z
  • 1:

    ysStanding

  • 2:

    ywWalking

  • 3:

    events_list []

  • 4:

    id_event0

  • 5:

    current_state0

  • 6:

    while   iN do

  • 7:

        if xi=ys or xi=yw then

  • 8:

            if current_state=1 then

  • 9:

                 id_eventid_event+1

  • 10:

               events_list[i]id_event

  • 11:

            end if current_state=0

  • 12:

            events_list[i]id_event

  • 13:

            current_state1

  • 14:

        end if xiys and xiyw

  • 15:

        events_list[i]id_event

  • 16:

        current_state0

  • 17:

    end while