Sha256: 92f2beea8d0a7751c43016bfb4ea89ee0490f3e1d8b6208a465d7eb399ffb6b0
Contents?: true
Size: 876 Bytes
Versions: 32
Compression:
Stored size: 876 Bytes
Contents
require_relative '../model/dealt_pile' require_relative 'empty_playing_card' require_relative 'playing_card' class KlondikeSolitaire module View class DealtPile include Glimmer::UI::CustomShape options :pile_x, :pile_y, :model after_body do observe(model, 'playing_cards.empty?') do |empty_value| if empty_value body_root.shapes.to_a.dup.each(&:dispose) body_root.content { empty_playing_card } else body_root.content { playing_card(model: model.playing_cards.last, parent_pile: self) { drag_source true } } end end end body { shape(pile_x, pile_y) { empty_playing_card } } end end end
Version data entries
32 entries across 32 versions & 1 rubygems