Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.01 KB | None | 0 0
  1. import java.io.*;
  2. public class GameOfDivisors {
  3.     public static void main(String[] args) throws IOException{
  4.         BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
  5.         int one = 0, two = 0, three = 0;
  6.         int combo;
  7.         System.out.println ("Welcome to the Game of Divisors!");
  8.         System.out.println ("You can choose to play vs pc or 2 players");
  9.         System.out.println ("Enter '1' to play against the pc, enter '2' for two players and enter '3' to exit");
  10.         combo = Integer.parseInt(br.readLine());
  11.         while (combo != 3 )  {
  12.             switch (gameMode) {
  13.             case 1:
  14.                 one++;
  15.                 break;
  16.             case 2:
  17.                 two++;
  18.                 break;
  19.             case 3:
  20.                 three ++;
  21.                 break;
  22.             default:
  23.                 System.out.println ("Sorry not an option.");
  24.                 break;
  25.             }
  26.             System.out.println ("Enter '1' to play against the pc, enter '2' for two players and enter '3' to exit");
  27.             combo = Integer.parseInt(br.readLine());;
  28.         }
  29.         System.out.println("You have chosen " x "if this is incorrect, enter the preffered option again");
  30.  
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement