Advertisement
jsbsan

ffiicha dommino

Jun 10th, 2013
10,905
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. class Ficha:
  2. #cuando se usa el metodo new, se crea la ficha con sus valores...
  3.     valorA=0
  4.     valorB=0
  5.     def new(self,valorA,valorB):
  6.         if valorA>valorB:
  7.             self.valorA=valorA
  8.             self.valorB=valorB
  9.             self.spin= True
  10.         else:
  11.             self.valorA=valorA
  12.             self.valorB=valorB
  13.             self.spin= False
  14.  
  15.     def ver(self):
  16.         print "Esta ficha es: ",self.valorA,"-",self.valorB
  17.         return ""
  18.  
  19.     def contar(self):
  20.         suma= self.valorA + self.valorB
  21.         return suma
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement