Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.2 kB
1
Indexable
Never
import java.util.Scanner;

public class Main
{
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		
		System.out.print("Unesite ime prvog igraca: ");
		String player1 = scanner.nextLine();
		System.out.print("Unesite ime drugog igraca: ");
		String player2 = scanner.nextLine();
		
		//initializing player points
		int player1points = 0;
		int player2points = 0;
		
		int turns = 15;
		
		for(int i = 0; i < turns; i++) {
		    System.out.printf("%s: %d poena\n", player1, player1points);
		    System.out.printf("%s: %d poena\n", player2, player2points);
		    System.out.print("Pritisnite enter za novo gadjanje: ");
		    
		}
		
		
	}
	
	static void points() {
	    boolean miss = (Math.random() < 0.3);
	    
	    if (!miss) {
	        int points = (int) (Math.random() * 20) + 1;
            double multiplier;
            double chance = Math.random();
            
            if (chance < 0.2) {
                 multiplier = 3.0;
            } else if (chance < 0.5) {
                multiplier = 2.0;
            } else {
                multiplier = 1.0;
        }
            System.out.println("")
            points *= multiplier;

	    } 
	}
}