<commit_before>/* 
	JCavernApplet.java

	Title:			JCavern And Glen
	Author:			<NAME>
	Description:	
*/

package jcavern;

import java.util.*;
import java.net.*;
import java.io.*;

/**
 * The MonsterFactory creates Monsters based on the monsters.dat file. It also
 * creates Missions appropriate to the prowess of the player.
 *
 * @author	<NAME>
 * @version	$Id$
 */
public class MonsterFactory
{
	private static final String		gImageNames[] = { "monster", "eyeball", "darklord", "chavin", "wahoo", "gobbler", "jackolantern", "snake" };
	
	/** * A list of Monsters stored in the order they were read from monsters.dat. */
	public static Vector			gMonsters;
	
	/**
	 * Retrieves an appropriate opponent for this Player.
	 */	
	public static Monster getWorthyOpponent(Player aPlayer)
	{
		int randomIndex = (int) (Math.random() * gMonsters.size());
		
		while (((Monster) gMonsters.elementAt(randomIndex)).getPoints() > aPlayer.getPoints())
		{
			randomIndex = (int) (Math.random() * gMonsters.size());
		}
		
		return (Monster) ((Monster) gMonsters.elementAt(randomIndex)).clone();
	}
	
	/**
	 * Retrieves the first opponent tougher than this Player.
	 */	
	public static Monster getMostWorthyOpponent(Player aPlayer)
	{
		int monsterIndex = 0;
		<commit_msg>added more of John's pictures to the rotation<commit_after>/* 
	JCavernApplet.java

	Title:			JCavern And Glen
	Author:			<NAME>
	Description:	
*/

package jcavern;

import java.util.*;
import java.net.*;
import java.io.*;

/**
 * The MonsterFactory creates Monsters based on the monsters.dat file. It also
 * creates Missions appropriate to the prowess of the player.
 *
 * @author	<NAME>
 * @version	$Id$
 */
public class MonsterFactory
{
	private static final String		gImageNames[] = { "monster", "wraith", "rajah", "eyeball", "darklord", "chavin", "wahoo", "gobbler", "jackolantern", "snake" };
	
	/** * A list of Monsters stored in the order they were read from monsters.dat. */
	public static Vector			gMonsters;
	
	/**
	 * Retrieves an appropriate opponent for this Player.
	 */	
	public static Monster getWorthyOpponent(Player aPlayer)
	{
		int randomIndex = (int) (Math.random() * gMonsters.size());
		
		while (((Monster) gMonsters.elementAt(randomIndex)).getPoints() > aPlayer.getPoints())
		{
			randomIndex = (int) (Math.random() * gMonsters.size());
		}
		
		return (Monster) ((Monster) gMonsters.elementAt(randomIndex)).clone();
	}
	
	/**
	 * Retrieves the first opponent tougher than this Player.
	 */	
	public static Monster getMostWorthyOpponent(Player aPlayer)
	{
		int monsterIndex = 0;
		
{'fraction_non_alphanumeric': 0.1305025321386833, 'fraction_numerical': 0.0007791195948578107, 'mean_word_length': 3.9195402298850577, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3380656', 'n_tokens_mistral': 913, 'n_tokens_neox': 812, 'n_words': 247}