/ld28

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

« back to all changes in this revision

Viewing changes to player.lua

  • Committer: Josh C
  • Date: 2013-12-15 02:20:51 UTC
  • Revision ID: josh@9ix.org-20131215022051-kyqldojzgu2xxcg8
moving goal, clones turning green...

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
local dirs = {'left', 'right', 'up', 'down'}
2
 
 
3
1
Player = Fill:extend {
4
2
   fill = {255,0,0},
5
3
   width = 16, height = 16,
6
4
   queue = deque.new(),
7
5
   onNew = function(self)
8
 
              for _ = 1, 2 do
 
6
              for _ = 1, math.random(1,3) do
9
7
                 self.queue:push_right(dirs[math.random(1,4)])
10
8
              end
11
9
           end,