Class: GlimmerKlondikeSolitaire

Inherits:
Object
  • Object
show all
Includes:
Glimmer
Defined in:
app/glimmer_klondike_solitaire.rb,
app/glimmer_klondike_solitaire/model/game.rb,
app/glimmer_klondike_solitaire/view/tableau.rb,
app/glimmer_klondike_solitaire/view/app_view.rb,
app/glimmer_klondike_solitaire/view/dealt_pile.rb,
app/glimmer_klondike_solitaire/model/dealt_pile.rb,
app/glimmer_klondike_solitaire/view/column_pile.rb,
app/glimmer_klondike_solitaire/model/column_pile.rb,
app/glimmer_klondike_solitaire/view/action_panel.rb,
app/glimmer_klondike_solitaire/view/dealing_pile.rb,
app/glimmer_klondike_solitaire/view/playing_card.rb,
app/glimmer_klondike_solitaire/model/dealing_pile.rb,
app/glimmer_klondike_solitaire/model/playing_card.rb,
app/glimmer_klondike_solitaire/view/foundation_pile.rb,
app/glimmer_klondike_solitaire/model/foundation_pile.rb,
app/glimmer_klondike_solitaire/view/empty_playing_card.rb,
app/glimmer_klondike_solitaire/view/hidden_playing_card.rb

Defined Under Namespace

Modules: Model, View

Constant Summary collapse

APP_ROOT =
File.expand_path('../..', __FILE__)
VERSION =
File.read(File.join(APP_ROOT, 'VERSION'))
LICENSE =
File.read(File.join(APP_ROOT, 'LICENSE.txt'))
PLAYING_CARD_MARGIN =
10
PLAYING_CARD_WIDTH =
106
PLAYING_CARD_HEIGHT =
162
PLAYING_CARD_SPACING =
5
PLAYING_CARD_COLUMN_SPACING =
35
IMAGES =
Model::PlayingCard::SUITS.reduce({}) do |hash, suit|
  hash.merge(suit => 1.upto(13).reduce({}) do |suit_hash, rank|
    suit_hash.merge(rank => image(File.join(APP_ROOT, 'images', 'resized', "#{rank}#{suit.to_s[0].upcase}.png")))
  end)
end
IMAGE_BACK =
image(File.join(APP_ROOT, 'images', 'resized', 'BACK.png'))