Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package codzombie;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- int punti = 5000;
- Giocatore Nikolai = new Giocatore(punti);
- Giocatore Takeo, Dempsey, Richtofen = new Giocatore(punti);
- try {
- System.out.println("Fare un giro di cassa? [y/n]"); // Giro?
- if (in.nextLine().charAt(0) == 'y') { // Risposta affermativa
- while (Nikolai.ControllaPunti(punti)) { // Se ci sono 950 punti o di più
- Nikolai.GiroDiCassa(punti); // Nikolai fa un giro di cassa
- Nikolai.Commento(); // Nikolai commenta l'arma uscita
- Nikolai.GetInfo(); // Resoconto dei punti rimasti
- // Chiede all'utente se vuole fare un altro giro
- System.out.println("\nUn altro giro di cassa?");
- if (in.nextLine().charAt(0) == 'n') {
- break;
- }
- }
- System.out.println("\nNon hai abbastanza punti.");
- }
- } catch (Exception error) {
- System.out.println("ERRORE");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment