X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=server%2Fmodels%2FVariant.js;h=ae417932c31d0dfe9f10de5af57cb4bf0ebfed8f;hp=233d938bfc4b2892ba9242d2b0701d32d831b087;hb=98db2082fd31e7a7bc0348e31ce119f39dbc31b3;hpb=98f3902b0f3c4370b07d534f5fcbca146a7a651d diff --git a/server/models/Variant.js b/server/models/Variant.js index 233d938b..ae417932 100644 --- a/server/models/Variant.js +++ b/server/models/Variant.js @@ -9,6 +9,29 @@ var db = require("../utils/database"); const VariantModel = { + // This is duplicated in client. TODO: really required here? + NbPlayers: + { + "Alice": [2,3,4], + "Antiking": [2,3,4], + "Atomic": [2,3,4], + "Baroque": [2,3,4], + "Berolina": [2,4], + "Checkered": [2,3,4], + "Chess960": [2,3,4], + "Crazyhouse": [2,3,4], + "Dark": [2,3,4], + "Extinction": [2,3,4], + "Grand": [2], + "Losers": [2,3,4], + "Magnetic": [2], + "Marseille": [2], + "Switching": [2,3,4], + "Upsidedown": [2], + "Wildebeest": [2], + "Zen": [2,3,4], + }, + getByName: function(name, callback) { db.serialize(function() {