/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-14 20:52:47 UTC
  • Revision ID: josh@9ix.org-20131214205247-f42dwe3rx00da9cr
player collide w/ map

Show diffs side-by-side

added added

removed removed

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