reduced index.js using variables
This commit is contained in:
parent
c01199290a
commit
769aeeb276
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,185 +1,169 @@
|
|||
|
||||
var mvs = {
|
||||
"models": {
|
||||
"decercarlaliebre": {
|
||||
"plazza": "true",
|
||||
"title-en": "De cercar la liebre",
|
||||
"module": "hunt",
|
||||
"js": [
|
||||
"hunt-model.js",
|
||||
"decercarlaliebre-model.js"
|
||||
],
|
||||
"defaultHuman": 1,
|
||||
"gameOptions": {
|
||||
"preventRepeat": true,
|
||||
"uctTransposition": "state",
|
||||
"uctIgnoreLoop": false,
|
||||
"levelOptions": {
|
||||
"pieceCount0": 12000000,
|
||||
"pieceCount1": 1000000,
|
||||
"dist20": 15,
|
||||
"freeZone0": 400,
|
||||
"openRisk0": 200,
|
||||
"forkRisk0": 400,
|
||||
"catcheeGroups0": 300
|
||||
}
|
||||
},
|
||||
"levels": [
|
||||
{
|
||||
"ai": "uct",
|
||||
"c": 0.4,
|
||||
"playoutDepth": 0,
|
||||
"minVisitsExpand": 1,
|
||||
"ignoreLeaf": false,
|
||||
"uncertaintyFactor": 5,
|
||||
"propagateMultiVisits": false,
|
||||
"playoutCeil": 1,
|
||||
"log": true,
|
||||
"label": "Easy",
|
||||
"isDefault": true,
|
||||
"maxDuration": 1,
|
||||
"maxNodes": 1500,
|
||||
"maxLoops": 250
|
||||
},
|
||||
{
|
||||
"ai": "uct",
|
||||
"c": 0.4,
|
||||
"playoutDepth": 0,
|
||||
"minVisitsExpand": 1,
|
||||
"ignoreLeaf": false,
|
||||
"uncertaintyFactor": 5,
|
||||
"propagateMultiVisits": false,
|
||||
"playoutCeil": 1,
|
||||
"log": true,
|
||||
"label": "Medium",
|
||||
"maxDuration": 2,
|
||||
"maxNodes": 2500,
|
||||
"maxLoops": 500
|
||||
},
|
||||
{
|
||||
"ai": "uct",
|
||||
"c": 0.4,
|
||||
"playoutDepth": 0,
|
||||
"minVisitsExpand": 1,
|
||||
"ignoreLeaf": false,
|
||||
"uncertaintyFactor": 5,
|
||||
"propagateMultiVisits": false,
|
||||
"playoutCeil": 1,
|
||||
"log": true,
|
||||
"label": "Strong",
|
||||
"maxDuration": 5
|
||||
}
|
||||
],
|
||||
"defaultLevel": 2,
|
||||
"summary": "Middle age hunt game",
|
||||
"rules": {
|
||||
"en": "decercarlaliebre-rules.html",
|
||||
"fr": "decercarlaliebre-rules-fr.html"
|
||||
},
|
||||
"credits": {
|
||||
"en": "decercarlaliebre-credits.html",
|
||||
"fr": "decercarlaliebre-credits-fr.html"
|
||||
},
|
||||
"description": {
|
||||
"en": "decercarlaliebre-description.html",
|
||||
"fr": "decercarlaliebre-description-fr.html"
|
||||
},
|
||||
"thumbnail": "decercarlaliebre-thumbnail.png",
|
||||
"strings": []
|
||||
}
|
||||
},
|
||||
"views": {
|
||||
"decercarlaliebre": {
|
||||
"title-en": "De cercar la liebre View",
|
||||
"module": "hunt",
|
||||
"js": [
|
||||
"hunt-xd-view.js",
|
||||
"decercarlaliebre-xd-view.js"
|
||||
],
|
||||
"visuals": {
|
||||
"600x600": [
|
||||
"res/visuals/decercar-600x600-3d.jpg",
|
||||
"res/visuals/decercar-600x600-2d.jpg"
|
||||
]
|
||||
},
|
||||
"xdView": true,
|
||||
"css": [
|
||||
"hunt.css",
|
||||
"decercarlaliebre.css"
|
||||
],
|
||||
"preferredRatio": 1,
|
||||
"switchable": false,
|
||||
"useShowMoves": true,
|
||||
"useNotation": true,
|
||||
"animateSelfMoves": false,
|
||||
"skins": [
|
||||
{
|
||||
"name": "decercarlaliebre3d",
|
||||
"title": "3D Classic",
|
||||
"3d": true,
|
||||
"camera": {
|
||||
"radius": 14,
|
||||
"elevationAngle": 45,
|
||||
"limitCamMoves": true
|
||||
},
|
||||
"world": {
|
||||
"lightIntensity": 0,
|
||||
"skyLightIntensity": 0,
|
||||
"color": 3355443,
|
||||
"fog": false,
|
||||
"lightPosition": {
|
||||
"x": -5,
|
||||
"y": 18,
|
||||
"z": 5
|
||||
},
|
||||
"lightShadowDarkness": 0.25,
|
||||
"ambientLightColor": 1118481
|
||||
},
|
||||
"preload": [
|
||||
"image|/res/xd-view/meshes/liebre/hunter.jpg",
|
||||
"image|/res/xd-view/meshes/liebre/rabbitskin4.jpg",
|
||||
"image|/res/xd-view/meshes/liebre/liebreboardsimple.jpg",
|
||||
"image|/res/xd-view/meshes/liebre/liebreboard.jpg",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/board.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/liebre/hunter2.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/liebre/liebre6.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/target.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "medieval",
|
||||
"title": "Medieval"
|
||||
}
|
||||
],
|
||||
"defaultOptions": {
|
||||
"sounds": true,
|
||||
"notation": false,
|
||||
"moves": true
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var games = {};
|
||||
|
||||
for(var name in mvs.models) {
|
||||
games[name] = {
|
||||
name: name,
|
||||
modelScripts: mvs.models[name].js,
|
||||
config: {
|
||||
status: true,
|
||||
model: mvs.models[name]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(var name in mvs.views) {
|
||||
if(games[name]) {
|
||||
games[name].viewScripts = mvs.views[name].js;
|
||||
games[name].config.view = mvs.views[name];
|
||||
}
|
||||
}
|
||||
|
||||
exports.games = Object.keys(games).map((name)=>{
|
||||
return games[name];
|
||||
});
|
||||
exports.games = (function() {
|
||||
var modelScripts = [
|
||||
"hunt-model.js",
|
||||
"decercarlaliebre-model.js"
|
||||
]
|
||||
var config_view_js = [
|
||||
"hunt-xd-view.js",
|
||||
"decercarlaliebre-xd-view.js"
|
||||
]
|
||||
return [
|
||||
{
|
||||
"name": "decercarlaliebre",
|
||||
"modelScripts": modelScripts,
|
||||
"config": {
|
||||
"status": true,
|
||||
"model": {
|
||||
"title-en": "De cercar la liebre",
|
||||
"summary": "Middle age hunt game",
|
||||
"defaultLevel": 2,
|
||||
"js": modelScripts,
|
||||
"defaultHuman": 1,
|
||||
"gameOptions": {
|
||||
"preventRepeat": true,
|
||||
"uctTransposition": "state",
|
||||
"uctIgnoreLoop": false,
|
||||
"levelOptions": {
|
||||
"pieceCount0": 12000000,
|
||||
"pieceCount1": 1000000,
|
||||
"dist20": 15,
|
||||
"freeZone0": 400,
|
||||
"openRisk0": 200,
|
||||
"forkRisk0": 400,
|
||||
"catcheeGroups0": 300
|
||||
}
|
||||
},
|
||||
"levels": [
|
||||
{
|
||||
"label": "Easy",
|
||||
"playoutCeil": 1,
|
||||
"playoutDepth": 0,
|
||||
"minVisitsExpand": 1,
|
||||
"ignoreLeaf": false,
|
||||
"uncertaintyFactor": 5,
|
||||
"propagateMultiVisits": false,
|
||||
"c": 0.4,
|
||||
"log": true,
|
||||
"ai": "uct",
|
||||
"isDefault": true,
|
||||
"maxDuration": 1,
|
||||
"maxNodes": 1500,
|
||||
"maxLoops": 250
|
||||
},
|
||||
{
|
||||
"label": "Medium",
|
||||
"propagateMultiVisits": false,
|
||||
"playoutDepth": 0,
|
||||
"minVisitsExpand": 1,
|
||||
"ignoreLeaf": false,
|
||||
"uncertaintyFactor": 5,
|
||||
"c": 0.4,
|
||||
"playoutCeil": 1,
|
||||
"log": true,
|
||||
"ai": "uct",
|
||||
"maxDuration": 2,
|
||||
"maxNodes": 2500,
|
||||
"maxLoops": 500
|
||||
},
|
||||
{
|
||||
"label": "Strong",
|
||||
"uncertaintyFactor": 5,
|
||||
"playoutDepth": 0,
|
||||
"minVisitsExpand": 1,
|
||||
"ignoreLeaf": false,
|
||||
"c": 0.4,
|
||||
"propagateMultiVisits": false,
|
||||
"playoutCeil": 1,
|
||||
"log": true,
|
||||
"ai": "uct",
|
||||
"maxDuration": 5
|
||||
}
|
||||
],
|
||||
"plazza": "true",
|
||||
"module": "hunt",
|
||||
"rules": {
|
||||
"en": "decercarlaliebre-rules.html",
|
||||
"fr": "decercarlaliebre-rules-fr.html"
|
||||
},
|
||||
"credits": {
|
||||
"en": "decercarlaliebre-credits.html",
|
||||
"fr": "decercarlaliebre-credits-fr.html"
|
||||
},
|
||||
"description": {
|
||||
"en": "decercarlaliebre-description.html",
|
||||
"fr": "decercarlaliebre-description-fr.html"
|
||||
},
|
||||
"thumbnail": "decercarlaliebre-thumbnail.png",
|
||||
"strings": [
|
||||
]
|
||||
},
|
||||
"view": {
|
||||
"title-en": "De cercar la liebre View",
|
||||
"defaultOptions": {
|
||||
"sounds": true,
|
||||
"notation": false,
|
||||
"moves": true
|
||||
},
|
||||
"js": config_view_js,
|
||||
"visuals": {
|
||||
"600x600": [
|
||||
"res/visuals/decercar-600x600-3d.jpg",
|
||||
"res/visuals/decercar-600x600-2d.jpg"
|
||||
]
|
||||
},
|
||||
"xdView": true,
|
||||
"css": [
|
||||
"hunt.css",
|
||||
"decercarlaliebre.css"
|
||||
],
|
||||
"module": "hunt",
|
||||
"switchable": false,
|
||||
"useShowMoves": true,
|
||||
"useNotation": true,
|
||||
"animateSelfMoves": false,
|
||||
"skins": [
|
||||
{
|
||||
"name": "decercarlaliebre3d",
|
||||
"title": "3D Classic",
|
||||
"3d": true,
|
||||
"camera": {
|
||||
"radius": 14,
|
||||
"elevationAngle": 45,
|
||||
"limitCamMoves": true
|
||||
},
|
||||
"world": {
|
||||
"lightIntensity": 0,
|
||||
"skyLightIntensity": 0,
|
||||
"color": 3355443,
|
||||
"fog": false,
|
||||
"lightPosition": {
|
||||
"x": -5,
|
||||
"y": 18,
|
||||
"z": 5
|
||||
},
|
||||
"lightShadowDarkness": 0.25,
|
||||
"ambientLightColor": 1118481
|
||||
},
|
||||
"preload": [
|
||||
"image|/res/xd-view/meshes/liebre/hunter.jpg",
|
||||
"image|/res/xd-view/meshes/liebre/rabbitskin4.jpg",
|
||||
"image|/res/xd-view/meshes/liebre/liebreboardsimple.jpg",
|
||||
"image|/res/xd-view/meshes/liebre/liebreboard.jpg",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/board.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/liebre/hunter2.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/liebre/liebre6.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/target.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "medieval",
|
||||
"title": "Medieval"
|
||||
}
|
||||
],
|
||||
"preferredRatio": 1
|
||||
}
|
||||
},
|
||||
"viewScripts": config_view_js
|
||||
}
|
||||
]
|
||||
})()
|
|
@ -1,210 +1,191 @@
|
|||
|
||||
var mvs = {
|
||||
"models": {
|
||||
"mana": {
|
||||
"plazza": "true",
|
||||
"js": [
|
||||
"mana-model.js"
|
||||
],
|
||||
"title-en": "Mana",
|
||||
"maxLevel": 9,
|
||||
"summary": "Capture the opponent's Damyo",
|
||||
"module": "mana",
|
||||
"rules": {
|
||||
"en": "rules.html",
|
||||
"fr": "rules-fr.html"
|
||||
},
|
||||
"credits": {
|
||||
"en": "credits.html",
|
||||
"fr": "credits-fr.html"
|
||||
},
|
||||
"description": {
|
||||
"en": "description.html",
|
||||
"fr": "description-fr.html"
|
||||
},
|
||||
"thumbnail": "thumbnail.png",
|
||||
"defaultLevel": 2,
|
||||
"gameOptions": {
|
||||
"preventRepeat": true,
|
||||
"width": 6,
|
||||
"height": 6,
|
||||
"initial": [
|
||||
"223122",
|
||||
"131313",
|
||||
"312231",
|
||||
"231312",
|
||||
"213132",
|
||||
"132213"
|
||||
],
|
||||
"damyoCount": 1,
|
||||
"roninCount": 5,
|
||||
"insertAnywhere": true,
|
||||
"damyoKillWin": 1,
|
||||
"stage1start": 3,
|
||||
"stage2start": 6,
|
||||
"factors": {
|
||||
"roninCount": [
|
||||
0,
|
||||
5,
|
||||
5,
|
||||
0,
|
||||
5,
|
||||
10
|
||||
],
|
||||
"sameAsDamyo": 10,
|
||||
"typeCount": [
|
||||
0,
|
||||
10,
|
||||
20,
|
||||
5
|
||||
],
|
||||
"dist2Damyo": -1,
|
||||
"dist2DamyoInvSquare": 50
|
||||
}
|
||||
},
|
||||
"levels": [
|
||||
{
|
||||
"label": "Padawan",
|
||||
"potential": 1000,
|
||||
"isDefault": true,
|
||||
"maxDepth": 2
|
||||
},
|
||||
{
|
||||
"label": "Warrior",
|
||||
"potential": 4000,
|
||||
"maxDepth": 5
|
||||
},
|
||||
{
|
||||
"label": "Samurai",
|
||||
"potential": 20000,
|
||||
"maxDepth": 6
|
||||
},
|
||||
{
|
||||
"label": "Ronin",
|
||||
"potential": 40000,
|
||||
"maxDepth": 8
|
||||
},
|
||||
{
|
||||
"label": "Damyo",
|
||||
"potential": 100000,
|
||||
"maxDepth": 8
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"views": {
|
||||
"mana": {
|
||||
"title-en": "Mana View",
|
||||
"module": "mana",
|
||||
"css": [
|
||||
"mana.css"
|
||||
],
|
||||
"js": [
|
||||
"mana-xd-view.js"
|
||||
],
|
||||
"visuals": {
|
||||
"600x600": [
|
||||
"res/visuals/mana-600x600-3d.jpg",
|
||||
"res/visuals/mana-600x600-2d.jpg"
|
||||
]
|
||||
},
|
||||
"preferredRatio": 1,
|
||||
"switchable": true,
|
||||
"xdView": true,
|
||||
"sounds": {
|
||||
"death1": "death1",
|
||||
"death2": "death2",
|
||||
"death3": "death3",
|
||||
"chains": "chains",
|
||||
"move1": "move1",
|
||||
"move3": "move3",
|
||||
"zip0": "zip0",
|
||||
"zip1": "zip1",
|
||||
"zip2": "zip2",
|
||||
"zip3": "zip3",
|
||||
"sabers": "sabersout",
|
||||
"deathdamyo": "manasound-kill2",
|
||||
"intro": "japenese-mana-intro",
|
||||
"wind": "wind"
|
||||
},
|
||||
"skins": [
|
||||
{
|
||||
"name": "orange3d",
|
||||
"title": "Orange (3D)",
|
||||
"3d": true,
|
||||
"camera": {
|
||||
"radius": 15,
|
||||
"limitCamMoves": true
|
||||
},
|
||||
"world": {
|
||||
"lightIntensity": 0.7,
|
||||
"skyLightIntensity": 0.2,
|
||||
"fog": true,
|
||||
"color": 14327863,
|
||||
"lightPosition": {
|
||||
"x": -10,
|
||||
"y": 18,
|
||||
"z": 10
|
||||
},
|
||||
"skyLightPosition": {
|
||||
"x": 10,
|
||||
"y": 18,
|
||||
"z": -10
|
||||
},
|
||||
"lightShadowDarkness": 0.25,
|
||||
"ambientLightColor": 8939008
|
||||
},
|
||||
"preload": [
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/strokeblack.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/mana-piece-smoothed2.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/select-ring-undo.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/select-smoothed.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/mana.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "official",
|
||||
"title": "Official",
|
||||
"preload": [
|
||||
"image|/res/images/boardexp.png",
|
||||
"image|/res/images/manapieces.png"
|
||||
]
|
||||
}
|
||||
],
|
||||
"defaultOptions": {
|
||||
"sounds": true,
|
||||
"notation": false,
|
||||
"moves": true
|
||||
},
|
||||
"useNotation": true,
|
||||
"useShowMoves": true,
|
||||
"animateSelfMoves": false
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var games = {};
|
||||
|
||||
for(var name in mvs.models)
|
||||
if(mvs.models.hasOwnProperty(name)) {
|
||||
games[name] = {
|
||||
name: name,
|
||||
modelScripts: mvs.models[name].js,
|
||||
config: {
|
||||
status: true,
|
||||
model: mvs.models[name]
|
||||
}
|
||||
exports.games = (function() {
|
||||
var modelScripts = [
|
||||
"mana-model.js"
|
||||
]
|
||||
var config_view_js = [
|
||||
"mana-xd-view.js"
|
||||
]
|
||||
return [
|
||||
{
|
||||
"name": "mana",
|
||||
"modelScripts": modelScripts,
|
||||
"config": {
|
||||
"status": true,
|
||||
"model": {
|
||||
"title-en": "Mana",
|
||||
"summary": "Capture the opponent's Damyo",
|
||||
"rules": {
|
||||
"en": "rules.html",
|
||||
"fr": "rules-fr.html"
|
||||
},
|
||||
"maxLevel": 9,
|
||||
"plazza": "true",
|
||||
"module": "mana",
|
||||
"js": modelScripts,
|
||||
"credits": {
|
||||
"en": "credits.html",
|
||||
"fr": "credits-fr.html"
|
||||
},
|
||||
"description": {
|
||||
"en": "description.html",
|
||||
"fr": "description-fr.html"
|
||||
},
|
||||
"thumbnail": "thumbnail.png",
|
||||
"defaultLevel": 2,
|
||||
"gameOptions": {
|
||||
"roninCount": 5,
|
||||
"preventRepeat": true,
|
||||
"height": 6,
|
||||
"initial": [
|
||||
"223122",
|
||||
"131313",
|
||||
"312231",
|
||||
"231312",
|
||||
"213132",
|
||||
"132213"
|
||||
],
|
||||
"damyoCount": 1,
|
||||
"width": 6,
|
||||
"insertAnywhere": true,
|
||||
"damyoKillWin": 1,
|
||||
"stage1start": 3,
|
||||
"stage2start": 6,
|
||||
"factors": {
|
||||
"roninCount": [
|
||||
0,
|
||||
5,
|
||||
5,
|
||||
0,
|
||||
5,
|
||||
10
|
||||
],
|
||||
"sameAsDamyo": 10,
|
||||
"typeCount": [
|
||||
0,
|
||||
10,
|
||||
20,
|
||||
5
|
||||
],
|
||||
"dist2Damyo": -1,
|
||||
"dist2DamyoInvSquare": 50
|
||||
}
|
||||
},
|
||||
"levels": [
|
||||
{
|
||||
"label": "Padawan",
|
||||
"potential": 1000,
|
||||
"isDefault": true,
|
||||
"maxDepth": 2
|
||||
},
|
||||
{
|
||||
"label": "Warrior",
|
||||
"potential": 4000,
|
||||
"maxDepth": 5
|
||||
},
|
||||
{
|
||||
"label": "Samurai",
|
||||
"potential": 20000,
|
||||
"maxDepth": 6
|
||||
},
|
||||
{
|
||||
"label": "Ronin",
|
||||
"potential": 40000,
|
||||
"maxDepth": 8
|
||||
},
|
||||
{
|
||||
"label": "Damyo",
|
||||
"potential": 100000,
|
||||
"maxDepth": 8
|
||||
}
|
||||
]
|
||||
},
|
||||
"view": {
|
||||
"title-en": "Mana View",
|
||||
"animateSelfMoves": false,
|
||||
"css": [
|
||||
"mana.css"
|
||||
],
|
||||
"js": config_view_js,
|
||||
"visuals": {
|
||||
"600x600": [
|
||||
"res/visuals/mana-600x600-3d.jpg",
|
||||
"res/visuals/mana-600x600-2d.jpg"
|
||||
]
|
||||
},
|
||||
"preferredRatio": 1,
|
||||
"switchable": true,
|
||||
"module": "mana",
|
||||
"sounds": {
|
||||
"zip1": "zip1",
|
||||
"death1": "death1",
|
||||
"death3": "death3",
|
||||
"chains": "chains",
|
||||
"move1": "move1",
|
||||
"move3": "move3",
|
||||
"zip0": "zip0",
|
||||
"death2": "death2",
|
||||
"zip2": "zip2",
|
||||
"zip3": "zip3",
|
||||
"sabers": "sabersout",
|
||||
"deathdamyo": "manasound-kill2",
|
||||
"intro": "japenese-mana-intro",
|
||||
"wind": "wind"
|
||||
},
|
||||
"skins": [
|
||||
{
|
||||
"name": "orange3d",
|
||||
"title": "Orange (3D)",
|
||||
"3d": true,
|
||||
"camera": {
|
||||
"radius": 15,
|
||||
"limitCamMoves": true
|
||||
},
|
||||
"world": {
|
||||
"lightIntensity": 0.7,
|
||||
"skyLightIntensity": 0.2,
|
||||
"fog": true,
|
||||
"color": 14327863,
|
||||
"lightPosition": {
|
||||
"x": -10,
|
||||
"y": 18,
|
||||
"z": 10
|
||||
},
|
||||
"skyLightPosition": {
|
||||
"x": 10,
|
||||
"y": 18,
|
||||
"z": -10
|
||||
},
|
||||
"lightShadowDarkness": 0.25,
|
||||
"ambientLightColor": 8939008
|
||||
},
|
||||
"preload": [
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/strokeblack.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/mana-piece-smoothed2.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/select-ring-undo.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/select-smoothed.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/mana.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "official",
|
||||
"title": "Official",
|
||||
"preload": [
|
||||
"image|/res/images/boardexp.png",
|
||||
"image|/res/images/manapieces.png"
|
||||
]
|
||||
}
|
||||
],
|
||||
"defaultOptions": {
|
||||
"sounds": true,
|
||||
"notation": false,
|
||||
"moves": true
|
||||
},
|
||||
"useNotation": true,
|
||||
"useShowMoves": true,
|
||||
"xdView": true
|
||||
}
|
||||
},
|
||||
"viewScripts": config_view_js
|
||||
}
|
||||
}
|
||||
|
||||
for(var name in mvs.views)
|
||||
if(mvs.views.hasOwnProperty(name)) {
|
||||
if(games[name]) {
|
||||
games[name].viewScripts = mvs.views[name].js;
|
||||
games[name].config.view = mvs.views[name];
|
||||
}
|
||||
}
|
||||
|
||||
exports.games = Object.keys(games).map((name)=>{
|
||||
return games[name];
|
||||
});
|
||||
]
|
||||
})()
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,216 +1,200 @@
|
|||
|
||||
var mvs = {
|
||||
"models": {
|
||||
"pensoc": {
|
||||
"plazza": "true",
|
||||
"title-en": "Penguin soccer",
|
||||
"module": "pensoc",
|
||||
"js": [
|
||||
"pensoc-model.js"
|
||||
],
|
||||
"gameOptions": {
|
||||
"levelOptions": {
|
||||
"distGoalFactor": 12,
|
||||
"distBallFactor": -1,
|
||||
"haveBallFactor": 3.2,
|
||||
"reachableFactor": 0.1,
|
||||
"ballReachableFactor": 3.4
|
||||
},
|
||||
"uctTransposition": "state"
|
||||
},
|
||||
"levels": [
|
||||
{
|
||||
"ai": "uct",
|
||||
"playoutDepth": 0,
|
||||
"minVisitsExpand": 1,
|
||||
"c": 0.63,
|
||||
"ignoreLeaf": false,
|
||||
"log": false,
|
||||
"uncertaintyFactor": 3,
|
||||
"name": "baby",
|
||||
"label": "Baby",
|
||||
"maxNodes": 2000
|
||||
},
|
||||
{
|
||||
"ai": "uct",
|
||||
"playoutDepth": 0,
|
||||
"minVisitsExpand": 1,
|
||||
"c": 0.63,
|
||||
"ignoreLeaf": false,
|
||||
"log": false,
|
||||
"uncertaintyFactor": 3,
|
||||
"name": "fast",
|
||||
"label": "Fast [1sec]",
|
||||
"maxDuration": 1,
|
||||
"isDefault": true
|
||||
},
|
||||
{
|
||||
"ai": "uct",
|
||||
"playoutDepth": 0,
|
||||
"minVisitsExpand": 1,
|
||||
"c": 0.63,
|
||||
"ignoreLeaf": false,
|
||||
"log": false,
|
||||
"uncertaintyFactor": 3,
|
||||
"name": "papa",
|
||||
"label": "Papa",
|
||||
"maxNodes": 10000
|
||||
},
|
||||
{
|
||||
"ai": "uct",
|
||||
"playoutDepth": 0,
|
||||
"minVisitsExpand": 1,
|
||||
"c": 0.63,
|
||||
"ignoreLeaf": false,
|
||||
"log": false,
|
||||
"uncertaintyFactor": 3,
|
||||
"name": "mama",
|
||||
"label": "Mama",
|
||||
"maxNodes": 10000
|
||||
}
|
||||
],
|
||||
"defaultLevel": 2,
|
||||
"summary": "Penguins playing soccer",
|
||||
"rules": {
|
||||
"en": "rules.html",
|
||||
"fr": "rules-fr.html"
|
||||
},
|
||||
"credits": {
|
||||
"en": "credits.html",
|
||||
"fr": "credits-fr.html"
|
||||
},
|
||||
"description": {
|
||||
"en": "description.html",
|
||||
"fr": "description-fr.html"
|
||||
},
|
||||
"thumbnail": "thumbnail.png",
|
||||
"strings": [],
|
||||
"debugEval": true
|
||||
}
|
||||
},
|
||||
"views": {
|
||||
"pensoc": {
|
||||
"title-en": "Penguin Soccer View",
|
||||
"module": "pensoc",
|
||||
"xdView": true,
|
||||
"js": [
|
||||
"pensoc-xd-view.js"
|
||||
],
|
||||
"visuals": {
|
||||
"600x600": [
|
||||
"res/visuals/pensoc-600x600-3d.jpg",
|
||||
"res/visuals/pensoc-600x600-2d.jpg"
|
||||
]
|
||||
},
|
||||
"css": [
|
||||
"pensoc.css"
|
||||
],
|
||||
"preferredRatio": 1.1638,
|
||||
"switchable": true,
|
||||
"useShowMoves": true,
|
||||
"useNotation": true,
|
||||
"animateSelfMoves": false,
|
||||
"sounds": {
|
||||
"turn": "turn",
|
||||
"slide": "slide",
|
||||
"kick": "kick",
|
||||
"getup0": "hoha",
|
||||
"getup1": "hehop",
|
||||
"slide0": "ouai",
|
||||
"slide1": "hoho1",
|
||||
"slide2": "hoho1",
|
||||
"slide3": "oula1",
|
||||
"slide4": "oula2",
|
||||
"haha": "hahaha",
|
||||
"goout": "hehehehe"
|
||||
},
|
||||
"skins": [
|
||||
{
|
||||
"name": "3dofficial",
|
||||
"title": "Official 3D",
|
||||
"3d": true,
|
||||
"camera": {
|
||||
"radius": 15,
|
||||
"limitCamMoves": true,
|
||||
"elevationMin": 0,
|
||||
"rotationAngle": 110
|
||||
},
|
||||
"world": {
|
||||
"skyLightIntensity": 0.2,
|
||||
"skyLightPosition": {
|
||||
"x": 24,
|
||||
"y": 24,
|
||||
"z": 5
|
||||
},
|
||||
"lightIntensity": 0.4,
|
||||
"lightPosition": {
|
||||
"x": -12,
|
||||
"y": 12,
|
||||
"z": 10
|
||||
},
|
||||
"lightShadowDarkness": 0.4,
|
||||
"fog": false,
|
||||
"color": 0
|
||||
},
|
||||
"preload": [
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/banquise4.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/goals3.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/arrow.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/ring-target.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/soccerball2.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/icecube1.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/iceberg-small.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/ocean.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/mama-animated.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/daddy-animated.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/baby-animated.js",
|
||||
"map|/res/xd-view/meshes/soccer-texture2.jpg",
|
||||
"map|/res/xd-view/meshes/mama-A-diffusex512.jpg",
|
||||
"map|/res/xd-view/meshes/mama-B-diffusex512.jpg",
|
||||
"map|/res/xd-view/meshes/daddy-A-diffusex512.jpg",
|
||||
"map|/res/xd-view/meshes/daddy-B-diffusex512.jpg",
|
||||
"map|/res/xd-view/meshes/baby-A-diffusex512.jpg",
|
||||
"map|/res/xd-view/meshes/baby-B-diffusex512.jpg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "official",
|
||||
"title": "Official 2D"
|
||||
}
|
||||
],
|
||||
"defaultOptions": {
|
||||
"sounds": true,
|
||||
"notation": false,
|
||||
"moves": true
|
||||
},
|
||||
"preloadImages": {
|
||||
"background": "res/images/ps-background.jpg",
|
||||
"sprites": "res/images/ps-images.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var games = {};
|
||||
|
||||
for(var name in mvs.models) {
|
||||
games[name] = {
|
||||
name: name,
|
||||
modelScripts: mvs.models[name].js,
|
||||
config: {
|
||||
status: true,
|
||||
model: mvs.models[name]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(var name in mvs.views) {
|
||||
if(games[name]) {
|
||||
games[name].viewScripts = mvs.views[name].js;
|
||||
games[name].config.view = mvs.views[name];
|
||||
}
|
||||
}
|
||||
|
||||
exports.games = Object.keys(games).map((name)=>{
|
||||
return games[name];
|
||||
});
|
||||
exports.games = (function() {
|
||||
var modelScripts = [
|
||||
"pensoc-model.js"
|
||||
]
|
||||
var config_view_js = [
|
||||
"pensoc-xd-view.js"
|
||||
]
|
||||
return [
|
||||
{
|
||||
"name": "pensoc",
|
||||
"modelScripts": modelScripts,
|
||||
"config": {
|
||||
"status": true,
|
||||
"model": {
|
||||
"title-en": "Penguin soccer",
|
||||
"summary": "Penguins playing soccer",
|
||||
"module": "pensoc",
|
||||
"js": modelScripts,
|
||||
"gameOptions": {
|
||||
"levelOptions": {
|
||||
"distGoalFactor": 12,
|
||||
"distBallFactor": -1,
|
||||
"haveBallFactor": 3.2,
|
||||
"reachableFactor": 0.1,
|
||||
"ballReachableFactor": 3.4
|
||||
},
|
||||
"uctTransposition": "state"
|
||||
},
|
||||
"levels": [
|
||||
{
|
||||
"name": "baby",
|
||||
"label": "Baby",
|
||||
"ai": "uct",
|
||||
"playoutDepth": 0,
|
||||
"minVisitsExpand": 1,
|
||||
"c": 0.63,
|
||||
"ignoreLeaf": false,
|
||||
"log": false,
|
||||
"uncertaintyFactor": 3,
|
||||
"maxNodes": 2000
|
||||
},
|
||||
{
|
||||
"name": "fast",
|
||||
"label": "Fast [1sec]",
|
||||
"log": false,
|
||||
"c": 0.63,
|
||||
"ignoreLeaf": false,
|
||||
"playoutDepth": 0,
|
||||
"uncertaintyFactor": 3,
|
||||
"ai": "uct",
|
||||
"minVisitsExpand": 1,
|
||||
"maxDuration": 1,
|
||||
"isDefault": true
|
||||
},
|
||||
{
|
||||
"name": "papa",
|
||||
"label": "Papa",
|
||||
"ai": "uct",
|
||||
"playoutDepth": 0,
|
||||
"minVisitsExpand": 1,
|
||||
"c": 0.63,
|
||||
"ignoreLeaf": false,
|
||||
"log": false,
|
||||
"uncertaintyFactor": 3,
|
||||
"maxNodes": 10000
|
||||
},
|
||||
{
|
||||
"name": "mama",
|
||||
"label": "Mama",
|
||||
"ai": "uct",
|
||||
"playoutDepth": 0,
|
||||
"minVisitsExpand": 1,
|
||||
"c": 0.63,
|
||||
"ignoreLeaf": false,
|
||||
"log": false,
|
||||
"uncertaintyFactor": 3,
|
||||
"maxNodes": 10000
|
||||
}
|
||||
],
|
||||
"defaultLevel": 2,
|
||||
"plazza": "true",
|
||||
"rules": {
|
||||
"en": "rules.html",
|
||||
"fr": "rules-fr.html"
|
||||
},
|
||||
"credits": {
|
||||
"en": "credits.html",
|
||||
"fr": "credits-fr.html"
|
||||
},
|
||||
"description": {
|
||||
"en": "description.html",
|
||||
"fr": "description-fr.html"
|
||||
},
|
||||
"thumbnail": "thumbnail.png",
|
||||
"strings": [
|
||||
],
|
||||
"debugEval": true
|
||||
},
|
||||
"view": {
|
||||
"title-en": "Penguin Soccer View",
|
||||
"preloadImages": {
|
||||
"background": "res/images/ps-background.jpg",
|
||||
"sprites": "res/images/ps-images.png"
|
||||
},
|
||||
"xdView": true,
|
||||
"js": config_view_js,
|
||||
"visuals": {
|
||||
"600x600": [
|
||||
"res/visuals/pensoc-600x600-3d.jpg",
|
||||
"res/visuals/pensoc-600x600-2d.jpg"
|
||||
]
|
||||
},
|
||||
"css": [
|
||||
"pensoc.css"
|
||||
],
|
||||
"preferredRatio": 1.1638,
|
||||
"module": "pensoc",
|
||||
"useShowMoves": true,
|
||||
"useNotation": true,
|
||||
"animateSelfMoves": false,
|
||||
"sounds": {
|
||||
"slide1": "hoho1",
|
||||
"turn": "turn",
|
||||
"kick": "kick",
|
||||
"getup0": "hoha",
|
||||
"getup1": "hehop",
|
||||
"slide0": "ouai",
|
||||
"slide": "slide",
|
||||
"slide2": "hoho1",
|
||||
"slide3": "oula1",
|
||||
"slide4": "oula2",
|
||||
"haha": "hahaha",
|
||||
"goout": "hehehehe"
|
||||
},
|
||||
"skins": [
|
||||
{
|
||||
"name": "3dofficial",
|
||||
"title": "Official 3D",
|
||||
"3d": true,
|
||||
"camera": {
|
||||
"radius": 15,
|
||||
"limitCamMoves": true,
|
||||
"elevationMin": 0,
|
||||
"rotationAngle": 110
|
||||
},
|
||||
"world": {
|
||||
"skyLightIntensity": 0.2,
|
||||
"skyLightPosition": {
|
||||
"x": 24,
|
||||
"y": 24,
|
||||
"z": 5
|
||||
},
|
||||
"lightIntensity": 0.4,
|
||||
"lightPosition": {
|
||||
"x": -12,
|
||||
"y": 12,
|
||||
"z": 10
|
||||
},
|
||||
"lightShadowDarkness": 0.4,
|
||||
"fog": false,
|
||||
"color": 0
|
||||
},
|
||||
"preload": [
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/banquise4.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/goals3.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/arrow.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/ring-target.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/soccerball2.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/icecube1.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/iceberg-small.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/ocean.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/mama-animated.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/daddy-animated.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/baby-animated.js",
|
||||
"map|/res/xd-view/meshes/soccer-texture2.jpg",
|
||||
"map|/res/xd-view/meshes/mama-A-diffusex512.jpg",
|
||||
"map|/res/xd-view/meshes/mama-B-diffusex512.jpg",
|
||||
"map|/res/xd-view/meshes/daddy-A-diffusex512.jpg",
|
||||
"map|/res/xd-view/meshes/daddy-B-diffusex512.jpg",
|
||||
"map|/res/xd-view/meshes/baby-A-diffusex512.jpg",
|
||||
"map|/res/xd-view/meshes/baby-B-diffusex512.jpg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "official",
|
||||
"title": "Official 2D"
|
||||
}
|
||||
],
|
||||
"defaultOptions": {
|
||||
"sounds": true,
|
||||
"notation": false,
|
||||
"moves": true
|
||||
},
|
||||
"switchable": true
|
||||
}
|
||||
},
|
||||
"viewScripts": config_view_js
|
||||
}
|
||||
]
|
||||
})()
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,234 +1,215 @@
|
|||
|
||||
var mvs = {
|
||||
"models": {
|
||||
"yohoho": {
|
||||
"plazza": "true",
|
||||
"title-en": "Yohoho!",
|
||||
"module": "yohoho",
|
||||
"js": [
|
||||
"hexbase-model.js",
|
||||
"yohoho-model.js"
|
||||
],
|
||||
"gameOptions": {
|
||||
"maxLines": 9,
|
||||
"maxCols": 17,
|
||||
"orientation": "onACorner",
|
||||
"boardLayout": [
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"c.c.c.c.c.c.c.c.c",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#"
|
||||
],
|
||||
"initial": {
|
||||
"a": [
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.C.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.p.p.c.r.c.p.p.#"
|
||||
],
|
||||
"b": [
|
||||
"#.p.p.c.r.c.p.p.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.C.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#"
|
||||
]
|
||||
},
|
||||
"maxNbCellsPerMove": 3,
|
||||
"margin": 1
|
||||
},
|
||||
"levels": [
|
||||
{
|
||||
"label": "Cabin boy",
|
||||
"potential": 1000,
|
||||
"isDefault": true,
|
||||
"maxDepth": 1,
|
||||
"moveCount": 12,
|
||||
"calRatio": 3.31
|
||||
},
|
||||
{
|
||||
"label": "Sailor",
|
||||
"potential": 4000,
|
||||
"maxDepth": 5,
|
||||
"moveCount": 15,
|
||||
"rowRaceLevel": 1,
|
||||
"calRatio": 25.16
|
||||
},
|
||||
{
|
||||
"label": "Officer",
|
||||
"potential": 20000,
|
||||
"maxDepth": 6,
|
||||
"moveCount": 20,
|
||||
"rowRaceLevel": 3,
|
||||
"calRatio": 126.18
|
||||
},
|
||||
{
|
||||
"label": "Captain",
|
||||
"potential": 40000,
|
||||
"maxDepth": 8,
|
||||
"moveCount": 25,
|
||||
"rowRaceLevel": 4,
|
||||
"calRatio": 130.51
|
||||
},
|
||||
{
|
||||
"label": "Admiral",
|
||||
"potential": 100000,
|
||||
"maxDepth": 8,
|
||||
"moveCount": 25,
|
||||
"rowRaceLevel": 4,
|
||||
"calRatio": 192.22
|
||||
}
|
||||
],
|
||||
"defaultLevel": 2,
|
||||
"summary": "Sea Battle over hexagons",
|
||||
"rules": {
|
||||
"en": "rules.html",
|
||||
"fr": "rules-fr.html"
|
||||
},
|
||||
"credits": {
|
||||
"en": "credits.html"
|
||||
},
|
||||
"description": {
|
||||
"en": "description.html"
|
||||
},
|
||||
"thumbnail": "yohoho-thumb3d.png"
|
||||
}
|
||||
},
|
||||
"views": {
|
||||
"yohoho": {
|
||||
"title-en": "Yohoho View",
|
||||
"module": "yohoho",
|
||||
"js": [
|
||||
"yohoho-xd-view.js"
|
||||
],
|
||||
"visuals": {
|
||||
"600x600": [
|
||||
"res/visuals/yohoho-600x600-3d.jpg",
|
||||
"res/visuals/yohoho-600x600-2d.jpg"
|
||||
]
|
||||
},
|
||||
"css": [
|
||||
"yohoho.css"
|
||||
],
|
||||
"switchable": true,
|
||||
"useShowMoves": true,
|
||||
"useNotation": true,
|
||||
"animateSelfMoves": false,
|
||||
"sounds": {
|
||||
"win": "yohoho_final",
|
||||
"loss": "yohoho_final_lose",
|
||||
"end": "yohoho_final",
|
||||
"assault": "yohoho_assault",
|
||||
"yohoho1": "yohoho1",
|
||||
"yohoho2": "yohoho2",
|
||||
"yohoho3": "yohoho3",
|
||||
"yohoho4": "yohoho4",
|
||||
"move": "yohoho_moveon"
|
||||
},
|
||||
"skins": [
|
||||
{
|
||||
"name": "cartoon3d",
|
||||
"title": "Cartoon (3D)",
|
||||
"3d": true,
|
||||
"camera": {
|
||||
"radius": 12,
|
||||
"limitCamMoves": true,
|
||||
"elevationMin": 0
|
||||
},
|
||||
"world": {
|
||||
"lightIntensity": 1,
|
||||
"skyLightIntensity": 0,
|
||||
"fog": false,
|
||||
"fogNear": 15,
|
||||
"fogFar": 80,
|
||||
"fogColor": "#ffffff"
|
||||
},
|
||||
"preload": [
|
||||
"image|/res/xd-view/meshes/baril-256.jpg",
|
||||
"image|/res/xd-view/meshes/explosion-256.png",
|
||||
"image|/res/xd-view/meshes/jarmada-admiral-pirate-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/jarmada-admiral-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/jarmada-admiral-voiles-pirate-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/jarmada-admiral-voiles-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/jarmada-frigate-pirate-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/jarmada-frigate-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/jarmada-gallion-pirate-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/jarmada-gallion-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/ocean-texture.jpg",
|
||||
"image|/res/xd-view/meshes/ocean-texture2.jpg",
|
||||
"image|/res/xd-view/meshes/palm-leaves-texture-512.png",
|
||||
"image|/res/xd-view/meshes/wood-texture.jpg",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/landscape-smoothed.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/jarmada-frigate.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/jarmada-gallion.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/jarmada-rock.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/jarmada-admiral.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "official",
|
||||
"title": "Official"
|
||||
},
|
||||
{
|
||||
"name": "stylized",
|
||||
"title": "Stylized"
|
||||
}
|
||||
],
|
||||
"boardBackgrounds": {
|
||||
"official": "oceanboard.jpg",
|
||||
"officialnosound": "oceanboard.jpg",
|
||||
"stylized": "winddirection.png",
|
||||
"basic": "winddirection.png",
|
||||
"stylizednosound": "winddirection.png",
|
||||
"basicnosound": "winddirection.png"
|
||||
},
|
||||
"defaultOptions": {
|
||||
"sounds": true,
|
||||
"notation": false,
|
||||
"moves": true
|
||||
},
|
||||
"preferredRatio": 1.1164274322169,
|
||||
"xdView": true
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var games = {};
|
||||
|
||||
for(var name in mvs.models)
|
||||
if(mvs.models.hasOwnProperty(name)) {
|
||||
games[name] = {
|
||||
name: name,
|
||||
modelScripts: mvs.models[name].js,
|
||||
config: {
|
||||
status: true,
|
||||
model: mvs.models[name]
|
||||
}
|
||||
exports.games = (function() {
|
||||
var modelScripts = [
|
||||
"hexbase-model.js",
|
||||
"yohoho-model.js"
|
||||
]
|
||||
var config_view_js = [
|
||||
"yohoho-xd-view.js"
|
||||
]
|
||||
return [
|
||||
{
|
||||
"name": "yohoho",
|
||||
"modelScripts": modelScripts,
|
||||
"config": {
|
||||
"status": true,
|
||||
"model": {
|
||||
"title-en": "Yohoho!",
|
||||
"summary": "Sea Battle over hexagons",
|
||||
"defaultLevel": 2,
|
||||
"js": modelScripts,
|
||||
"gameOptions": {
|
||||
"maxLines": 9,
|
||||
"maxCols": 17,
|
||||
"orientation": "onACorner",
|
||||
"boardLayout": [
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"c.c.c.c.c.c.c.c.c",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#"
|
||||
],
|
||||
"initial": {
|
||||
"a": [
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.C.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.p.p.c.r.c.p.p.#"
|
||||
],
|
||||
"b": [
|
||||
"#.p.p.c.r.c.p.p.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.C.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#",
|
||||
".#.#.#.#.#.#.#.#.",
|
||||
"#.#.#.#.#.#.#.#.#"
|
||||
]
|
||||
},
|
||||
"maxNbCellsPerMove": 3,
|
||||
"margin": 1
|
||||
},
|
||||
"levels": [
|
||||
{
|
||||
"label": "Cabin boy",
|
||||
"potential": 1000,
|
||||
"isDefault": true,
|
||||
"maxDepth": 1,
|
||||
"moveCount": 12,
|
||||
"calRatio": 3.31
|
||||
},
|
||||
{
|
||||
"label": "Sailor",
|
||||
"potential": 4000,
|
||||
"maxDepth": 5,
|
||||
"moveCount": 15,
|
||||
"rowRaceLevel": 1,
|
||||
"calRatio": 25.16
|
||||
},
|
||||
{
|
||||
"label": "Officer",
|
||||
"potential": 20000,
|
||||
"maxDepth": 6,
|
||||
"moveCount": 20,
|
||||
"rowRaceLevel": 3,
|
||||
"calRatio": 126.18
|
||||
},
|
||||
{
|
||||
"label": "Captain",
|
||||
"potential": 40000,
|
||||
"maxDepth": 8,
|
||||
"moveCount": 25,
|
||||
"rowRaceLevel": 4,
|
||||
"calRatio": 130.51
|
||||
},
|
||||
{
|
||||
"label": "Admiral",
|
||||
"potential": 100000,
|
||||
"maxDepth": 8,
|
||||
"moveCount": 25,
|
||||
"rowRaceLevel": 4,
|
||||
"calRatio": 192.22
|
||||
}
|
||||
],
|
||||
"plazza": "true",
|
||||
"module": "yohoho",
|
||||
"rules": {
|
||||
"en": "rules.html",
|
||||
"fr": "rules-fr.html"
|
||||
},
|
||||
"credits": {
|
||||
"en": "credits.html"
|
||||
},
|
||||
"description": {
|
||||
"en": "description.html"
|
||||
},
|
||||
"thumbnail": "yohoho-thumb3d.png"
|
||||
},
|
||||
"view": {
|
||||
"title-en": "Yohoho View",
|
||||
"xdView": true,
|
||||
"js": config_view_js,
|
||||
"visuals": {
|
||||
"600x600": [
|
||||
"res/visuals/yohoho-600x600-3d.jpg",
|
||||
"res/visuals/yohoho-600x600-2d.jpg"
|
||||
]
|
||||
},
|
||||
"css": [
|
||||
"yohoho.css"
|
||||
],
|
||||
"switchable": true,
|
||||
"useShowMoves": true,
|
||||
"module": "yohoho",
|
||||
"animateSelfMoves": false,
|
||||
"sounds": {
|
||||
"win": "yohoho_final",
|
||||
"loss": "yohoho_final_lose",
|
||||
"end": "yohoho_final",
|
||||
"assault": "yohoho_assault",
|
||||
"yohoho1": "yohoho1",
|
||||
"yohoho2": "yohoho2",
|
||||
"yohoho3": "yohoho3",
|
||||
"yohoho4": "yohoho4",
|
||||
"move": "yohoho_moveon"
|
||||
},
|
||||
"skins": [
|
||||
{
|
||||
"name": "cartoon3d",
|
||||
"title": "Cartoon (3D)",
|
||||
"3d": true,
|
||||
"camera": {
|
||||
"radius": 12,
|
||||
"limitCamMoves": true,
|
||||
"elevationMin": 0
|
||||
},
|
||||
"world": {
|
||||
"lightIntensity": 1,
|
||||
"skyLightIntensity": 0,
|
||||
"fog": false,
|
||||
"fogNear": 15,
|
||||
"fogFar": 80,
|
||||
"fogColor": "#ffffff"
|
||||
},
|
||||
"preload": [
|
||||
"image|/res/xd-view/meshes/baril-256.jpg",
|
||||
"image|/res/xd-view/meshes/explosion-256.png",
|
||||
"image|/res/xd-view/meshes/jarmada-admiral-pirate-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/jarmada-admiral-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/jarmada-admiral-voiles-pirate-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/jarmada-admiral-voiles-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/jarmada-frigate-pirate-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/jarmada-frigate-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/jarmada-gallion-pirate-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/jarmada-gallion-uvs-512.jpg",
|
||||
"image|/res/xd-view/meshes/ocean-texture.jpg",
|
||||
"image|/res/xd-view/meshes/ocean-texture2.jpg",
|
||||
"image|/res/xd-view/meshes/palm-leaves-texture-512.png",
|
||||
"image|/res/xd-view/meshes/wood-texture.jpg",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/landscape-smoothed.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/jarmada-frigate.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/jarmada-gallion.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/jarmada-rock.js",
|
||||
"smoothedfilegeo|0|/res/xd-view/meshes/jarmada-admiral.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "official",
|
||||
"title": "Official"
|
||||
},
|
||||
{
|
||||
"name": "stylized",
|
||||
"title": "Stylized"
|
||||
}
|
||||
],
|
||||
"boardBackgrounds": {
|
||||
"official": "oceanboard.jpg",
|
||||
"officialnosound": "oceanboard.jpg",
|
||||
"stylized": "winddirection.png",
|
||||
"basic": "winddirection.png",
|
||||
"stylizednosound": "winddirection.png",
|
||||
"basicnosound": "winddirection.png"
|
||||
},
|
||||
"defaultOptions": {
|
||||
"sounds": true,
|
||||
"notation": false,
|
||||
"moves": true
|
||||
},
|
||||
"preferredRatio": 1.1164274322169,
|
||||
"useNotation": true
|
||||
}
|
||||
},
|
||||
"viewScripts": config_view_js
|
||||
}
|
||||
}
|
||||
|
||||
for(var name in mvs.views)
|
||||
if(mvs.views.hasOwnProperty(name)) {
|
||||
if(games[name]) {
|
||||
games[name].viewScripts = mvs.views[name].js;
|
||||
games[name].config.view = mvs.views[name];
|
||||
}
|
||||
}
|
||||
|
||||
exports.games = Object.keys(games).map((name)=>{
|
||||
return games[name];
|
||||
});
|
||||
]
|
||||
})()
|
Loading…
Reference in a new issue