I'm struggling to understand what I am missing here:
FILE: Sprite.js
function Sprite() {
}
Sprite.prototype.move = function () {
}
module.exports = Sprite;
FILE: Ship.js
function Ship() {
}
Ship.prototype = new Sprite();
Ship.prototype.enable = function() {
}
FILE: Server.js
var util = require('util'),
io = require('socket.io'),
Sprite = require('./sprite.js'),
Ship = require('./ship.js');
var boo = new Ship(Sprite);
Outside of Node.js this works fine. In Node.js however it won't recognise Sprite in the ship file. I've tried using module.export = Sprite at the end of the sprite file with no success.
Cheers