1
0
mirror of https://github.com/exane/not-gwent-online synced 2024-10-31 10:36:53 +00:00
not-gwent-online/server/CardManager.js
2015-06-30 12:11:50 +02:00

31 lines
560 B
JavaScript

var Card = require("./Card");
var CardManager = (function(){
var CardManager = function(){
if(!(this instanceof CardManager)){
return (new CardManager());
}
/**
* constructor here
*/
this._id = 0;
};
var r = CardManager.prototype;
/**
* methods && properties here
* r.property = null;
* r.getProperty = function() {...}
*/
r._id = null;
r.create = function(key, owner) {
return this._cards[this._id] = Card(key, owner, this._id++);
}
return CardManager;
})();
module.exports = CardManager;