<commit_before>package starpunk.screens;

import com.artemis.World;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;
import starpunk.logic.EntityFactory;
import starpunk.StarPunkGame;
import starpunk.services.music.MusicResource;
import starpunk.services.sound.SoundResource;
import starpunk.logic.systems.MovementSystem;
import starpunk.logic.systems.SpriteRenderSystem;

public final class GameLoopScreen
  extends BaseScreen
{
  private World _world;
  private OrthographicCamera _camera;
  private SpriteRenderSystem _renderSystem;

  public GameLoopScreen( final StarPunkGame game )
  {
    super( game );
    _camera = new OrthographicCamera( StarPunkGame.WIDTH, StarPunkGame.HEIGHT );

    _world = new World();
    _renderSystem = _world.setSystem( new SpriteRenderSystem( game, _camera ), true );
    _world.setSystem( new MovementSystem() );
    _world.initialize();

    for( int i = 0; i < 500; i++ )
    {
      EntityFactory.createStar( _world, StarPunkGame.WIDTH, StarPunkGame.HEIGHT ).addToWorld();
    }
  }

  @Override
  public void show()
  {
    super.show();
    getGame().getMusicManager().play( new MusicResource( "src/main/assets/music/level.ogg" ) );
  }

  @Override
  public void hide()
  {
    super.hide();
    getGame().getMusicManager().play( null );
  }

  @Override
  public void update( final float delta )<commit_msg>Add the irst ship to the world<commit_after>package starpunk.screens;

import com.artemis.World;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;
import starpunk.logic.EntityFactory;
import starpunk.StarPunkGame;
import starpunk.services.music.MusicResource;
import starpunk.services.sound.SoundResource;
import starpunk.logic.systems.MovementSystem;
import starpunk.logic.systems.SpriteRenderSystem;

public final class GameLoopScreen
  extends BaseScreen
{
  private World _world;
  private OrthographicCamera _camera;
  private SpriteRenderSystem _renderSystem;

  public GameLoopScreen( final StarPunkGame game )
  {
    super( game );
    _camera = new OrthographicCamera( StarPunkGame.WIDTH, StarPunkGame.HEIGHT );

    _world = new World();
    _renderSystem = _world.setSystem( new SpriteRenderSystem( game, _camera ), true );
    _world.setSystem( new MovementSystem() );
    _world.initialize();

    for( int i = 0; i < 500; i++ )
    {
      EntityFactory.createStar( _world, StarPunkGame.WIDTH, StarPunkGame.HEIGHT ).addToWorld();
    }
    EntityFactory.createShip( _world, 0, 0 ).addToWorld();
  }

  @Override
  public void show()
  {
    super.show();
    getGame().getMusicManager().play( new MusicResource( "src/main/assets/music/level.ogg" ) );
  }

  @Override
  public void hide()
  {
    super.hide();
    getGame().getMusicManager().play( null );
  }

  @Override
  public void update( final float delta )
{'fraction_non_alphanumeric': 0.1076555023923445, 'fraction_numerical': 0.004784688995215311, 'mean_word_length': 4.226785714285715, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2362399', 'n_tokens_mistral': 965, 'n_tokens_neox': 909, 'n_words': 207}