def show_score_s_p(game): gg.draw_ring(game.screen, .35*game.FIXATION_WIDTH, game.score_color, game.bg_color, game.SENSOR_INPUT_OFFSET[0], game.SENSOR_INPUT_OFFSET[1], game.FIXATION_HEIGHT, game.current_score) gg.draw_fixation(game.screen, game.FIXATION_WIDTH, game.FIXATION_HEIGHT, game.score_color, game.SENSOR_INPUT_OFFSET[0], game.SENSOR_INPUT_OFFSET[1]) if (game.score_fixation_status == 'good' or game.score_fixation_status == 'max'): gg.draw_fixation(game.screen, game.FIXATION_WIDTH, game.FIXATION_HEIGHT, game.score_color, 1.3*game.SENSOR_INPUT_OFFSET[0], game.SENSOR_INPUT_OFFSET[1]) gg.draw_fixation(game.screen, game.FIXATION_WIDTH, game.FIXATION_HEIGHT, game.score_color, .7*game.SENSOR_INPUT_OFFSET[0], game.SENSOR_INPUT_OFFSET[1]) if game.score_fixation_status == 'max': gg.draw_fixation(game.screen, game.FIXATION_WIDTH, game.FIXATION_HEIGHT, game.score_color, 1.6*game.SENSOR_INPUT_OFFSET[0], game.SENSOR_INPUT_OFFSET[1]) gg.draw_fixation(game.screen, game.FIXATION_WIDTH, game.FIXATION_HEIGHT, game.score_color, .4*game.SENSOR_INPUT_OFFSET[0], game.SENSOR_INPUT_OFFSET[1])
def show_fixation(game): if game.cursor.check_within_dist(game.SENSOR_INPUT_OFFSET, game.CURSOR_RAD-.5*game.FIXATION_WIDTH): game.fixation_color = game.REG_FIXATION_COLOR else: game.fixation_color = game.BAD_FIXATION_COLOR gg.draw_fixation(game.screen, game.FIXATION_WIDTH, game.FIXATION_HEIGHT, game.fixation_color, game.SENSOR_INPUT_OFFSET[0], game.SENSOR_INPUT_OFFSET[1])
def show_score_timed(game): gg.draw_ring(game.screen, .35*game.FIXATION_WIDTH, game.score_color, game.bg_color, game.SENSOR_INPUT_OFFSET[0], game.SENSOR_INPUT_OFFSET[1], game.FIXATION_HEIGHT, game.current_score) gg.draw_fixation(game.screen, game.FIXATION_WIDTH, game.FIXATION_HEIGHT, game.score_color, game.SENSOR_INPUT_OFFSET[0], game.SENSOR_INPUT_OFFSET[1])
def reset_for_next_sequence_execution(game, draw_progress_bool=True): game.last_trial_recorded_bool = False gg.draw_fixation(game, xpos=0.5 * game.SCREEN_WIDTH, color=game.FIXATION_COLOR) game.timers["move"].reset() game.timers["move_limit"].soft_reset() game.current_sequence_complete = False game.timers["score"].time_limit_hit = False game.sequence_progress[:] = game.SEQUENCE_INCOMPLETE game.key_in_sequence = 0 game.last_key_pressed = -1 if draw_progress_bool: gg.draw_sequence_progress(game)
def run_sequence_score(game): ############# # * * * # ############# if not (game.last_trial_recorded_bool): record_score(game) game.last_trial_recorded_bool = True if game.sequence_progress == game.SEQUENCE_CORRECT: color = game.ACTIVE_COLOR if game.timers["move"].time < 0.8 * np.median(game.execution_time_array) and game.mode != "scan": gg.draw_fixation(game, xpos=0.5 * game.SCREEN_WIDTH + game.KEY_XPOS, color=color) gg.draw_fixation(game, xpos=0.5 * game.SCREEN_WIDTH - game.KEY_XPOS, color=color) elif game.timers["move"].time > 1.2 * np.median(game.execution_time_array): color = game.SLOW_COLOR else: color = game.WRONG_COLOR gg.draw_fixation(game, xpos=0.5 * game.SCREEN_WIDTH, color=color)
def run_sequence_score_rest(game): gg.draw_fixation(game, xpos=0.5 * game.SCREEN_WIDTH, color=game.FIXATION_COLOR)