/**************************************************\ * play.java * * by Daniel Wedul * * Last modified 5/30/02 * >**************************************************< * Usage is as follows * * java play #1 #2 -1 -2 -3 -4 -5 -6 -7 * * the #'s are optional and are integers * * #1 is the number of rounds to deal * * #2 is the number of players * * the -n's are optional and are two characters * * that describe a card * * -1 -2 are the pocket cards to test * * -3 -4 -5 are the flop * * -6 is the turn * * -7 is the river * >**************************************************< * The program deals a number of rounds using the * * cards given and tests how many times the given * * pocket wins. * \**************************************************/ public class play { public static void main(String [] args) { int iter = 10000; int players = 10; //counting main hand card [] keep = new card[7]; keep[0] = new card('2','C'); keep[1] = new card('2','S'); int argsgiven = args.length; int cardsgiven = argsgiven - 2; if (cardsgiven < 0) cardsgiven = 0; int cardsneeded = 7 - cardsgiven; if (cardsneeded > 5) cardsneeded = 5; if (argsgiven > 0) iter = Integer.parseInt(args[0].trim()); if (argsgiven > 1) players = Integer.parseInt(args[1].trim()); for (int i=0;i0) { count--; a.returncard(leftover[count]); leftover[count] = null; } count = 0; // main for loop for (int i=0;i 1) split++; } //put the cards back for (int j=5-cardsneeded;j<5;j++) { a.returncard(board[j]); } for (int j=0;j 2) { System.out.print (" with "); for(int i=2;i