mirror of
https://github.com/exane/not-gwent-online
synced 2024-11-23 19:36:53 +00:00
33 lines
601 B
JavaScript
33 lines
601 B
JavaScript
var Card = require("./Card");
|
|
|
|
var CardManager = (function(){
|
|
var CardManager = function(){
|
|
if(!(this instanceof CardManager)){
|
|
return (new CardManager());
|
|
}
|
|
/**
|
|
* constructor here
|
|
*/
|
|
|
|
this._id = 0;
|
|
this._cards = {};
|
|
};
|
|
var r = CardManager.prototype;
|
|
/**
|
|
* methods && properties here
|
|
* r.property = null;
|
|
* r.getProperty = function() {...}
|
|
*/
|
|
|
|
r._id = null;
|
|
r._cards = null;
|
|
|
|
r.create = function(key, owner) {
|
|
return this._cards[this._id] = Card(key, owner, this._id++);
|
|
}
|
|
|
|
|
|
return CardManager;
|
|
})();
|
|
|
|
module.exports = CardManager; |