Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
thebluber committed Mar 13, 2012
1 parent cfb7d94 commit 246684b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions game.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,8 @@ window.onload = function(){
//does the snake eat a feed
var eatFeed = head.intersect(feed.x, feed.y, BLOCKSIZE, BLOCKSIZE);

if (isWithin) {
head.moveTo();
for(var i = 1; i < this.blocks.length; i++){
this.blocks[i].moveTo();
this.blocks[i].next_dir = this.blocks[i-1].current_dir;
};
if (isWithin) {
move(this);

if (bite) { restart()};
if (eatFeed) {
Expand Down

0 comments on commit 246684b

Please sign in to comment.