<commit_before>package com.jenjinstudios.world;

import com.jenjinstudios.world.math.Dimension2D;
import com.jenjinstudios.world.math.Vector2D;
import org.testng.Assert;
import org.testng.annotations.Test;

import java.util.Properties;

public class SightedObjectTest
{
	@Test
	public void testGetVisibleObjects() {
		World world = new World();
		WorldObject visibleObject = new WorldObject("VisibleObject");
		SightedObject sightedObject = new SightedObject("SightedObject");
		world.getWorldObjects().scheduleForAddition(visibleObject);
		world.getWorldObjects().scheduleForAddition(sightedObject);

		world.update();
		world.update();

		Assert.assertTrue(sightedObject.getVisibleObjects().containsKey(visibleObject.getId()));
	}

	@Test
	public void testGetVisibleLocations() {
		Properties props = new Properties();
		props.setProperty("blocksVision", "true");
		Location[] locations = new Location[]{
			  new Location(24, 23, props),
			  new Location(24, 27, props),
			  new Location(23, 26, props),
			  new Location(23, 24, props),
			  new Location(26, 23, props),
			  new Location(26, 27, props),
			  new Location(27, 24, props),
			  new Location(27, 26, props),
			  new Location(27, 27, props)
		};
		Zone zone = new Zone(0, new Dimension2D(50, 50), locations);
		World world = new World(zone);
		SightedObject sightedObject = new SightedObject("SightedObject");
		world.getWorldObjects().scheduleForAddition(sightedObject);
		sightedObject.setVector2D(new Vector2D(55, 55));

		world.update();
		world.update();

		Assert.assertEquals(sightedObject.getVisibleLocations().size(), 238);
	}

	@Test
	public void testGetNewlyVisibleObjects() {
		World world = new World();<commit_msg>Simplified test method<commit_after>package com.jenjinstudios.world;

import com.jenjinstudios.world.math.Dimension2D;
import com.jenjinstudios.world.math.Vector2D;
import org.testng.Assert;
import org.testng.annotations.Test;

public class SightedObjectTest
{
	@Test
	public void testGetVisibleObjects() {
		World world = new World();
		WorldObject visibleObject = new WorldObject("VisibleObject");
		SightedObject sightedObject = new SightedObject("SightedObject");
		world.getWorldObjects().scheduleForAddition(visibleObject);
		world.getWorldObjects().scheduleForAddition(sightedObject);

		world.update();
		world.update();

		Assert.assertTrue(sightedObject.getVisibleObjects().containsKey(visibleObject.getId()));
	}

	@Test
	public void testGetVisibleLocations() {
		Zone zone = new Zone(0, new Dimension2D(50, 50));
		World world = new World(zone);
		SightedObject sightedObject = new SightedObject("SightedObject");
		world.getWorldObjects().scheduleForAddition(sightedObject);
		sightedObject.setVector2D(new Vector2D(55, 55));

		world.update();
		world.update();

		Assert.assertEquals(sightedObject.getVisibleLocations().size(), 238);
	}

	@Test
	public void testGetNewlyVisibleObjects() {
		World world = new World();
{'fraction_non_alphanumeric': 0.1218014329580348, 'fraction_numerical': 0.023882633913340157, 'mean_word_length': 5.663636363636364, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3231325', 'n_tokens_mistral': 1031, 'n_tokens_neox': 898, 'n_words': 188}