# Path: utils/display.py
# def blank_screen(screen, background, duration):
# def image(screen, img, x, y):
# def text(screen, font, text_string, x, y, colour=(0, 0, 0)):
# def text_space(screen, font, x, y, colour=(0, 0, 0)):
# def wait(duration):
# def wait_for_space():
# 
# Path: utils/values.py
# def get_version():
# def get_links():
# 
# Path: designer/battery_window_qt.py
# class Ui_CognitiveBattery(object):
#     def setupUi(self, CognitiveBattery):
#     def retranslateUi(self, CognitiveBattery):
# 
# Path: interface/about_dialog.py
# class AboutDialog(QtWidgets.QDialog, about_dialog_qt.Ui_Dialog):
#     def __init__(self, parent=None):
# 
# Path: interface/update_dialog.py
# class UpdateDialog(QtWidgets.QDialog, update_dialog_qt.Ui_Dialog):
#     def __init__(self, parent=None):
#     def check_version(self):
#     def show_releases(self):
# 
# Path: interface/settings_window.py
# class SettingsWindow(QtWidgets.QDialog, settings_window_qt.Ui_SettingsDialog):
#     def __init__(self, parent, settings):
#     def set_windowed_options_state(self, state):
#     def task_fullscreen_checkbox(self):
#     def save_window_information(self):
#     def save_settings(self):
#     def cancel_settings(self):
# 
# Path: tasks/ant.py
# class ANT(object):
#     def __init__(self, screen, background, blocks=3):
#     def create_block(self, block_num, combinations, trial_type):
#     def display_flanker(self, flanker_type, location, direction):
#     def display_trial(self, trial_num, data, trial_type):
#     def run_block(self, block_num, total_blocks, block_type):
#     def run(self):
# 
# Path: tasks/flanker.py
# class Flanker(object):
#     def __init__(
#         self,
#         screen,
#         background,
#         dark_mode=False,
#         sets_practice=3,
#         sets_main=25,
#         blocks_compat=1,
#         blocks_incompat=0,
#         block_order="compatible",
#     ):
#     def create_block(self, block_num, combinations, trial_type, compatibility):
#     def display_flanker(self, flanker_type, direction):
#     def display_trial(self, trial_num, data):
#     def run_block(
#         self, block_num, total_blocks, block_type, compatibility, second_half=False
#     ):
#     def run(self):
# 
# Path: tasks/mrt.py
# class MRT(object):
#     def __init__(self, screen, background):
#     def pressSpace(self, x, y):
#     def mainExperiment(self, section, data):
#     def run(self):
# 
# Path: tasks/sart.py
# class SART(object):
#     def __init__(self, screen, background):
#     def display_trial(self, i, data):
#     def run(self):
# 
# Path: tasks/ravens.py
# class Ravens(object):
#     def __init__(self, screen, background, start=13, numTrials=12):
#     def pressSpace(self, x, y):
#     def displayTrial(self, i, data, type):
#     def run(self):
# 
# Path: tasks/digitspan_backwards.py
# class DigitspanBackwards(object):
#     def __init__(self, screen, background):
#     def display_numbers(self, i, data):
#     def number_entry(self):
#     def check_answer(self, user_string, actual_string):
#     def run(self):
# 
# Path: tasks/sternberg.py
# class Sternberg(object):
#     def __init__(self, screen, background, blocks=2):
#     def create_trials(self, combinations):
#     def display_trial(self, df, i, r, trial_type):
#     def display_sequence(self, sequence):
#     def run(self):


import os
import sys
import random
import datetime
import pygame
import pandas as pd
from PyQt5 import QtCore, QtGui, QtWidgets
from utils import display, values
from designer import battery_window_qt
from interface import about_dialog, update_dialog, settings_window
from tasks import ant, flanker, mrt, sart, ravens, digitspan_backwards, sternberg
                if self.task_fullscreen:
                    self.pygame_screen = pygame.display.set_mode(
                        (0, 0), pygame.FULLSCREEN
                    )
                else:
                    if self.task_borderless:
                        self.pygame_screen = pygame.display.set_mode(
                            (self.task_width, self.task_height), pygame.NOFRAME
                        )
                    else:
                        self.pygame_screen = pygame.display.set_mode(
                            (self.task_width, self.task_height)
                        )

                background = pygame.Surface(self.pygame_screen.get_size())
                background = background.convert()

                # Run each task
                # Return and save their output to dataframe/excel
                for task in selected_tasks:
                    if task == "Attention Network Test (ANT)":
                        # Set number of blocks for ANT
                        ant_task = ant.ANT(
                            self.pygame_screen, background, blocks=self.ant_blocks
                        )
                        # Run ANT
                        ant_data = ant_task.run()
                        # Save ANT data to excel
                        ant_data.to_excel(writer, "ANT", index=False)
                    elif task == "Digit Span (backwards)":

