Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- public class GameOfDivisors {
- public static void main(String[] args) throws IOException{
- BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
- int one = 0, two = 0, three = 0;
- int combo;
- System.out.println ("Welcome to the Game of Divisors!");
- System.out.println ("You can choose to play vs pc or 2 players");
- System.out.println ("Enter '1' to play against the pc, enter '2' for two players and enter '3' to exit");
- combo = Integer.parseInt(br.readLine());
- while (combo != 3 ) {
- switch (gameMode) {
- case 1:
- one++;
- break;
- case 2:
- two++;
- break;
- case 3:
- three ++;
- break;
- default:
- System.out.println ("Sorry not an option.");
- break;
- }
- System.out.println ("Enter '1' to play against the pc, enter '2' for two players and enter '3' to exit");
- combo = Integer.parseInt(br.readLine());;
- }
- System.out.println("You have chosen " x "if this is incorrect, enter the preffered option again");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement