class Cards::CardStack

Included Modules

Direct Known Subclasses

Defined in:

cards/card_stack.cr

Constant Summary

MOVEMENT_FRAMES = 16

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(x = 0, y = 0, cards : Array(Cards::Card) = [] of Card) #

[View source]

Class Method Detail

def self.height #

[View source]
def self.height_depth #

[View source]
def self.width #

[View source]

Instance Method Detail

def add(card : Card) #

[View source]
def add(card_stack : CardStack) #

[View source]
def add_position(index = @cards.size - 1) #

[View source]
def any?(*args, **options) #

[View source]
def any?(*args, **options, &) #

[View source]
def cards : Array(Card) #

[View source]
def cards=(cards : Array(Card)) #

[View source]
def draw(deck : Deck, screen_x = 0, screen_y = 0) #

[View source]
def empty?(*args, **options) #

[View source]
def empty?(*args, **options, &) #

[View source]
def flip! #

[View source]
def height #

[View source]
def height_depth #

[View source]
def mouse_in? #

[View source]
def move(move_to : Game::Vector, frames = MOVEMENT_FRAMES) #

[View source]
def moved? #

[View source]
def moving? #

[View source]
def position : Game::Vector #

[View source]
def position=(position : Game::Vector) #

[View source]
def pressed? #

[View source]
def shuffle! #

[View source]
def size(*args, **options) #

[View source]
def size(*args, **options, &) #

[View source]
def take : Card #

[View source]
def take_pressed #

[View source]
def take_sample : Card | Nil #

[View source]
def update(frame_time) #

[View source]
def update_cards_position #

[View source]
def width #

[View source]
def x(*args, **options) #

[View source]
def x(*args, **options, &) #

[View source]
def x=(value : Int32 | Float32) #

[View source]
def y(*args, **options) #

[View source]
def y(*args, **options, &) #

[View source]
def y=(value : Int32 | Float32) #

[View source]