home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 124 / cd-rom 124.iso / edu / tuxmath / tuxmathscrabble / asymptopia / Tile.py < prev    next >
Encoding:
Python Source  |  2003-07-26  |  1.5 KB  |  45 lines

  1. """
  2. /***************************************************************************
  3.  
  4.     Author             :Charles B. Cosse 
  5.     
  6.     Email            :ccosse@asymptopia.com
  7.                     
  8.                     
  9.     Copyright        :(C) 2002,2003 Asymptopia Software.
  10.     
  11.  ***************************************************************************/
  12. /***************************************************************************
  13.                           Tile.py
  14.  
  15.  ***************************************************************************/
  16.  
  17. /***************************************************************************
  18.  *                                                                         *
  19.  *   This program is free software; you can redistribute it and/or modify  *
  20.  *   it under the terms of the GNU General Public License as published by  *
  21.  *   the Free Software Foundation; either version 2 of the License, or     *
  22.  *   (at your option) any later version. (Please note that if you use this *
  23.  *   code you must give credit by including the Author and Copyright       *
  24.  *   info at the top of this file).                                        *
  25.  ***************************************************************************/
  26. """
  27.  
  28. from myutil import *
  29.  
  30. class Tile(pygame.sprite.Sprite):
  31.  
  32.     def __init__(self,img,int_val,str_val):
  33.         pygame.sprite.Sprite.__init__(self)
  34.         self.image,self.rect=load_image(img,1)
  35.         self.saved_center=None
  36.         self.int_val=int_val
  37.         self.str_val=str_val
  38.         
  39.     def update(self):
  40.         self.rect.center = pygame.mouse.get_pos()
  41.     
  42.     def reset(self):
  43.         self.rect.center=self.saved_center        
  44.     
  45.