# HG changeset patch # User Simon Cross # Date 1251737399 0 # Node ID 7e884084e7b1449ba49f008f52567472e7930d8a # Parent fb5be14ea93093b90f7c2a8c9aa6289018b742f0 Move animal sprites to imagecache. diff -r fb5be14ea930 -r 7e884084e7b1 gamelib/animal.py --- a/gamelib/animal.py Mon Aug 31 16:49:12 2009 +0000 +++ b/gamelib/animal.py Mon Aug 31 16:49:59 2009 +0000 @@ -1,10 +1,8 @@ """Class for the various animals in the game""" -import pygame -import random from pgu.vid import Sprite -import data +import imagecache class Animal(Sprite): """Base class for animals""" @@ -28,7 +26,7 @@ """A chicken""" def __init__(self, pos): - image = pygame.image.load(data.filepath('sprites/chkn.png')) + image = imagecache.load_image('sprites/chkn.png') Animal.__init__(self, image, pos) def move(self, gameboard): @@ -44,7 +42,7 @@ """A fox""" def __init__(self, pos): - image = pygame.image.load(data.filepath('sprites/fox.png')) + image = imagecache.load_image('sprites/fox.png') self.full = False Animal.__init__(self, image, pos)