/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-30 21:40:21 UTC
  • Revision ID: josh@9ix.org-20130630214021-mw2vr14czefr09zb
set prices based on distance

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
                 the.storage.data = {planets = {}}
63
63
 
64
64
                 -- build planets from random
65
 
                 for _ = 1, math.random(5, 7) do
 
65
                 for _ = 1, math.random(3, 6) do
66
66
                    local planet = Planet:new{
67
67
                       x = math.random(the.app.width / 2,
68
68
                                       the.bg.width - the.app.width / 2),
171
171
}
172
172
 
173
173
the.app = App:new {
174
 
   name = 'Traderous',
175
174
   onRun = function (self)
176
175
              print('Version: ' .. VERSION)
177
176
 
191
190
                 self.console:watch('num planets', '#the.planets.sprites')
192
191
                 self.console:watch('num enemies', 'the.enemies:count()')
193
192
                 self.console:watch('onPlanet', 'the.player.onPlanet')
194
 
                 self.console:watch('kills', 'the.player.kills')
195
193
                 --self.console:watch('drawTook', 'the.drawTook')
196
194
 
197
195
                 -- back off that dark overlay a bit