279 lines
13 KiB
JavaScript
279 lines
13 KiB
JavaScript
(function(){
|
|
|
|
var small = { "boardSize": "standard", levels: [] };
|
|
var mazes = { "boardSize": "standard", levels: [] };
|
|
var large = { "boardSize": "large", levels: [] };
|
|
var nibbles = { "boardSize": "large", levels: [] };
|
|
|
|
|
|
// Level 1: Hello Snake!
|
|
small.push({
|
|
"name": "Hello Snake!", "rows":10, "cols":10,
|
|
"easy": { "fps": 2, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"medium": { "fps": 4, "targetScore": 7, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"hard": { "fps": 8, "targetScore": 8, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"insane": { "fps": 12, "targetScore": 10, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"board":[
|
|
1,1,1,1,1,1,1,1,1,1,
|
|
1,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,2,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,1,
|
|
1,1,1,1,1,1,1,1,1,1]});
|
|
|
|
// Level 2: Room to Grow
|
|
small.push({
|
|
"name": "Room to Grow", "rows":16, "cols":16,
|
|
"easy": { "fps":3, "targetScore": 7, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"medium": { "fps":3, "targetScore": 7, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"hard": { "fps":3, "targetScore": 7, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"insane": { "fps":3, "targetScore": 7, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"board":[
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]});
|
|
|
|
// Level 3: North and South
|
|
small.push({
|
|
"name": "North and South", "rows":15, "cols":15,
|
|
"easy": { "fps":3, "targetScore": 6, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"medium": { "fps":3, "targetScore": 6, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"hard": { "fps":3, "targetScore": 6, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"insane": { "fps":3, "targetScore": 6, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"board":[
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,2,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,1,1,1,1,1,1,1,1,1,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]});
|
|
|
|
// Level 4: Four Small Rooms
|
|
small.push({
|
|
"name": "Four Small Rooms","rows":15,"cols":15,
|
|
"easy": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"medium": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"hard": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"insane": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"board": [
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,0,2,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]});
|
|
|
|
// Level 5: Polka Dots
|
|
small.push({
|
|
"name": "Polka Dots" ,"rows":15,"cols":15,
|
|
"easy": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"medium": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"hard": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"insane": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"board":[
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,1,0,0,0,1,0,0,0,1,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,
|
|
1,0,0,0,0,2,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,1,0,0,0,1,0,0,0,1,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,1,0,3,0,1,0,0,0,1,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]});
|
|
|
|
// Level 6: Toaster Face
|
|
small.push({
|
|
"name": "Toaster Face","rows":15,"cols":15,
|
|
"easy": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"medium": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"hard": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"insane": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"board":[
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,1,0,0,0,0,0,1,0,0,0,0,0,1,1,
|
|
1,0,0,1,0,1,0,0,0,1,0,1,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,1,0,0,1,0,0,0,0,0,1,0,0,1,1,
|
|
1,0,0,1,1,1,1,1,1,1,1,1,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,1,0,0,1,2,0,0,0,0,1,0,0,1,1,
|
|
1,0,0,1,1,1,0,0,0,1,1,1,0,0,1,
|
|
1,0,0,0,1,0,0,0,0,0,1,0,0,0,1,
|
|
1,1,0,0,0,0,0,1,0,0,0,0,0,1,1,
|
|
1,0,0,1,0,1,1,1,1,1,0,1,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,1,0,0,1,0,0,1,0,0,1,0,0,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]});
|
|
|
|
// Level 7: Wierd Walls
|
|
small.push({
|
|
"name": "Wierd Walls","rows":15,"cols":15,
|
|
"easy": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"medium": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"hard": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"insane": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"board":[
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,0,2,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,1,0,0,0,1,1,1,1,1,1,1,0,1,
|
|
1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,1,0,1,0,1,0,0,0,1,1,1,0,1,
|
|
1,0,1,0,1,0,1,0,1,0,0,0,0,0,1,
|
|
1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,
|
|
1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
|
|
1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,
|
|
1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,
|
|
1,0,1,1,1,0,0,0,1,0,1,0,1,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,
|
|
1,0,1,1,1,1,1,1,1,0,0,0,1,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]});
|
|
|
|
// Level 8: Feast and Famine
|
|
small.push({
|
|
"name": "Feast and Famine","rows":15,"cols":15,
|
|
"easy": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"medium": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"hard": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"insane": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"board":[
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,2,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,0,0,0,0,0,1,0,3,0,3,0,3,1,
|
|
1,0,0,0,0,0,0,1,0,0,3,0,3,0,1,
|
|
1,0,0,0,0,0,0,1,0,3,0,3,0,3,1,
|
|
1,0,0,0,0,0,0,1,0,0,3,0,3,0,1,
|
|
1,0,0,0,0,0,0,0,0,3,0,3,0,3,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]});
|
|
|
|
// Level 1: Maze 1
|
|
mazes.push({
|
|
"name": "Maze 1","rows":15,"cols":15,
|
|
"easy": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"medium": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"hard": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"insane": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"board":[
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
|
|
1,0,1,1,1,1,0,1,0,1,1,0,1,0,1,
|
|
1,0,0,0,0,0,0,1,0,0,0,0,1,0,1,
|
|
1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,
|
|
1,0,1,2,0,0,0,0,0,0,0,0,1,0,1,
|
|
1,0,1,0,1,1,1,0,1,1,1,0,1,0,1,
|
|
1,0,1,0,0,1,0,0,0,0,1,0,0,0,1,
|
|
1,0,1,1,0,1,0,1,1,0,0,0,1,0,1,
|
|
1,0,0,0,0,0,0,1,1,0,1,0,0,0,1,
|
|
1,0,1,1,1,1,0,0,0,0,0,0,0,1,1,
|
|
1,0,0,0,0,0,0,1,1,1,1,1,0,0,1,
|
|
1,0,1,1,1,0,1,1,0,0,0,1,1,0,1,
|
|
1,0,0,0,0,0,0,0,0,1,0,0,0,0,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]});
|
|
|
|
// Level 2: Spiral
|
|
mazes.push({
|
|
"name": "Spiral","rows":15,"cols":15,
|
|
"easy": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"medium": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"hard": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"insane": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"board":[
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,2,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,1,1,1,1,1,1,1,1,1,1,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,1,0,0,1,
|
|
1,0,1,1,1,1,1,1,1,1,0,1,0,0,1,
|
|
1,0,1,0,0,0,0,0,0,1,0,1,0,0,1,
|
|
1,0,1,0,1,1,1,1,0,1,0,1,0,0,1,
|
|
1,0,1,0,1,3,0,1,0,1,0,1,0,0,1,
|
|
1,0,1,0,1,0,0,0,0,1,0,1,0,0,1,
|
|
1,0,1,0,1,0,0,0,0,0,0,1,0,0,1,
|
|
1,0,1,0,1,1,1,1,1,1,1,1,0,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,
|
|
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]});
|
|
|
|
|
|
// Level 3: Maze 2
|
|
mazes.push({
|
|
"name": "Maze 2","rows":17,"cols":17,
|
|
"easy": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"medium": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"hard": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"insane": { "fps":3, "targetScore": 5, "growthFactor": 2, "growthFactorIncrease": 1},
|
|
"board":[
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
|
|
1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,
|
|
1,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,
|
|
1,0,1,0,1,0,1,0,0,0,1,0,1,0,0,0,1,
|
|
1,0,1,0,0,1,1,0,1,1,1,0,1,1,1,0,1,
|
|
1,0,1,1,0,1,1,0,0,0,1,0,0,1,0,0,1,
|
|
1,0,1,0,0,0,1,1,1,0,0,1,0,1,0,1,1,
|
|
1,0,0,0,1,0,0,1,1,1,0,0,0,1,0,0,1,
|
|
1,0,1,0,0,1,0,0,0,0,1,1,1,1,1,0,1,
|
|
1,0,0,1,0,0,0,1,1,0,1,0,0,0,0,0,1,
|
|
1,1,0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,
|
|
1,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,1,
|
|
1,0,1,1,1,1,0,0,0,0,1,1,1,1,1,0,1,
|
|
1,0,1,0,0,0,1,1,1,1,0,0,0,1,0,0,1,
|
|
1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1,1,
|
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}
|
|
]);
|
|
|
|
window.SnakeLevels = {
|
|
"Small Rooms": small,
|
|
"Large Rooms": large,
|
|
"Classic Nibbles": nibbles,
|
|
"Mazes": mazes }
|
|
})();
|