src/app/script.js
/**
   * Initializes node creation at a random point on the screen.
   * @param {number} key key value
   */
Initializes node creation at a random point on the screen.
@param {number} key key value
Initializes node creation at a random point on the screen . @param { number } key key value
insert(key) {
    if (this.verticies[key] === undefined) {
      const x = Math.floor(Math.random() * this.app.screen.width);
      const y = Math.floor(Math.random() * this.app.screen.height);
      this.verticies[key] = this.createShip(key, x, y);
    }
  }
insert ( key ) { if ( this . verticies [ key ] === undefined ) { const x = Math . floor ( Math . random ( ) * this . app . screen . width ) ; const y = Math . floor ( Math . random ( ) * this . app . screen . height ) ; this . verticies [ key ] = this . createShip ( key , x , y ) ; } }
Initializes node creation at a random point on the screen.
Initializes node creation at a random point on the screen .