class Cards::Solitare::GameMode

Defined in:

cards/solitare/game_mode.cr

Constant Summary

DEAL_CARDS = (FAN_STACKS + 1).times.to_a.sum
FAN_STACKS = 7
MARGIN = 25
SAVE_PATH = "./saves/solitare"

Constructors

Instance Method Summary

Instance methods inherited from class Cards::GameMode

draw draw, exit? exit?, game_over? : Bool game_over?, update(frame_time) update

Constructor methods inherited from class Cards::GameMode

new(pull : JSON::PullParser)
new
new

Constructor Detail

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

[View source]
def self.new #

[View source]

Instance Method Detail

def cards : Array(Card) #

[View source]
def cards_to_foundation : Array(NamedTuple(card: Card, stack: Foundation)) #

[View source]
def clear_waste(frame_time) #

[View source]
def clearing_waste? : Bool #

[View source]
def create_save_dirs #

[View source]
def deal #

[View source]
def deal_index : Int32 #

[View source]
def deal_row_index : Int32 #

[View source]
def deal_stack_index(prev_row = false) #

[View source]
def dealt? : Bool #

[View source]
def drag_stack(frame_time) #

[View source]
def draw #

[View source]
def exit? : Bool #

[View source]
def flip_up_stack_top_card #

[View source]
def foundations : Array(Foundation) #

[View source]
def load(file_name : Path) #

[View source]
def load_from(game : Solitare::GameMode) #

[View source]
def menu_handlers #

[View source]
def move_cards_to_foundation #

[View source]
def move_cards_to_waste #

[View source]
def save #

[View source]
def stack_drag : Stack | Nil #

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

[View source]
def stack_drag_released? : Bool #

[View source]
def stack_drag_to_stack : CardStack #

[View source]
def stacks : Array(Stack) #

[View source]
def stock : Stock #

[View source]
def update(frame_time) #

[View source]
def update_menus(frame_time) #

[View source]
def waste : Waste #

[View source]