This function takes the threat movement up to player (2.5 m distance) or fruit position (.5 m distance), whatever is earlier, and computes the threat speed over this interval

guess_threat_speed(threat_df, player_df, scenario_data, threat_appear_time)

Arguments

threat_df

A movement tibble

player_df

A movement tibble

scenario_data

A scenario data structure

threat_appear_time

Threat appearance time

Value

A list with threat_speed and move_time (the duration of the movement on which threat_speed is based on)