/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 14:59:35 UTC
  • Revision ID: josh@9ix.org-20130630145935-y34o51cg3lsom5bg
"safe" zone on planets - no new enemies will track you if you're there.

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