Advertisement
mixster

Untitled

Jul 4th, 2011
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. class PokeType(object):
  2.   def __init__(self):
  3.     self.name = ''
  4.  
  5. class TypeAdv(object):
  6.   def __init__(self, typeArr):
  7.     self.values = {}
  8.     for t in typeArr:
  9.       self.values[t.name] = {}
  10.       for u in typeArr:
  11.     self.values[t.name][u.name] = 1
  12.  
  13. OR
  14.  
  15. def SetupTypeMatrix(typeArr):
  16.   typeMat = {}
  17.   for t in typeArr:
  18.     typeMat[t] = {}
  19.     for u in typeArr:
  20.       typeMat[t][u] = 1
  21.   return typeMat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement