Permalink
Browse files

Better colors and sizes

  • Loading branch information...
jsl committed Jul 21, 2012
1 parent e8a4f02 commit 914891d88a198b656f479a7e959fe1842f9c733f
Showing with 10 additions and 10 deletions.
  1. +1 −1 lib/baby_sim.rb
  2. +2 −2 lib/baby_sim/baby.rb
  3. +4 −4 lib/baby_sim/field.rb
  4. +3 −3 lib/baby_sim/shoes.rb
View
@@ -18,7 +18,7 @@ module BabySim
Thing.new('Samurai Sword') do
color COLORS[:red]
effect -2
- count 60
+ count 20
message "Ouch! That's sharp!"
end
View
@@ -5,9 +5,9 @@ class Baby
def initialize
@health = 0
- @color = "#999"
+ @color = "#FF00FF"
@name = 'Baby'
- @location = [15, 15]
+ @location = [7, 7]
@encounter_messages = [ ]
end
View
@@ -1,8 +1,8 @@
module BabySim
class Field
- CELL_SIZE = 20
- UNITS_WIDE = 25
- UNITS_TALL = 25
+ CELL_SIZE = 30
+ UNITS_WIDE = 15
+ UNITS_TALL = 15
attr_reader :cell_size, :offset, :baby
@@ -51,7 +51,7 @@ def add_to_cell(x, y, thing)
self[x, y] = Cell.new(thing)
@app.nostroke
- @app.para thing.name[0], :left => x*CELL_SIZE + 3, :top => y*CELL_SIZE - 2, :font => '13px', :stroke => "#00A"
+ @app.para thing.name[0], :left => x*CELL_SIZE + 3, :top => y*CELL_SIZE - 2, :font => '20px', :stroke => "#000000"
end
def clean_cell(x, y)
View
@@ -13,7 +13,7 @@ def render_field
@field.paint
- para "Watch out baby!!!", :top => 510, :left => 0, :stroke => white, :font => "11px"
+ para "Simulation continues until health reaches +/- 6.", :top => 510, :left => 0, :stroke => white, :font => "14px"
end
end
@@ -26,7 +26,7 @@ def new_simulation
render_field
- a = animate(5) do
+ a = animate(4) do
@field.move_baby
message = "Baby is #{@field.baby.status} (health meter #{@field.baby.health})\n"
message += @field.baby.last_encounter_message unless @field.baby.last_encounter_message.nil?
@@ -35,7 +35,7 @@ def new_simulation
if @field.baby.finished?
a.stop
- alert "Game over! Baby is #{@field.baby.status}."
+ alert "Simulation over! Baby is #{@field.baby.status}."
end
end
end

0 comments on commit 914891d

Please sign in to comment.