fix: remove logs

This commit is contained in:
Mahdi Dibaiee 2015-12-19 14:35:02 +03:30
parent bccbd7acfe
commit eecc441cb2
3 changed files with 1 additions and 22 deletions

View File

@ -11,10 +11,6 @@ var _unit = require('./unit');
var _unit2 = _interopRequireDefault(_unit); var _unit2 = _interopRequireDefault(_unit);
var _fs = require('fs');
var _fs2 = _interopRequireDefault(_fs);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@ -23,14 +19,6 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var log = function log() {
for (var _len = arguments.length, strings = Array(_len), _key = 0; _key < _len; _key++) {
strings[_key] = arguments[_key];
}
_fs2.default.appendFileSync(__dirname + '/../log', strings.join(' ') + '\n');
};
var BULLET_SPEED = 10; var BULLET_SPEED = 10;
var Tank = (function (_Unit) { var Tank = (function (_Unit) {
@ -56,8 +44,6 @@ var Tank = (function (_Unit) {
bullet.go(this.x + 2, this.y - 2); bullet.go(this.x + 2, this.y - 2);
bullet.velocity = this.normalize(); bullet.velocity = this.normalize();
log(this.angle, '(' + this._angle + ') =', bullet.velocity.join(','));
this.bullets.push(bullet); this.bullets.push(bullet);
} }
}, { }, {

View File

@ -1,6 +1,6 @@
{ {
"name": "node-games", "name": "node-games",
"version": "3.0.0", "version": "3.0.1",
"description": "Simple node console games", "description": "Simple node console games",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -1,9 +1,4 @@
import Unit from './unit'; import Unit from './unit';
import fs from 'fs';
let log = (...strings) => {
fs.appendFileSync(__dirname + '/../log', strings.join(' ') + '\n');
}
const BULLET_SPEED = 10; const BULLET_SPEED = 10;
@ -34,8 +29,6 @@ export default class Tank extends Unit {
bullet.go(this.x + 2, this.y - 2); bullet.go(this.x + 2, this.y - 2);
bullet.velocity = this.normalize(); bullet.velocity = this.normalize();
log(this.angle, '(' + this._angle + ') =', bullet.velocity.join(','));
this.bullets.push(bullet); this.bullets.push(bullet);
} }