/traderous

To get this branch, use:
bzr branch http://9ix.org/bzr/traderous

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-06-26 01:11:27 UTC
  • Revision ID: josh@9ix.org-20130626011127-7e7z5ed0r0xmtva3
show planet labels, get better names

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
require 'pause_view'
23
23
require 'game_over'
24
24
require 'names'
25
 
require 'good'
26
25
 
27
26
util = {
28
27
   signOf = function(value)
62
61
                 the.storage.data = {planets = {}}
63
62
 
64
63
                 -- build planets from random
65
 
                 for _ = 1, math.random(5, 7) do
 
64
                 for _ = 1, math.random(3, 6) do
66
65
                    local planet = Planet:new{
67
66
                       x = math.random(the.app.width / 2,
68
67
                                       the.bg.width - the.app.width / 2),
80
79
                                 })
81
80
                 end
82
81
 
83
 
                 Good:stockPlanets()
84
 
 
85
82
                 -- build fresh player
86
83
                 local player = SpacePlayer:new{x=the.bg.width / 2, y=the.bg.height / 2}
87
84
                 the.player = player
189
186
                 self.console:watch('num rocks', '#the.rocks.sprites')
190
187
                 self.console:watch('num planets', '#the.planets.sprites')
191
188
                 self.console:watch('num enemies', 'the.enemies:count()')
192
 
                 self.console:watch('onPlanet', 'the.player.onPlanet')
193
189
                 --self.console:watch('drawTook', 'the.drawTook')
194
190
 
195
191
                 -- back off that dark overlay a bit