Commits

Alessio Caiazza committed 90511d6

pictures and a new example

Comments (0)

Files changed (6)

images/dinning.jpg

Added
New image

images/starving.jpg

Added
New image
+{
+\usebackgroundtemplate{\includegraphics{images/dinning.jpg}}
+\frame[plain]{}
+}
+{
+\usebackgroundtemplate{\includegraphics{images/starving.jpg}}
+\frame[plain]{
+\footnote[frame]{\copyright{}2007-2012 ~Slowlydying @ DeviantArt}
+}
+}
 \begin{frame}[plain]
 	\includegraphics
 		[keepaspectratio,height=0.7\paperheight]{images/Erlang_logo}
+require 'celluloid'
+Celluloid.logger.level = Logger::FATAL
+
+class NecroMonger
+  include Celluloid
+  class CannotWinError < StandardError; end
+  
+  def initialize
+    puts "Spawning a NecroMonger!"
+  end
+  
+  def fight(who)
+    puts "Fighting against #{who}"
+    raise CannotWinError, "Riddick is too strong!" if who == :riddick
+  end
+end
+
+class NecroMongerFighter
+  include Celluloid
+  attr_accessor :pilot
+  
+  def initialize
+    self.pilot = NecroMonger.new_link
+  end
+  
+  def land_near_riddick
+    #raise Exception, "Kaboom!"
+    pilot.fight! :riddick
+  end
+end
+
+vehicle = NecroMongerFighter.new
+pilot = vehicle.pilot
+puts pilot.inspect
+vehicle.land_near_riddick
+puts pilot.inspect
+puts vehicle.inspect

sources/unfair_battle.rb

   class CannotWinError < StandardError; end
   
   def initialize
-    puts "I'm born!"
+    puts "Spawning a NecroMonger!"
   end
   
   def fight(who)
 
 supervisor = NecroMonger.supervise
 
-3.times do
+2.times do
+  supervisor.actor.fight! :someone 
   supervisor.actor.fight! :riddick 
   sleep 3
 end
 % \definecolor{nouvellebordeaux3}{RGB}{177,24,45}
 % \definecolor{nouvellebordeaux4}{RGB}{191,55,67}
 
-\definecolor{RubyBack}{RGB}{245,255,255}
+\definecolor{RubyBack}{RGB}{250,250,250}
 \definecolor{RubyFrame}{RGB}{195,2,36} %nouvellebordeaux
 
 \definecolor{OutputBack}{RGB}{255,255,255}