From eecc441cb2dd59cddedfe6f5dced7d66950e1da3 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Sat, 19 Dec 2015 14:35:02 +0330 Subject: [PATCH] fix: remove logs --- build/classes/tank.js | 14 -------------- package.json | 2 +- src/classes/tank.js | 7 ------- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/build/classes/tank.js b/build/classes/tank.js index 999e86d..6ff327d 100644 --- a/build/classes/tank.js +++ b/build/classes/tank.js @@ -11,10 +11,6 @@ var _unit = require('./unit'); var _unit2 = _interopRequireDefault(_unit); -var _fs = require('fs'); - -var _fs2 = _interopRequireDefault(_fs); - 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"); } } @@ -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; } -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 Tank = (function (_Unit) { @@ -56,8 +44,6 @@ var Tank = (function (_Unit) { bullet.go(this.x + 2, this.y - 2); bullet.velocity = this.normalize(); - log(this.angle, '(' + this._angle + ') =', bullet.velocity.join(',')); - this.bullets.push(bullet); } }, { diff --git a/package.json b/package.json index 562fc9e..f66c53b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-games", - "version": "3.0.0", + "version": "3.0.1", "description": "Simple node console games", "main": "index.js", "scripts": { diff --git a/src/classes/tank.js b/src/classes/tank.js index e642300..c0cc259 100644 --- a/src/classes/tank.js +++ b/src/classes/tank.js @@ -1,9 +1,4 @@ import Unit from './unit'; -import fs from 'fs'; - -let log = (...strings) => { - fs.appendFileSync(__dirname + '/../log', strings.join(' ') + '\n'); -} const BULLET_SPEED = 10; @@ -34,8 +29,6 @@ export default class Tank extends Unit { bullet.go(this.x + 2, this.y - 2); bullet.velocity = this.normalize(); - log(this.angle, '(' + this._angle + ') =', bullet.velocity.join(',')); - this.bullets.push(bullet); }