Working on new files

This commit is contained in:
Andy Meneely
2014-07-11 23:58:03 -04:00
parent e9b42da5cf
commit a50c70ae57
4 changed files with 21 additions and 13 deletions
+8 -1
View File
@@ -1,8 +1,15 @@
require 'cairo'
module Squib
class Card
def initialize(width: 825, height: 1125)
attr_reader :width:, :height
attr_accessor :cairo_surface, :cairo_context
def initialize(width, height)
@width=width, @height=height
@cairo_surface = Cairo::ImageSurface.new(width,height)
@cairo_context = Cairo::Context.new(@cairo_surface)
end
end
-7
View File
@@ -1,7 +0,0 @@
module Squib
class TextCmd
end
end
+2 -4
View File
@@ -3,16 +3,14 @@ module Squib
class Deck
attr_reader :width, :height, :cards
attr_accessor :deck
def initialize(width: 825, height: 1125, cards: 1)
@width=width; @height=height; @cards=cards
@deck = Array.new(cards)
(1..cards).each{ @deck << Squib::Card.new(width: width, height: height) }
(1..cards).each{ @deck << Squib::Card.new(width, height) }
end
end
end