Created
April 19, 2022 20:45
-
-
Save Furkan-Gulsen/3624b90538916cf95cea4955e19e108f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Giris; | |
import java.lang.Math; | |
public class Main { | |
public static void main(String[] args) { | |
Fighter marc = new Fighter("Marc" , 15 , 100, 90, 0); | |
Fighter alex = new Fighter("Alex" , 10 , 95, 100, 0); | |
boolean status = firstFightIsMarc(); | |
Ring r; | |
if(status) { | |
r = new Ring(marc,alex , 90 , 100); | |
}else { | |
r = new Ring(alex,marc , 90 , 100); | |
} | |
r.run(); | |
} | |
public static boolean firstFightIsMarc() { | |
double random = Math.random(); | |
if(random > 0.5) { | |
return true; | |
}else { | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment