mirror of
https://github.com/exane/not-gwent-online
synced 2025-09-22 14:49:06 +00:00
add more stuff
This commit is contained in:
43
public/js/Gwent.js
Normal file
43
public/js/Gwent.js
Normal file
@@ -0,0 +1,43 @@
|
||||
var io = require("socket.io-client")("http://localhost:16918");
|
||||
var Backbone = require("backbone");
|
||||
var Player = require("./Player");
|
||||
|
||||
|
||||
|
||||
|
||||
var Gwent = (function(){
|
||||
var Gwent = function(){
|
||||
if(!(this instanceof Gwent)){
|
||||
return (new Gwent());
|
||||
}
|
||||
/**
|
||||
* constructor here
|
||||
*/
|
||||
|
||||
|
||||
|
||||
};
|
||||
var r = Gwent.prototype;
|
||||
/**
|
||||
* methods && properties here
|
||||
* r.property = null;
|
||||
* r.getProperty = function() {...}
|
||||
*/
|
||||
r.view = null;
|
||||
r.enemy = null;
|
||||
r.player = null;
|
||||
|
||||
r._view = function() {
|
||||
|
||||
}
|
||||
|
||||
r.init = function() {
|
||||
this.player = Backbone.Model.extend({});
|
||||
this.enemy = Backbone.Model.extend({});
|
||||
}
|
||||
|
||||
|
||||
return Gwent;
|
||||
})();
|
||||
|
||||
module.exports = Gwent;
|
23
public/js/Player.js
Normal file
23
public/js/Player.js
Normal file
@@ -0,0 +1,23 @@
|
||||
var Player = (function(){
|
||||
var Player = function(){
|
||||
if(!(this instanceof Player)){
|
||||
return (new Player());
|
||||
}
|
||||
/**
|
||||
* constructor here
|
||||
*/
|
||||
|
||||
|
||||
};
|
||||
var r = Player.prototype;
|
||||
/**
|
||||
* methods && properties here
|
||||
* r.property = null;
|
||||
* r.getProperty = function() {...}
|
||||
*/
|
||||
|
||||
|
||||
return Player;
|
||||
})();
|
||||
|
||||
module.exports = Player;
|
@@ -1,3 +1,7 @@
|
||||
|
||||
var Gwent = require("./Gwent");
|
||||
|
||||
(function main(){
|
||||
var gwent = Gwent();
|
||||
|
||||
})();
|
||||
|
Reference in New Issue
Block a user