/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package tarottarottarot; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Random; /** * * @author Derek */ public class TarotTarotTarot { public static void main(String[] args) throws IOException { deck top = new deck(); int valence = 1; while (valence == 1){ System.out.println(" [0] QUIT" + "\n [1] DRAW FATE"); top.numericChoice = top.setProfile(); if(top.numericChoice ==0){valence = 0; }else if(top.numericChoice ==1){ top.hotc(3); valence = 1; } } } } class deck{ public int total = 22; public int fin = 0; public int pos; public int[] u = new int[44]; public deck(){ for(int i = 0; i < this.total; i++){ this.u[i] = 0; } this.pos = 0; } public void shuffle(){ for(int i = 0; i < this.total; i++){ this.u[i] = 0; } this.pos = 0; this.fin = 0; } public void hotc(int r){ System.out.println("=================================================="); for(int i = 0; i < r; i++){ this.pos = this.rnJesus(21); int p = 1; while(p == 1){ if(this.u[this.pos] < 1){ System.out.println(this.printer(this.pos)); int coin = this.rnJesus(1); if(coin == 1){ System.out.println(" --- : INVERTED"); } this.u[this.pos]=1;p=0;this.fin++; if(this.fin == this.total){} } this.shuffle(); } } System.out.println("=================================================="); } public String printer(int r){ String p = ""; switch(r){ case 0 :p="The Fool";break; case 1 :p="The World";break; case 2 :p="Judgement";break; case 3 :p="The Sun";break; case 4 :p="Justice";break; case 5 :p="Wheel of Fortune";break; case 6 :p="The Moon";break; case 7 :p="The Star";break; case 8 :p="The Tower";break; case 9 :p="The Devil";break; case 10:p="Temperance";break; case 11:p="Death";break; case 12:p="The Hanged Man";break; case 13:p="The Hermit";break; case 14:p="The Lovers";break; case 15:p="Strength";break; case 16:p="The Chariot";break; case 17:p="The Hierophant";break; case 18:p="The Emperor";break; case 19:p="The Empress";break; case 20:p="The High Priestess";break; case 21:p="The Magician";break; } switch(r){ case 0 :p=p+":\n Beginnings, Mistakes, Journeys, Disconcern";break; case 1 :p=p+":\n Encompassing, Nurturing, Interconnection";break; case 2 :p=p+":\n Law, Punishment, Argument, Righteousness";break; case 3 :p=p+":\n Heat, Light, Worship, Day, Revelation";break; case 4 :p=p+":\n Come-uppance, Karma, Anger, Injustice";break; case 5 :p=p+":\n Randomness, Absurdism, Meaningless, Reward";break; case 6 :p=p+":\n Women, Nature, Sanctity, Quiet, Reflection";break; case 7 :p=p+":\n Finding, Searching, Prophecy, Warning";break; case 8 :p=p+":\n Seclusion, Secrecy, Construction, Tradition";break; case 9 :p=p+":\n Adversary, Evil, Malevolence, Faustian Bargains";break; case 10:p=p+":\n Reproach, Abstainment, Asceticism, Inner-Strength";break; case 11:p=p+":\n Death, that's it";break; case 12:p=p+":\n Trial, The After-life, Absolvement, Guilt";break; case 13:p=p+":\n Knowledge, Loneliness, Reclusion, Nature";break; case 14:p=p+":\n Love, Jealousy, Empathy, Kindness";break; case 15:p=p+":\n Physicality, Well-Being, Contest, Supremacy";break; case 16:p=p+":\n Play, Challenge, Victory, Revolution";break; case 17:p=p+":\n Divinity, Authority, Answers, Promotions";break; case 18:p=p+":\n Worship, Fealty, Cruelty, Selfishness";break; case 19:p=p+":\n Children, Birth, Lineage, Beneficence";break; case 20:p=p+":\n Deduction, Introspection, Religion, Lines";break; case 21:p=p+":\n Secrets, Mysticism, Impression, Charisma";break; } return p; } /////////////////////////////////////////////////////////////////////////////// public String name; public String species; public int numericChoice; public int setProfile()throws IOException{ try { BufferedReader lineReader = new BufferedReader (new InputStreamReader(System.in)); numericChoice = Integer.parseInt(lineReader.readLine()); } catch (IOException e) { System.out.println("THIS ISN'T A NUMBER: " + e.getMessage()); } catch (NumberFormatException e) { System.out.println("THIS ISN'T A NUMBER: " + e.getMessage()); } return numericChoice;} ///////////////---The God int that all must bow to!---////////////////// ////////////////////////////////////////////////////////////////////////////// public String wordChoice; public String mouthSounds()throws IOException{ String words = ""; try { BufferedReader lineReader = new BufferedReader (new InputStreamReader(System.in)); words = lineReader.readLine(); } catch (IOException e) { } return words;} ////////////----=====These work together--------======////////////////// public int rnJesus(int n){ Random rand = new Random(); int randnum = rand.nextInt(); randnum = rand.nextInt(n+1); return randnum; }///////////input a number and generate a random integer between [0] and [n] public void soupLine(int r) throws InterruptedException{ r = r * 100; Thread.sleep(r); } }