Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Test
- {
- public static void main(String[] args) {
- int amount;
- Card card1 = new Card(500, 1000, 1);
- Card card2 = new Card(200, 700, 2);
- Game game = new Game();
- Terminal term = new Terminal();
- System.out.println("What do you want to do? Pick a number");
- System.out.println("1. Buy Credits\n2. Play a game\n3. Go to Terminal\n*********************************" );
- Scanner in = new Scanner (System.in);
- int act = in.nextInt();
- if (act == 1){
- System.out.println("Pick which card you want to load credits with: \n1. Card 1\n2. Card 2\n*********************************");
- int cardPick = in.nextInt();
- if (cardPick == 1){
- System.out.println("Enter amount of credits: \n*********************************");
- amount = in.nextInt();
- card1.buyCredits(amount);
- System.out.println("Credit balance is : " + card1.getCB() + "\n*********************************");
- main(null);
- }else if (cardPick == 2){
- System.out.println("Enter amount of credits: ");
- amount = in.nextInt();
- card2.buyCredits(amount);
- System.out.println("Credit balance is : " + card2.getCB() + "\n*********************************");
- main(null);
- }else{
- System.out.println("SYSTEM ERROR");
- }
- }else if (act == 2){
- game.Begin();
- }else if (act == 3){
- term.Terminal();
- }else{
- System.out.println("SYSTEM ERROR");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement