Jump to content

Fascism

Member
  • Content count

    287
  • Joined

  • Last visited

  1. Fascism

    signatures

    [quote name='Sethy']sometimes i do lsd as well[/QUOTE] I'm on DSL internet as we speak
  2. [quote name='Lacero']So just about finished my first java program ever, and i basically made a virtual dicer based off of RS's 60x2 game using Eclipse, i just want some criticism on how its written, what could i have done better? Are there easier/cleaner ways of doing what i have done? etc etc. i am really really new to java. insight welcome! [COLOR="#FF0000"]YOU CAN C&P THIS TO ECLIPSE TO SEE HOW IT RUNS[/COLOR] Picture of a session: [IMG]http://i60.tinypic.com/2ykdxte.png[/IMG] [code]package Data; import java.util.Random; import java.util.Scanner; public class Dicing { public static Scanner scan; public static Random rand; public static int Money, bet, roll, cash, betConfirm, betorquit,betorquit2,betorquit3,betorquit4, reroll, reroll2; public static void main(String args[]){ scan = new Scanner(System.in); rand = new Random(); Money = 1000; System.out.println(" || You have been given "+Money+" Dollars to start. ||"); System.out.println(" || Press B to place a Bet || Press E to Exit ||"); String playerBetorExit; playerBetorExit = scan.nextLine(); if(playerBetorExit.equalsIgnoreCase("b")){ placeBet1(); } if(playerBetorExit.equalsIgnoreCase("e")){ System.out.println(" || Player Quit.. || CASH : "+Money+". ||"); } } public static void placeBet1(){ System.out.println(" || RULES : || If you Roll 60 or lower you will LOSE your bet || If you Roll a 60, you get a Reroll || "); System.out.println(" || If you Roll above 60 you win DOUBLE your bet ||"); System.out.println(" || STARTING CASH : "+Money+" || How much do you want to bet? ||"); bet = scan.nextInt(); if(bet > Money){ System.out.println("You only have "+Money+" Dollars!"); placeBet1(); } else { System.out.println(" || Are you sure you want to bet "+bet+"? || Press 1 for Yes || Press 2 for No ||"); betConfirm = scan.nextInt(); if(betConfirm == 1){ roll(); } if(betConfirm == 2){ placeBet1(); } } } public static void placebet2(){ System.out.println("CASH : "+cash+" || How much do you want to bet?"); bet = scan.nextInt(); if(bet > cash){ System.out.println("You only have "+cash+" Dollars!"); placebet2(); } if(bet <= cash){ System.out.println(" || Are you sure you want to bet "+bet+"? || Press 1 for Yes || Press 2 for No ||"); betConfirm = scan.nextInt(); if(betConfirm == 1){ roll2(); } if(betConfirm == 2){ placeBet1(); } } } public static void roll() { System.out.println("Rolling.."); roll = rand.nextInt(101); System.out.println("Your roll is "+roll+"..."); winLoss(); } public static void roll2(){ System.out.println("Rolling.."); roll = rand.nextInt(101); System.out.println("Your roll is "+roll+"..."); winLoss2(); } public static void winLoss() { if(roll < 60){ // handles losing cash = Money - bet; System.out.println("You have lost your bet."); System.out.println(" || Balance : "+cash+". ||"); System.out.println(" || Press 1 to place a new bet || Press 2 to quit ||"); betorquit = scan.nextInt(); if(betorquit == 1 && cash > 0){ placebet2(); } else { System.out.println(" || You have went bankrupt ||"); endGame(); } if(betorquit == 2){ System.out.println(" || Player Quit.. || Cash : "+cash+". ||"); endGame(); } } if(roll == 60){ // handles tie System.out.println("Tie! || Would you like to ReRoll? || Press 1 to Reroll || Press 2 to place a New Bet and recieve Refund"); reroll = scan.nextInt(); if(reroll == 1){ roll(); } if(reroll == 2){ System.out.println("You have been refunded..."); cash = Money + bet; placebet2(); } } if(roll > 60){ //handles winning cash = Money + bet*2 - bet; System.out.println(" || You won with a "+roll+". || You now have "+cash+" Dollars! ||"); System.out.println(" || Press 1 to place a new bet || Press 2 to quit ||"); betorquit2 = scan.nextInt(); if(betorquit2 == 1 && cash > 0){ placebet2(); } else { System.out.println(" || You have went bankrupt ||"); endGame(); } if(betorquit2 == 2){ System.out.println(" || Player Quit. || Balance : "+cash+". ||"); endGame(); } } } public static void winLoss2(){ if(roll < 60){ // handles losing cash = cash - bet; System.out.println("You have lost your bet."); System.out.println(" || Balance : "+cash+". ||"); System.out.println(" || Press 1 to place a new bet || Press 2 to quit ||"); betorquit3 = scan.nextInt(); if(betorquit3 == 1 && cash > 0){ placebet2(); } else { System.out.println(" || You have went bankrupt ||"); endGame(); } if(betorquit3 == 2){ System.out.println(" || Player Quit. || Balance : "+cash+". ||"); endGame(); } } if(roll == 60){ // handles tie System.out.println("Tie! || Would you like to ReRoll? || Press 1 to Reroll || Press 2 to place a New Bet and recieve Refund"); reroll2 = scan.nextInt(); if(reroll2 == 1){ roll(); } if(reroll2 == 2){ System.out.println("You have been refunded..."); cash = cash + bet; placebet2(); } } if(roll > 60){ //handles winning cash = cash + bet*2 - bet; System.out.println(" || You won with a "+roll+". || You now have "+cash+" Dollars! ||"); System.out.println(" || Press 1 to place a new bet || Press 2 to quit ||"); betorquit4 = scan.nextInt(); if(betorquit4 == 1 && cash > 0){ placebet2(); } else { System.out.println(" || You have went bankrupt ||"); endGame(); } if(betorquit4 == 2){ System.out.println(" || Player Quit. || Balance : "+cash+". ||"); endGame(); } } } public static void endGame(){ System.out.println(" || THANKS FOR PLAYING 60 x 2 ||"); System.out.println(" || DEVLOPED BY : THEO SOUZA ||"); System.out.println(" || 4/10/2014 04:18 ||"); } } [/code] Only thing left i have to do i believe is if the user inputs a int or string that doesnt have anycode attached to it, it will get ignored.[/QUOTE] Very good job on the conventions. CBA to read what the logic of the program does. Kiu
  3. Fascism

    updating gallery

    added 14 and 15 "to the bone" [IMG]http://fc09.deviantart.net/fs71/f/2014/038/f/1/tothebone_by_dosesociety-d75fmiw.png[/IMG]
  4. 1. [img]http://fc05.deviantart.net/fs71/f/2014/029/4/c/1_by_dosesociety-d74a7ai.png[/img] 2. [img]http://fc07.deviantart.net/fs70/f/2014/029/a/b/2_by_dosesociety-d74ak5k.png[/img] 3. [img]http://fc03.deviantart.net/fs70/f/2014/029/d/5/3_by_dosesociety-d74ar5c.png[/img] 4. [img]http://fc08.deviantart.net/fs71/f/2014/029/b/d/4_by_dosesociety-d74bskt.png[/img] 5. [img]http://fc03.deviantart.net/fs71/f/2014/031/0/e/5_by_dosesociety-d74h07l.png[/img] 6. [img]http://fc06.deviantart.net/fs71/f/2014/033/d/a/6_by_dosesociety-d74rywm.png[/img] 7. [img]http://fc01.deviantart.net/fs71/f/2014/033/4/d/7_by_dosesociety-d74s5k5.png[/img] 8. [img]http://fc09.deviantart.net/fs71/f/2014/033/a/2/8_by_dosesociety-d74sggx.png[/img] 9. [img]http://fc04.deviantart.net/fs70/f/2014/033/9/7/9_by_dosesociety-d74ssdn.png[/img] 10. [img]http://fc08.deviantart.net/fs71/f/2014/033/5/2/10_by_dosesociety-d74t0d3.png[/img] 11. [img]http://fc06.deviantart.net/fs71/f/2014/033/9/5/11_by_dosesociety-d74tw4d.png[/img] 12. [img]http://fc00.deviantart.net/fs71/f/2014/033/f/b/12_by_dosesociety-d74tyjw.png[/img] 13. [img]http://fc03.deviantart.net/fs71/f/2014/033/7/0/13_by_dosesociety-d74uyv7.png[/img] 14. [IMG]http://fc07.deviantart.net/fs71/f/2014/038/5/9/tothebone_by_dosesociety-d75filf.png[/IMG] 15. [IMG]http://fc09.deviantart.net/fs71/f/2014/038/f/1/tothebone_by_dosesociety-d75fmiw.png[/IMG]
  5. Fascism

    So, two words

    [quote name='Ziek`']Superbowl between the 2 states that have legalized marijuana? [img]http://i.imgur.com/4gZesF9.jpg[/img][/QUOTE] less foot ball more dank nugs
  6. Fascism

    Girl Advice?

    feed her at least 3 times a day
  7. Fascism

    signatures

    [IMG]http://fc05.deviantart.net/fs71/f/2014/029/4/c/1_by_dosesociety-d74a7ai.png[/IMG] [img]http://fc07.deviantart.net/fs70/f/2014/029/a/b/2_by_dosesociety-d74ak5k.png[/img] [img]http://fc03.deviantart.net/fs70/f/2014/029/d/5/3_by_dosesociety-d74ar5c.png[/img] [img]http://fc08.deviantart.net/fs71/f/2014/029/b/d/4_by_dosesociety-d74bskt.png[/img]
  8. [IMG]http://fc04.deviantart.net/fs71/f/2014/028/2/7/meltingv2_by_dosesociety-d742flf.png[/IMG]
  9. [quote name='StevenAbraham']You do realize the person who made this spent no more then two minutes on this, and used no skills that yourself couldn't do. #hustled[/QUOTE] im pretty sure alomost anyone could figure how to make this
  10. can i sell you my shit?/////////////////////
  11. Fascism

    Updated Gallery

    [quote name='Ziek`']Do you do LSD?[/QUOTE] hell yeah
  12. Fascism

    Updated Gallery

    [IMG]http://fc02.deviantart.net/fs71/f/2013/353/f/3/idk_by_dosesociety-d6yi2jz.png[/IMG] [img]http://fc03.deviantart.net/fs70/f/2013/353/5/2/idkk_by_dosesociety-d6yi2lp.png[/img] [img]http://fc07.deviantart.net/fs70/i/2013/353/3/a/idkg_by_dosesociety-d6yi2nl.png[/img] [img]http://fc00.deviantart.net/fs71/f/2013/359/3/1/jdkfh_by_dosesociety-d6zf9kx.png[/img] [img]http://fc09.deviantart.net/fs70/f/2014/011/c/2/iiidk_by_dosesociety-d71us26.png[/img] [img]http://fc03.deviantart.net/fs70/i/2014/013/1/4/yahweh_by_dosesociety-d724ogb.png[/img] [img]http://fc07.deviantart.net/fs71/f/2014/013/d/2/cdogg_by_dosesociety-d724snw.png[/img] [img]http://fc06.deviantart.net/fs71/f/2014/013/2/6/fascism_by_dosesociety-d724vej.png[/img] [img]http://fc09.deviantart.net/fs70/f/2014/014/b/8/forkit_by_dosesociety-d724zol.png[/img] [img]http://fc00.deviantart.net/fs71/f/2014/014/c/0/trip_by_dosesociety-d725bfz.png[/img] [img]http://fc08.deviantart.net/fs71/f/2014/015/6/1/sfhs_by_dosesociety-d72c9b3.png[/img]
  13. [IMG]http://fc03.deviantart.net/fs70/f/2014/013/8/c/forkit_by_dosesociety-d724x3j.png[/IMG] [IMG]http://fc00.deviantart.net/fs71/f/2014/014/c/0/trip_by_dosesociety-d725bfz.png[/IMG]
  14. [IMG]http://fc09.deviantart.net/fs70/f/2014/013/a/5/spiritwarrior_by_dosesociety-d724m0q.png[/IMG] [IMG]http://fc07.deviantart.net/fs71/f/2014/013/d/2/cdogg_by_dosesociety-d724snw.png[/IMG] [IMG]http://fc03.deviantart.net/fs70/i/2014/013/1/4/yahweh_by_dosesociety-d724ogb.png[/IMG]
×