# Path: utils/display.py
# def blank_screen(screen, background, duration):
# def image(screen, img, x, y):
# def text(screen, font, text_string, x, y, colour=(0, 0, 0)):
# def text_space(screen, font, x, y, colour=(0, 0, 0)):
# def wait(duration):
# def wait_for_space():
# 
# Path: utils/values.py
# def get_version():
# def get_links():
# 
# Path: designer/battery_window_qt.py
# class Ui_CognitiveBattery(object):
#     def setupUi(self, CognitiveBattery):
#     def retranslateUi(self, CognitiveBattery):
# 
# Path: interface/about_dialog.py
# class AboutDialog(QtWidgets.QDialog, about_dialog_qt.Ui_Dialog):
#     def __init__(self, parent=None):
# 
# Path: interface/update_dialog.py
# class UpdateDialog(QtWidgets.QDialog, update_dialog_qt.Ui_Dialog):
#     def __init__(self, parent=None):
#     def check_version(self):
#     def show_releases(self):
# 
# Path: interface/settings_window.py
# class SettingsWindow(QtWidgets.QDialog, settings_window_qt.Ui_SettingsDialog):
#     def __init__(self, parent, settings):
#     def set_windowed_options_state(self, state):
#     def task_fullscreen_checkbox(self):
#     def save_window_information(self):
#     def save_settings(self):
#     def cancel_settings(self):
# 
# Path: tasks/ant.py
# class ANT(object):
#     def __init__(self, screen, background, blocks=3):
#     def create_block(self, block_num, combinations, trial_type):
#     def display_flanker(self, flanker_type, location, direction):
#     def display_trial(self, trial_num, data, trial_type):
#     def run_block(self, block_num, total_blocks, block_type):
#     def run(self):
# 
# Path: tasks/flanker.py
# class Flanker(object):
#     def __init__(
#         self,
#         screen,
#         background,
#         dark_mode=False,
#         sets_practice=3,
#         sets_main=25,
#         blocks_compat=1,
#         blocks_incompat=0,
#         block_order="compatible",
#     ):
#     def create_block(self, block_num, combinations, trial_type, compatibility):
#     def display_flanker(self, flanker_type, direction):
#     def display_trial(self, trial_num, data):
#     def run_block(
#         self, block_num, total_blocks, block_type, compatibility, second_half=False
#     ):
#     def run(self):
# 
# Path: tasks/mrt.py
# class MRT(object):
#     def __init__(self, screen, background):
#     def pressSpace(self, x, y):
#     def mainExperiment(self, section, data):
#     def run(self):
# 
# Path: tasks/sart.py
# class SART(object):
#     def __init__(self, screen, background):
#     def display_trial(self, i, data):
#     def run(self):
# 
# Path: tasks/ravens.py
# class Ravens(object):
#     def __init__(self, screen, background, start=13, numTrials=12):
#     def pressSpace(self, x, y):
#     def displayTrial(self, i, data, type):
#     def run(self):
# 
# Path: tasks/digitspan_backwards.py
# class DigitspanBackwards(object):
#     def __init__(self, screen, background):
#     def display_numbers(self, i, data):
#     def number_entry(self):
#     def check_answer(self, user_string, actual_string):
#     def run(self):
# 
# Path: tasks/sternberg.py
# class Sternberg(object):
#     def __init__(self, screen, background, blocks=2):
#     def create_trials(self, combinations):
#     def display_trial(self, df, i, r, trial_type):
#     def display_sequence(self, sequence):
#     def run(self):


# Path: interface/battery_window.py
import os
import sys
import random
import datetime
import pygame
import pandas as pd
from PyQt5 import QtCore, QtGui, QtWidgets
from utils import display, values
from designer import battery_window_qt
from interface import about_dialog, update_dialog, settings_window
from tasks import ant, flanker, mrt, sart, ravens, digitspan_backwards, sternberg

                if self.task_fullscreen:
                    self.pygame_screen = pygame.display.set_mode(
                        (0, 0), pygame.FULLSCREEN
                    )
                else:
                    if self.task_borderless:
                        self.pygame_screen = pygame.display.set_mode(
                            (self.task_width, self.task_height), pygame.NOFRAME
                        )
                    else:
                        self.pygame_screen = pygame.display.set_mode(
                            (self.task_width, self.task_height)
                        )

                background = pygame.Surface(self.pygame_screen.get_size())
                background = background.convert()

                # Run each task
                # Return and save their output to dataframe/excel
                for task in selected_tasks:
                    if task == "Attention Network Test (ANT)":
                        # Set number of blocks for ANT
                        ant_task = ant.ANT(
                            self.pygame_screen, background, blocks=self.ant_blocks
                        )
                        # Run ANT
                        ant_data = ant_task.run()
                        # Save ANT data to excel
                        ant_data.to_excel(writer, "ANT", index=False)
                    elif task == "Digit Span (backwards)":

                        digitspan_backwards_task = digitspan_backwards.DigitspanBackwards(