receiveAttack(coordinates){
		/* Check every ship coordinates */
		for(let shipIter = 0; shipIter < this.ships.length; shipIter++){
			for(let coord = 0; coord < this.ships[shipIter].position.length; coord++){
				if(coordinates === this.ships[shipIter].position[coord]){
					/* Track hits */
					/* Forgot to called the damn hit method on the ship */
					this.ships[shipIter].hit(coordinates);
					this.hits.push(coordinates);
					return 'X';
				}
			}
		}
		/* Track missed hits */
		this.missedHits.push(coordinates);
		return '/';
	}
/* To receive an attack from the oponent we need to check wheter the
	 * position is empty or has a ship in it. */
To receive an attack from the oponent we need to check wheter the
position is empty or has a ship in it.
To receive an attack from the oponent we need to check wheter the position is empty or has a ship in it .
receiveAttack(coordinates){
		for(let shipIter = 0; shipIter < this.ships.length; shipIter++){
			for(let coord = 0; coord < this.ships[shipIter].position.length; coord++){
				if(coordinates === this.ships[shipIter].position[coord]){
					this.ships[shipIter].hit(coordinates);
					this.hits.push(coordinates);
					return 'X';
				}
			}
		}
		this.missedHits.push(coordinates);
		return '/';
	}
receiveAttack ( coordinates ) { for ( let shipIter = 0 ; shipIter < this . ships . length ; shipIter ++ ) { for ( let coord = 0 ; coord < this . ships [ shipIter ] . position . length ; coord ++ ) { if ( coordinates === this . ships [ shipIter ] . position [ coord ] ) { this . ships [ shipIter ] . hit ( coordinates ) ; this . hits . push ( coordinates ) ; return 'X' ; } } } this . missedHits . push ( coordinates ) ; return '/' ; }
To receive an attack from the oponent we need to check wheter the
 position is empty or has a ship in it.
To receive an attack from the oponent we need to check wheter the position is empty or has a ship in it .
/* Check every ship coordinates */ /* Track hits */ /* Forgot to called the damn hit method on the ship */ /* Track missed hits */