Sha256: db338f98f6ca8b2a358d57533bc5c63666976fb591f69626b8dbd31a2c322856

Contents?: true

Size: 993 Bytes

Versions: 2

Compression:

Stored size: 993 Bytes

Contents

require "Queen_Of_Diamonds"
$a=Table.new
$a.hand.cards<<Joker.new
$a.assign_images
$a.hand.shuffle!
$n=0
$card=$a.hand[0]
$tekst1=Gosu::Font.new($a,"Times New Roman",100)
$tekst2=Gosu::Font.new($a,"Century Gothic",50)


class Table
  def draw
		@background.draw(0,0,0)
    $tekst1.draw_rel("PWN!!!",320,400,0,0.5,0.5,1,1,4278190080+rand(16777215))
    $tekst2.draw_rel($card.to_s,320,100,0,0.5,0.5,1,1,0xffffff00) if $card
		@visible_cards.each do |card|
			card.draw
		end
	end
  
  def update
    @visible_cards.each do |card|
			card.action
		end
    if $card.x==0
      $card.x=-40
      $card.angle=rand(720)-360
      $card.y=rand(480)
      $card.side=[$card.front,$card.back][rand(2)]
      $a.visible_cards<<$card
      $card.new_slide(680,rand(480),50)
      $card.new_rotation(rand(720)-360,50)
      $card.new_flip(:x,50)
    elsif $card.x==680
      $a.visible_cards-=[$card]
      $n+=1
      $card=$a.hand[$n]
    end
  end
end

$a.show

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
Queen_Of_Diamonds-0.4-mswin32 samples/pwnage.rb
Queen_Of_Diamonds-0.3-mswin32 samples/pwnage.rb