This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Constants for bricks */ | |
var NUM_ROWS = 8; | |
var BRICK_TOP_OFFSET = 10; | |
var BRICK_SPACING = 2; | |
var NUM_BRICKS_PER_ROW = 10; | |
var BRICK_HEIGHT = 10; | |
var SPACE_FOR_BRICKS = getWidth() - (NUM_BRICKS_PER_ROW + 1) * BRICK_SPACING; | |
var BRICK_WIDTH = SPACE_FOR_BRICKS / NUM_BRICKS_PER_ROW; | |
var brick; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Constants for bricks */ | |
var NUM_ROWS = 8; | |
var BRICK_TOP_OFFSET = 10; | |
var BRICK_SPACING = 2; | |
var NUM_BRICKS_PER_ROW = 10; | |
var BRICK_HEIGHT = 10; | |
var SPACE_FOR_BRICKS = getWidth() - (NUM_BRICKS_PER_ROW + 1) * BRICK_SPACING; | |
var BRICK_WIDTH = SPACE_FOR_BRICKS / NUM_BRICKS_PER_ROW; | |
var brick; | |
var brickRemoveCount = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SNAKE_WIDTH = 15; | |
var SNAKE_HEIGHT = 15; | |
// Constants to represent the directions | |
var EAST = 0; | |
var SOUTH = 1; | |
var WEST = 2; | |
var NORTH = 3; | |
var snake; | |
var direction; |