Skip to content

Conversation

@murtagh27
Copy link
Owner

3 jelzett hiba kijavitasa

@murtagh27 murtagh27 requested a review from niki1515 October 10, 2023 12:57
@murtagh27 murtagh27 self-assigned this Oct 10, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Collaborator

@niki1515 niki1515 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mind a harom hiba jol lett kijavitva

public class TorpedoStore {

//random letrhozasa
Random generator = new Random();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ez jo

public boolean fire(int numberOfTorpedos){
if(numberOfTorpedos < 1 || numberOfTorpedos > this.torpedoCount){
new IllegalArgumentException("numberOfTorpedos");
throw new IllegalArgumentException("numberOfTorpedos");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ez is jo

if (r >= FAILURE_RATE) {
// successful firing
this.torpedoCount =- numberOfTorpedos;
this.torpedoCount = -numberOfTorpedos;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

es ez is jo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants