Advertisement
far_light

Main.java

Nov 15th, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. package com.vladislav;
  2.  
  3. import javax.swing.*;
  4. // Main class in game. He contain main method.
  5. public class Main {
  6.  
  7.     // Main method run application
  8.     public static void main(String[] args) {
  9.         // Enter hard
  10.         String hard = JOptionPane.showInputDialog(null,
  11.                 "Enter hard from 1 to 7:",
  12.                 "Game hard");
  13.  
  14.         int compelexity = hard.charAt(0) - '0';
  15.         if (compelexity >= 1 && compelexity <= 7)
  16.             new Window(compelexity);
  17.         else
  18.             System.out.print("Error on entering game's hard!");
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement