function start(objV, player, opPlayer) {
    while (objV[player].shipCount > 0 && objV[opPlayer].shipCount > 0) {
      const attack = strike(objV, player, opPlayer);
      if (attack === false) {
        attack = strike(objV, opPlayer, player);
      } 
    }
    if (objV[player].shipCount === 0) {
      winner = objV[opPlayer].name;
    } else {
      if (objV[opPlayer].shipCount === 0) {
        winner = objV[player].name;
      }
      return winner;
  }
}
//4. create function to start gameplay
4. create function to start gameplay
4 . create function to start gameplay
function start(objV, player, opPlayer) {
    while (objV[player].shipCount > 0 && objV[opPlayer].shipCount > 0) {
      const attack = strike(objV, player, opPlayer);
      if (attack === false) {
        attack = strike(objV, opPlayer, player);
      } 
    }
    if (objV[player].shipCount === 0) {
      winner = objV[opPlayer].name;
    } else {
      if (objV[opPlayer].shipCount === 0) {
        winner = objV[player].name;
      }
      return winner;
  }
}
function start ( objV , player , opPlayer ) { while ( objV [ player ] . shipCount > 0 && objV [ opPlayer ] . shipCount > 0 ) { const attack = strike ( objV , player , opPlayer ) ; if ( attack === false ) { attack = strike ( objV , opPlayer , player ) ; } } if ( objV [ player ] . shipCount === 0 ) { winner = objV [ opPlayer ] . name ; } else { if ( objV [ opPlayer ] . shipCount === 0 ) { winner = objV [ player ] . name ; } return winner ; } }
4. create function to start gameplay
4 . create function to start gameplay