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)
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
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)
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
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
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
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
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)
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)
def __init__(self, x, y, game): OpenStack.__init__(self, x, y, game, max_accept=1, max_cards=2) self.CARD_YOFFSET = 1 self.blockmap = []
def __init__(self, x, y, game, yoffset=1, **cap): OpenStack.__init__(self, x, y, game, **cap) self.CARD_YOFFSET = yoffset
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)
def __init__(self, x, y, game): OpenStack.__init__(self, x, y, game, max_move=0, max_accept=1) self.CARD_YOFFSET = 1
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)
def __init__(self, x, y, game, **cap): OpenStack.__init__(self, x, y, game, **cap) self.CARD_YOFFSET = self.game.app.images.CARD_YOFFSET