@Override
	public User determineWinner(CommunityCards cc, ArrayList<User> allGameUsers) {

		// Put all the cards and their suits in an array for easy access.
		ArrayList<ArrayList<String>> commCardsArray = new ArrayList<ArrayList<String>>();
		for (int i = 0; i < CommunityCards.NUM_CARDS; i++) {
			ArrayList<String> card = new ArrayList<String>();
			card.add(Character.toString(cc.data.get(i).cardType));
			card.add(cc.data.get(i).suit);
			commCardsArray.add(card);
		}

		Cards board = new Cards(CommunityCards.NUM_CARDS);
		for (ArrayList<String> ccard : commCardsArray) {
			board.add(new mentalpoker.gameplay.handevaluator.Card(
					mentalpoker.gameplay.handevaluator.Card.Rank.parse(ccard
							.get(CARDTYPE)),
					mentalpoker.gameplay.handevaluator.Card.Suit.parse(ccard
							.get(SUIT))));
		}

		Cards[] allUsersCards = new Cards[allGameUsers.size()];

		int usersCardsIndex = 0;
		for (User u : allGameUsers) {
			/**
			 * In this section, we convert the cards into arrays for easy
			 * iteration
			 */
			String userCard1 = Character
					.toString(u.getUsersHand().data.get(0).cardType);
			String userCard2 = Character
					.toString(u.getUsersHand().data.get(1).cardType);

			// Card 1 of user's hand
			ArrayList<String> card1 = new ArrayList<String>();
			card1.add(userCard1);
			card1.add(u.getUsersHand().data.get(0).suit);

			// Card 2 of user's hand
			ArrayList<String> card2 = new ArrayList<String>();
			card2.add(userCard2);
			card2.add(u.getUsersHand().data.get(1).suit);

			ArrayList<ArrayList<String>> userCards = new ArrayList<ArrayList<String>>();
			userCards.add(card1);
			userCards.add(card2);

			/**
			 * Using the pokerengine made available by Sam Pullara
			 */

			Cards userCards1 = new Cards(2);
			// Adding the first card
			userCards1.add(new mentalpoker.gameplay.handevaluator.Card(
					mentalpoker.gameplay.handevaluator.Card.Rank.parse(card1
							.get(CARDTYPE)),
					mentalpoker.gameplay.handevaluator.Card.Suit.parse(card1
							.get(SUIT))));
			// Second card
			userCards1.add(new mentalpoker.gameplay.handevaluator.Card(
					mentalpoker.gameplay.handevaluator.Card.Rank.parse(card2
							.get(CARDTYPE)),
					mentalpoker.gameplay.handevaluator.Card.Suit.parse(card2
							.get(SUIT))));

			allUsersCards[usersCardsIndex++] = userCards1;

		}

		double[] odds = Evaluate.evaluateWinningOdds(allUsersCards, board,
				new Cards());

		for (int cardIndex = 0; cardIndex < allGameUsers.size(); cardIndex++) {
			if (odds[cardIndex] == 1.0d) {
				return allGameUsers.get(cardIndex);
			}
		}

		// something went wrong
		return null;
	}