<commit_before>package vn.edu.hust.student.dynamicpool.presentation.screen;

import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;
import com.sun.prism.GraphicsPipeline.ShaderType;

import vn.edu.hust.student.dynamicpool.dal.utils.AppConst;
import vn.edu.hust.student.dynamicpool.presentation.WorldController;
import vn.edu.hust.student.dynamicpool.presentation.WorldRenderer;
import vn.edu.hust.student.dynamicpool.presentation.assets.Assets;

public class HostGameScreen extends GameScreen {

	private BitmapFont defaultFont;

	public HostGameScreen(WorldRenderer worldRenderer,
			WorldController worldController) {
		super(worldRenderer, worldController);
	}
	
	@Override
	public void show() {
		super.show();
		this.defaultFont = Assets.instance.gameScreen.getDefaultFont();
	}
	
	@Override
	protected void createInputprocessors() {
		this.defaultInputProcessor = new HostGSDefaultInputProcessor(
				worldController);
		this.selectFishInputProcessor = new HostGSSelectFishInputProcessor(
				worldController);
		this.selectTrajectoryInputProcessor = new HostGSSelectTranjectoryInputPorcessor(
				worldController);
	}

	@Override
	public void render(float delta) {
		worldRenderer.beginRender();
		renderGameBackground();
		renderFishsUIAndUpdate(delta);
		renderKey();
		renderHubControl();
		worldRenderer.endRender();
		renderWidePool();
	}

	private void renderKey() {
		String key = worldController.getKey();
		float x = AppConst.width-20-defaultFont.getBounds(key).width;
		float y = 25+defaultFont.getBounds(key).height;
		defaultFont.draw(batch, key, x, y);
//		System.out.println(String.format("HostGameScreen: width %d, height %d, key %s", AppConst.width, AppConst.height, key));
	}
	
	ShapeRenderer shapeRenderer = new ShapeRenderer();
	private void renderWidePool() {
		shapeRenderer.setProjectionMatrix(worldRenderer.getCamera().combined);
		shapeRenderer.begin(ShapeType.Filled);
		shapeRenderer.setColor(0, 1, 0, 1);
		shapeRenderer.circle(AppConst.width/2, AppConst.height/2, 20);<commit_msg>bo test wide pool<commit_after>package vn.edu.hust.student.dynamicpool.presentation.screen;

import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;
import com.sun.prism.GraphicsPipeline.ShaderType;

import vn.edu.hust.student.dynamicpool.dal.utils.AppConst;
import vn.edu.hust.student.dynamicpool.presentation.WorldController;
import vn.edu.hust.student.dynamicpool.presentation.WorldRenderer;
import vn.edu.hust.student.dynamicpool.presentation.assets.Assets;

public class HostGameScreen extends GameScreen {

	private BitmapFont defaultFont;

	public HostGameScreen(WorldRenderer worldRenderer,
			WorldController worldController) {
		super(worldRenderer, worldController);
	}
	
	@Override
	public void show() {
		super.show();
		this.defaultFont = Assets.instance.gameScreen.getDefaultFont();
	}
	
	@Override
	protected void createInputprocessors() {
		this.defaultInputProcessor = new HostGSDefaultInputProcessor(
				worldController);
		this.selectFishInputProcessor = new HostGSSelectFishInputProcessor(
				worldController);
		this.selectTrajectoryInputProcessor = new HostGSSelectTranjectoryInputPorcessor(
				worldController);
	}

	@Override
	public void render(float delta) {
		worldRenderer.beginRender();
		renderGameBackground();
		renderFishsUIAndUpdate(delta);
		renderKey();
		renderHubControl();
		worldRenderer.endRender();
//		renderWidePool();
	}

	private void renderKey() {
		String key = worldController.getKey();
		float x = AppConst.width-20-defaultFont.getBounds(key).width;
		float y = 25+defaultFont.getBounds(key).height;
		defaultFont.draw(batch, key, x, y);
//		System.out.println(String.format("HostGameScreen: width %d, height %d, key %s", AppConst.width, AppConst.height, key));
	}
	
	ShapeRenderer shapeRenderer = new ShapeRenderer();
	private void renderWidePool() {
		shapeRenderer.setProjectionMatrix(worldRenderer.getCamera().combined);
		shapeRenderer.begin(ShapeType.Filled);
		shapeRenderer.setColor(0, 1, 0, 1);
		shapeRenderer.circle(AppConst.width/2, AppConst.height/2, 20);
{'fraction_non_alphanumeric': 0.10918462980318651, 'fraction_numerical': 0.006091846298031865, 'mean_word_length': 5.907766990291262, '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': '538761', 'n_tokens_mistral': 1415, 'n_tokens_neox': 1293, 'n_words': 222}