Exemplo n.º 1
0
 def __init__(self, x, y, game, **cap):
     kwdefault(cap,
               max_move=1,
               max_accept=1,
               max_cards=2,
               base_rank=NO_RANK)
     OpenStack.__init__(self, x, y, game, **cap)
Exemplo n.º 2
0
 def __init__(self, x, y, game, yoffset=-1, **cap):
     kwdefault(
         cap, max_move=UNLIMITED_MOVES,
         max_accept=UNLIMITED_ACCEPTS, dir=-1)
     OpenStack.__init__(self, x, y, game, **cap)
     if yoffset < 0:
         yoffset = game.app.images.CARD_YOFFSET
     self.CARD_YOFFSET = yoffset
Exemplo n.º 3
0
 def __init__(self, x, y, game, yoffset=-1, **cap):
     kwdefault(
         cap, max_move=UNLIMITED_MOVES,
         max_accept=UNLIMITED_ACCEPTS, dir=-1)
     OpenStack.__init__(self, x, y, game, **cap)
     if yoffset < 0:
         yoffset = game.app.images.CARD_YOFFSET
     self.CARD_YOFFSET = yoffset
Exemplo n.º 4
0
 def __init__(self, x, y, game, **cap):
     kwdefault(cap,
               mod=8192,
               dir=0,
               base_rank=ANY_RANK,
               max_accept=1,
               max_move=1)
     OpenStack.__init__(self, x, y, game, **cap)
Exemplo n.º 5
0
 def __init__(self, x, y, game, xoffset, yoffset):
     OpenStack.__init__(self, x, y, game)
     self.CARD_YOFFSET = int(self.game.app.images.CARD_YOFFSET * yoffset)
     # use a sine wave for the x offsets
     self.CARD_XOFFSET = []
     j = 1
     for i in range(30):
         self.CARD_XOFFSET.append(int(math.cos(j) * xoffset))
         j = j + .9
Exemplo n.º 6
0
 def __init__(self, x, y, game, base_rank, yoffset, **cap):
     kwdefault(cap,
               dir=3,
               max_move=99,
               max_cards=4,
               max_accept=1,
               base_rank=base_rank)
     OpenStack.__init__(self, x, y, game, **cap)
     self.CARD_YOFFSET = yoffset
Exemplo n.º 7
0
 def __init__(self, x, y, game):
     OpenStack.__init__(self, x, y, game)
     self.CARD_YOFFSET = self.game.app.images.CARD_YOFFSET
     # use a sine wave for the x offsets
     self.CARD_XOFFSET = []
     j = 1
     for i in range(20):
         self.CARD_XOFFSET.append(int(math.sin(j) * 20))
         j = j + .9
Exemplo n.º 8
0
 def __init__(self, x, y, game, xoffset, yoffset):
     OpenStack.__init__(self, x, y, game)
     self.CARD_YOFFSET = int(self.game.app.images.CARD_YOFFSET * yoffset)
     # use a sine wave for the x offsets
     self.CARD_XOFFSET = []
     j = 1
     for i in range(30):
         self.CARD_XOFFSET.append(int(math.cos(j) * xoffset))
         j = j + .9
Exemplo n.º 9
0
 def __init__(self, x, y, game, yoffset, **cap):
     kwdefault(cap,
               max_move=UNLIMITED_MOVES,
               max_cards=UNLIMITED_CARDS,
               max_accept=UNLIMITED_ACCEPTS,
               base_rank=0,
               dir=-1)
     OpenStack.__init__(self, x, y, game, **cap)
     self.CARD_YOFFSET = yoffset
 def __init__(self, x, y, game, yoffset):
     OpenStack.__init__(self, x, y, game)
     self.CARD_YOFFSET = int(self.game.app.images.CARD_YOFFSET * yoffset)
     # use a sine wave for the x offsets
     # compensate for card width
     offset = self.game.app.images.CARDW / 1.7
     self.CARD_XOFFSET = []
     j = 1
     for i in range(20):
         self.CARD_XOFFSET.append(int(math.sin(j) * offset))
         j = j + .9
Exemplo n.º 11
0
 def __init__(self, x, y, game, yoffset):
     OpenStack.__init__(self, x, y, game)
     self.CARD_YOFFSET = int(self.game.app.images.CARD_YOFFSET * yoffset)
     # use a sine wave for the x offsets
     # compensate for card width
     offset = self.game.app.images.CARDW / 1.7
     self.CARD_XOFFSET = []
     j = 1
     for i in range(20):
         self.CARD_XOFFSET.append(int(math.sin(j) * offset))
         j = j + .9
