# Path: kelpy/DragDrop.py
# class DragSprite(CommandableImageSprite, Dragable):
# 	"""
# 		The DragSprite is used to create a dragable sprite. It is written so that you feed it similar parameters that you would feed a regualar CommandableImageSprite.
# 		The only difference is that this sprite is able to be dragged around, once the drag and drop function is run in the main event loop (object.process_dragndrop(event))
# 	"""
# 	def __init__(self, canvas, initial_position, imgpath, rotation=0, scale=.20):
# 		CommandableImageSprite.__init__(self, canvas, initial_position, imgpath, rotation, scale)
# 		Dragable.__init__(self)
# 		self.set_x(initial_position[0])
# 		self.set_y(initial_position[1])
# 		self.set_height(self.display_image.get_height())
# 		self.set_width(self.display_image.get_width())
# 
# class DropSprite(CommandableImageSprite, Arrangeable):
# 	"""
# 		The DropSprite class is used to create a sprite with a drop zone on top of it. You then register the drop zone via the DragSprite.register_drop_zone(DropSprite) line.
# 		
# 	"""
# 	def __init__(self, canvas, initial_position, imgpath, rotation=0, scale=.20):
# 		CommandableImageSprite.__init__(self, canvas, initial_position, imgpath, rotation, scale)
# 		Arrangeable.__init__(self)
# 		self.set_x(initial_position[0])
# 		self.set_y(initial_position[1])
# 		self.set_height(self.display_image.get_height())
# 		self.set_width(self.display_image.get_width())


import os, sys
import pygame
import glob
import numpy
from random import randint, choice, sample, shuffle
from time import time,sleep
from kelpy.GIFImage import *
from kelpy.CommandableImageSprite import *
from kelpy.Miscellaneous import *
from kelpy.DisplayQueue import *
from kelpy.OrderedUpdates import *
from kelpy.EventHandler import *
from kelpy.DragDrop import DragSprite, DropSprite
from kelpy.DragDrop import *
from kelpy.tobii.TobiiSimController import *
from kelpy.tobii.TobiiSprite import *



# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Main experiment
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


# Set up images:


ready = raw_input("Are you ready to begin? Press Enter.")
pygame.display.set_mode((SCREEN_WIDTH,SCREEN_HEIGHT))
screen.fill((255,255,255))


#grab the background blobs
blobs = []
for filename in glob.glob('../../kelpy/stimuli/laura_diss/blobs/*'):
	im=filename
	blobs.append(im)

#here is a temp list of sequences
sequences = [ "212302121", "2013210312", "1301203","12301201001", "00112233"]

shuffle(sequences)

#get all the stimuli images
target_images = []
for filename in glob.glob('../../kelpy/stimuli/laura_diss/stimuli/*'):

# Path: kelpy/DragDrop.py
# class DragSprite(CommandableImageSprite, Dragable):
# 	"""
# 		The DragSprite is used to create a dragable sprite. It is written so that you feed it similar parameters that you would feed a regualar CommandableImageSprite.
# 		The only difference is that this sprite is able to be dragged around, once the drag and drop function is run in the main event loop (object.process_dragndrop(event))
# 	"""
# 	def __init__(self, canvas, initial_position, imgpath, rotation=0, scale=.20):
# 		CommandableImageSprite.__init__(self, canvas, initial_position, imgpath, rotation, scale)
# 		Dragable.__init__(self)
# 		self.set_x(initial_position[0])
# 		self.set_y(initial_position[1])
# 		self.set_height(self.display_image.get_height())
# 		self.set_width(self.display_image.get_width())
# 
# class DropSprite(CommandableImageSprite, Arrangeable):
# 	"""
# 		The DropSprite class is used to create a sprite with a drop zone on top of it. You then register the drop zone via the DragSprite.register_drop_zone(DropSprite) line.
# 		
# 	"""
# 	def __init__(self, canvas, initial_position, imgpath, rotation=0, scale=.20):
# 		CommandableImageSprite.__init__(self, canvas, initial_position, imgpath, rotation, scale)
# 		Arrangeable.__init__(self)
# 		self.set_x(initial_position[0])
# 		self.set_y(initial_position[1])
# 		self.set_height(self.display_image.get_height())
# 		self.set_width(self.display_image.get_width())


# Path: examples/LauraSequences/Main.py
import os, sys
import pygame
import glob
import numpy
from random import randint, choice, sample, shuffle
from time import time,sleep
from kelpy.GIFImage import *
from kelpy.CommandableImageSprite import *
from kelpy.Miscellaneous import *
from kelpy.DisplayQueue import *
from kelpy.OrderedUpdates import *
from kelpy.EventHandler import *
from kelpy.DragDrop import DragSprite, DropSprite
from kelpy.DragDrop import *
from kelpy.tobii.TobiiSimController import *
from kelpy.tobii.TobiiSprite import *




# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Main experiment
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


# Set up images:


ready = raw_input("Are you ready to begin? Press Enter.")
pygame.display.set_mode((SCREEN_WIDTH,SCREEN_HEIGHT))
screen.fill((255,255,255))


#grab the background blobs
blobs = []
for filename in glob.glob('../../kelpy/stimuli/laura_diss/blobs/*'):
	im=filename
	blobs.append(im)

#here is a temp list of sequences
sequences = [ "212302121", "2013210312", "1301203","12301201001", "00112233"]

shuffle(sequences)

#get all the stimuli images
target_images = []
for filename in glob.glob('../../kelpy/stimuli/laura_diss/stimuli/*'):

	im=filename