~rick-rickspencer3/pygame-template/trunk

« back to all changes in this revision

Viewing changes to crashteroids/smallrock.py

  • Committer: Rick Spencer
  • Date: 2010-02-27 21:44:19 UTC
  • Revision ID: rick.spencer@canonical.com-20100227214419-szj0dy12ef730j4o
have removed extraneous crashteroids stuff

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import pygame, random
2
 
from rock import Rock
3
 
import crashteroidsconfig
4
 
 
5
 
class SmallRock(Rock):
6
 
 def __init__(self, x, y, game):
7
 
  self.game = game
8
 
  self.points = 30
9
 
  random.seed()
10
 
  rk = random.randint(0,2)
11
 
  Rock.__init__(self, config.small_rock + str(rk) + ".png")
12
 
  self.x = x
13
 
  self.y = y
14
 
 
15
 
 def explode(self):
16
 
  self.kill()
17
 
  self.game.increaseScore(self.points)