Exemplo n.º 12
0
 def __init__(self, x, y, game, sine=0):
     OpenStack.__init__(self, x, y, game)
     self.CARD_YOFFSET = self.game.app.images.CARD_YOFFSET
     CW = self.game.app.images.CARDW
     if sine:
         # use a sine wave for the x offsets
         self.CARD_XOFFSET = []
         n = 9
         dx = 0.4 * CW * (2 * math.pi / n)
         last_x = 0
         for i in range(n):
             x = int(round(dx * math.sin(i + 1)))
             # print x, x - last_x
             self.CARD_XOFFSET.append(x - last_x)
             last_x = x
     else:
         self.CARD_XOFFSET = (-0.45 * CW, 0.35 * CW, 0.55 * CW, -0.45 * CW)
Exemplo n.º 13
0
 def __init__(self, x, y, game, sine=0):
     OpenStack.__init__(self, x, y, game)
     self.CARD_YOFFSET = self.game.app.images.CARD_YOFFSET
     CW = self.game.app.images.CARDW
     if sine:
         # use a sine wave for the x offsets
         self.CARD_XOFFSET = []
         n = 9
         dx = 0.4 * CW * (2*math.pi/n)
         last_x = 0
         for i in range(n):
             x = int(round(dx * math.sin(i + 1)))
             # print x, x - last_x
             self.CARD_XOFFSET.append(x - last_x)
             last_x = x
     else:
         self.CARD_XOFFSET = (-0.45*CW, 0.35*CW, 0.55*CW, -0.45*CW)
Exemplo n.º 14
0
 def __init__(self, x, y, game):
     OpenStack.__init__(self, x, y, game, max_accept=1, max_cards=2)
     self.CARD_YOFFSET = 1
     self.blockmap = []
Exemplo n.º 15
0
 def __init__(self, x, y, game, yoffset=1, **cap):
     OpenStack.__init__(self, x, y, game, **cap)
     self.CARD_YOFFSET = yoffset
Exemplo n.º 16
0
 def __init__(self, x, y, game, suit=ANY_SUIT, **cap):
     kwdefault(cap, max_move=0, max_accept=0, max_cards=game.NCARDS)
     OpenStack.__init__(self, x, y, game, **cap)
Exemplo n.º 17
0
 def __init__(self, x, y, game, yoffset=1, **cap):
     OpenStack.__init__(self, x, y, game, **cap)
     self.CARD_YOFFSET = yoffset
Exemplo n.º 18
0
 def __init__(self, x, y, game):
     OpenStack.__init__(self, x, y, game, max_move=0, max_accept=1)
     self.CARD_YOFFSET = 1
Exemplo n.º 19
0
 def __init__(self, x, y, game, **cap):
     kwdefault(cap, max_cards=1, max_accept=1, base_rank=ANY_RANK)
     OpenStack.__init__(self, x, y, game, **cap)
Exemplo n.º 20
0
 def __init__(self, x, y, game, yoffset, **cap):
     kwdefault(cap, max_move=UNLIMITED_MOVES, max_cards=UNLIMITED_CARDS,
               max_accept=UNLIMITED_ACCEPTS, base_rank=0, dir=-1)
     OpenStack.__init__(self, x, y, game, **cap)
     self.CARD_YOFFSET = yoffset
Exemplo n.º 21
0
 def __init__(self, x, y, game, base_rank, yoffset, **cap):
     kwdefault(cap, dir=3, max_move=99, max_cards=4, max_accept=1,
               base_rank=base_rank)
     OpenStack.__init__(self, x, y, game, **cap)
     self.CARD_YOFFSET = yoffset
Exemplo n.º 22
0
 def __init__(self, x, y, game, **cap):
     OpenStack.__init__(self, x, y, game, **cap)
     self.CARD_YOFFSET = self.game.app.images.CARD_YOFFSET
Exemplo n.º 23
0
 def __init__(self, x, y, game, suit=ANY_SUIT, **cap):
     kwdefault(cap, max_move=0, max_accept=0, max_cards=game.NCARDS)
     OpenStack.__init__(self, x, y, game, **cap)
Exemplo n.º 24
0
 def __init__(self, x, y, game, **cap):
     OpenStack.__init__(self, x, y, game, **cap)
     self.CARD_YOFFSET = self.game.app.images.CARD_YOFFSET
Exemplo n.º 25
0
 def __init__(self, x, y, game):
     OpenStack.__init__(self, x, y, game, max_accept=1, max_cards=2)
     self.CARD_YOFFSET = 1
     self.blockmap = []
Exemplo n.º 26
0
 def __init__(self, x, y, game, **cap):
     kwdefault(cap, mod=8192, dir=0, base_rank=ANY_RANK,
               max_accept=1, max_move=1)
     OpenStack.__init__(self, x, y, game, **cap)