code-katas/snake/snake-levels.js
2015-11-01 23:53:09 -06:00

278 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.levels.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.levels.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.levels.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.levels.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.levels.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.levels.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.levels.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.levels.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.levels.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.levels.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.levels.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 };
})();