@Test public void testDistributePoker() { Assert.assertNotNull(PokerHelper.distributePoker()); }
public static List<List<Poker>> distributePoker(){ Collections.shuffle(basePokers); List<List<Poker>> pokersList = new ArrayList<List<Poker>>(); List<Poker> pokers1 = new ArrayList<>(17); pokers1.addAll(basePokers.subList(0, 17)); List<Poker> pokers2 = new ArrayList<>(17); pokers2.addAll(basePokers.subList(17, 34)); List<Poker> pokers3 = new ArrayList<>(17); pokers3.addAll(basePokers.subList(34, 51)); List<Poker> pokers4 = new ArrayList<>(3); pokers4.addAll(basePokers.subList(51, 54)); pokersList.add(pokers1); pokersList.add(pokers2); pokersList.add(pokers3); pokersList.add(pokers4); for(List<Poker> pokers: pokersList) { sortPoker(pokers); } return pokersList; }
PokerHelper { public static List<List<Poker>> distributePoker(){ Collections.shuffle(basePokers); List<List<Poker>> pokersList = new ArrayList<List<Poker>>(); List<Poker> pokers1 = new ArrayList<>(17); pokers1.addAll(basePokers.subList(0, 17)); List<Poker> pokers2 = new ArrayList<>(17); pokers2.addAll(basePokers.subList(17, 34)); List<Poker> pokers3 = new ArrayList<>(17); pokers3.addAll(basePokers.subList(34, 51)); List<Poker> pokers4 = new ArrayList<>(3); pokers4.addAll(basePokers.subList(51, 54)); pokersList.add(pokers1); pokersList.add(pokers2); pokersList.add(pokers3); pokersList.add(pokers4); for(List<Poker> pokers: pokersList) { sortPoker(pokers); } return pokersList; } }
PokerHelper { public static List<List<Poker>> distributePoker(){ Collections.shuffle(basePokers); List<List<Poker>> pokersList = new ArrayList<List<Poker>>(); List<Poker> pokers1 = new ArrayList<>(17); pokers1.addAll(basePokers.subList(0, 17)); List<Poker> pokers2 = new ArrayList<>(17); pokers2.addAll(basePokers.subList(17, 34)); List<Poker> pokers3 = new ArrayList<>(17); pokers3.addAll(basePokers.subList(34, 51)); List<Poker> pokers4 = new ArrayList<>(3); pokers4.addAll(basePokers.subList(51, 54)); pokersList.add(pokers1); pokersList.add(pokers2); pokersList.add(pokers3); pokersList.add(pokers4); for(List<Poker> pokers: pokersList) { sortPoker(pokers); } return pokersList; }  }
PokerHelper { public static List<List<Poker>> distributePoker(){ Collections.shuffle(basePokers); List<List<Poker>> pokersList = new ArrayList<List<Poker>>(); List<Poker> pokers1 = new ArrayList<>(17); pokers1.addAll(basePokers.subList(0, 17)); List<Poker> pokers2 = new ArrayList<>(17); pokers2.addAll(basePokers.subList(17, 34)); List<Poker> pokers3 = new ArrayList<>(17); pokers3.addAll(basePokers.subList(34, 51)); List<Poker> pokers4 = new ArrayList<>(3); pokers4.addAll(basePokers.subList(51, 54)); pokersList.add(pokers1); pokersList.add(pokers2); pokersList.add(pokers3); pokersList.add(pokers4); for(List<Poker> pokers: pokersList) { sortPoker(pokers); } return pokersList; }  static void sortPoker(List<Poker> pokers); static int[] getIndexes(Character[] options, List<Poker> pokers); static boolean checkPokerIndex(int[] indexes, List<Poker> pokers); static PokerSell checkPokerType(List<Poker> pokers); static int parseScore(SellType sellType, int level); static List<Poker> getPoker(int[] indexes, List<Poker> pokers); static boolean comparePoker(List<Poker> pres, List<Poker> currents); static List<List<Poker>> distributePoker(); static String printPoker(List<Poker> pokers); static String textOnlyNoType(List<Poker> pokers); static int parsePokerColligationScore(List<Poker> pokers); static List<PokerSell> parsePokerSells(List<Poker> pokers); }
PokerHelper { public static List<List<Poker>> distributePoker(){ Collections.shuffle(basePokers); List<List<Poker>> pokersList = new ArrayList<List<Poker>>(); List<Poker> pokers1 = new ArrayList<>(17); pokers1.addAll(basePokers.subList(0, 17)); List<Poker> pokers2 = new ArrayList<>(17); pokers2.addAll(basePokers.subList(17, 34)); List<Poker> pokers3 = new ArrayList<>(17); pokers3.addAll(basePokers.subList(34, 51)); List<Poker> pokers4 = new ArrayList<>(3); pokers4.addAll(basePokers.subList(51, 54)); pokersList.add(pokers1); pokersList.add(pokers2); pokersList.add(pokers3); pokersList.add(pokers4); for(List<Poker> pokers: pokersList) { sortPoker(pokers); } return pokersList; }  static void sortPoker(List<Poker> pokers); static int[] getIndexes(Character[] options, List<Poker> pokers); static boolean checkPokerIndex(int[] indexes, List<Poker> pokers); static PokerSell checkPokerType(List<Poker> pokers); static int parseScore(SellType sellType, int level); static List<Poker> getPoker(int[] indexes, List<Poker> pokers); static boolean comparePoker(List<Poker> pres, List<Poker> currents); static List<List<Poker>> distributePoker(); static String printPoker(List<Poker> pokers); static String textOnlyNoType(List<Poker> pokers); static int parsePokerColligationScore(List<Poker> pokers); static List<PokerSell> parsePokerSells(List<Poker> pokers); static int pokerPrinterType; static int totalPrinters; }