<commit_before>/* 
	JCavernApplet.java

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

package jcavern;

public class TreasureChest extends Thing
{
	private Treasure	mContents;
	private int			mGoldPieces;
	
	public TreasureChest(Treasure aTreasure, int howManyGold)
	{
		super("Treasure Chest");
		
		mContents = aTreasure;
		mGoldPieces = howManyGold;
	}
	
	public Treasure getContents()
	{
		return mContents;
	}
	
	public int getGold()
	{
		return mGoldPieces;
	}
	
	public Object clone()
	{
		return new TreasureChest(mContents, mGoldPieces);
	}
	
	public String getAppearance() { return "$$"; }
	
	public String toString()
	{
		return "TreasureChest with " + mGoldPieces + " gold pieces and " + mContents;
	}

	public static TreasureChest createRandom()
	{
	/*
      SetSect(a,b,chest);           {set up the chest}
      if (Random(18)>6) then begin
         Q[a,b].gold := Random(50)+1; Q[a,b].id := 0;
      end else begin
         Q[a,b].id := Random(MaxTreasure)+1; Q[a,b].gold := 0;
      end;
	*/
	
		if (Math.random() > 0.5)
		{<commit_msg>better message for contents of treasure chest<commit_after>/* 
	JCavernApplet.java

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

package jcavern;

public class TreasureChest extends Thing
{
	private Treasure	mContents;
	private int			mGoldPieces;
	
	public TreasureChest(Treasure aTreasure, int howManyGold)
	{
		super("Treasure Chest");
		
		mContents = aTreasure;
		mGoldPieces = howManyGold;
	}
	
	public Treasure getContents()
	{
		return mContents;
	}
	
	public int getGold()
	{
		return mGoldPieces;
	}
	
	public Object clone()
	{
		return new TreasureChest(mContents, mGoldPieces);
	}
	
	public String getAppearance() { return "$$"; }
	
	public String toString()
	{
		StringBuffer aBuffer = new StringBuffer("Treasure Chest");
		
		if (mGoldPieces > 0)
		{
			aBuffer.append(" with " + mGoldPieces + " gold pieces");		
		}
		if (mContents != null)
		{
			aBuffer.append(" with " + mContents);
		}
		
		return aBuffer.toString();
	}

	public static TreasureChest createRandom()
	{
	/*
      SetSect(a,b,chest);           {set up the chest}
      if (Random(18)>6) then begin
         Q[a,b].gold := Random(50)+1; Q[a,b].id := 0;
      end else begin
         Q[a,b].id := Random(MaxTreasure)+1; Q[a,b].gold := 0;
      end;
	*/
	
		if (Math.random() > 0.5)
		{
{'fraction_non_alphanumeric': 0.12484076433121019, 'fraction_numerical': 0.009766454352441613, 'mean_word_length': 3.0761245674740483, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '7130750', 'n_tokens_mistral': 972, 'n_tokens_neox': 846, 'n_words': 205}