# Arup Guha
# Version as of 6/6/2024
# pictoken class which extends or inherits from token class.

# Written for SI@UCF - to allow both a picture and a # of points
# to be additional attributes to a pictoken. This version inherits
# from a token class that uses a pygame rectangle so that we can
# take advantage of the methods in that pre-written class.

import pygame, sys
from pygame.locals import *
from TokenFile import token

class pictoken(token):

    # New constructor, but largely we just call the token one.
    def __init__(self,myx,myy,mydx,mydy,mycolor,mypic,mypts):
        super().__init__(myx,myy,mydx,mydy,mypic.get_width(),mypic.get_height(),mycolor)
        self.pic = mypic
        self.pts = mypts

    # I want to override this method since I don't want to draw a circle
    # anymore.
    def draw(self, DISPLAYSURF):
        DISPLAYSURF.blit(self.pic,(self.rec.x, self.rec.y))
