Starting a basic hand command
parent
071f06bdc2
commit
f0f9b7680d
|
|
@ -70,5 +70,12 @@ module Squib
|
|||
opts[:dir], opts[:file])
|
||||
end
|
||||
|
||||
|
||||
def hand(opts = {})
|
||||
opts = {file: 'hand.png', fill_color: :white}.merge(opts)
|
||||
opts = needs(opts,[:range, :margin, :trim, :trim_radius, :creatable_dir, :file_to_save])
|
||||
render_hand()
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
require 'squib'
|
||||
|
||||
# Built-in layouts are easy to use and extend
|
||||
Squib::Deck.new(cards: 8, layout: 'playing-card.yml') do
|
||||
# background color: :white
|
||||
# rect x: 37, y: 37, width: 750, height: 1050, fill_color: :black
|
||||
# rect x: 75, y: 75, width: 675, height: 975, fill_color: :white
|
||||
# text str: ('A'..'H').to_a, layout: :bonus_ul, font: 'Sans bold 100'
|
||||
# def helper(a)
|
||||
# puts a
|
||||
# end
|
||||
# helper('abc')
|
||||
# helper('def')
|
||||
# # hand range: :all,
|
||||
# # center_x: :auto, center_y: :auto,
|
||||
# # angle_start: 0, angle_end: Math::PI,
|
||||
# # width: :auto, height: :auto,
|
||||
# save_png prefix: 'hand_'
|
||||
end
|
||||
|
||||
|
|
@ -16,6 +16,7 @@
|
|||
{"name": "rake", "shell_cmd": "rake",},
|
||||
{"name": "rake sanity", "shell_cmd": "rake sanity",},
|
||||
{"name": "rake spec_fastonly", "shell_cmd": "rake spec_fastonly",},
|
||||
{"name": "rake run[hand]", "shell_cmd": "rake run[hand]",},
|
||||
{"name": "rake run[config_text_markup]", "shell_cmd": "rake run[config_text_markup]",},
|
||||
{"name": "rake run[csv_import]", "shell_cmd": "rake run[csv_import]",},
|
||||
{"name": "rake run[custom_config]", "shell_cmd": "rake run[custom_config]",},
|
||||
|
|
|
|||
Loading…
Reference in New Issue