Massive rewrite to use DSL conventions
This commit is contained in:
Regular → Executable
+8
-9
@@ -1,19 +1,18 @@
|
||||
#!/usr/bin/env ruby
|
||||
require 'squib'
|
||||
|
||||
deck width: 825, height: 1125, cards: 3
|
||||
background [1.0,1.0,1.0]
|
||||
data = {'name' => ['Thief', 'Grifter', 'Mastermind'],
|
||||
'level' => [1,2,3]}
|
||||
|
||||
rect x: 0, y: 0, width: 825, height: 1125, x_radius: 30, y_radius: 30
|
||||
Squib::Deck.new(width: 825, height: 1125, cards: 3) do
|
||||
background color: [1.0,1.0,1.0]
|
||||
rect x: 15, y: 15, width: 795, height: 1095, x_radius: 50, y_radius: 50
|
||||
rect x: 30, y: 30, width: 150, height: 150, x_radius: 25, y_radius: 25
|
||||
|
||||
text str: data['name'], x: 250, y: 55
|
||||
text str: data['level'], x: 65, y: 65
|
||||
|
||||
text str: data['name'], x: 10, y: 250
|
||||
rect x: 10, y: 250, width: 100, height: 100
|
||||
|
||||
text str: data['level'], x: 10, y: 15
|
||||
|
||||
save format: :png
|
||||
save format: :png
|
||||
end
|
||||
|
||||
puts "Done!"
|
||||
Reference in New Issue
Block a user