Skip to content

Instantly share code, notes, and snippets.

@Furkan-Gulsen
Created April 19, 2022 20:45
Show Gist options
  • Save Furkan-Gulsen/3624b90538916cf95cea4955e19e108f to your computer and use it in GitHub Desktop.
Save Furkan-Gulsen/3624b90538916cf95cea4955e19e108f to your computer and use it in GitHub Desktop.
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