<commit_before>package pylos.controller.screen;

import pylos.Pylos;
import pylos.network.Network;
import pylos.view.View;
import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.controls.textfield.controller.TextFieldControl;
import de.lessvoid.nifty.elements.Element;
import de.lessvoid.nifty.screen.Screen;
import de.lessvoid.nifty.screen.ScreenController;

public class StartScreenController implements ScreenController {
	final static String LOCAL_HOST = " local host";
	final static String REMOTE_HOST = " remote host";

	Nifty nifty;
	Screen screen;
	View view;

	Element multiplayerPanel;
	Element networkPanel;
	TextFieldControl localhostTextField;
	TextFieldControl remotehostTextField;

	public void bind(Nifty nifty, Screen screen) {
		this.nifty = nifty;
		this.screen = screen;
		view = Pylos.view;
		multiplayerPanel = ScreenControllerUtils.find(screen, "layer/multi/multiButtons");
		multiplayerPanel.hideWithoutEffect();
		networkPanel = ScreenControllerUtils.find(screen, "layer/network/networkTextFields");
		networkPanel.hideWithoutEffect();
		localhostTextField = screen.findControl("localhost", TextFieldControl.class);
		localhostTextField.setText(LOCAL_HOST);
		remotehostTextField = screen.findControl("remotehost", TextFieldControl.class);
		remotehostTextField.setText(REMOTE_HOST);
	}

	public void onEndScreen() {
	}

	public void onStartScreen() {
	}

	public void singlePlayer() {
		System.out.println("Needs AI implementation ;)");
	}

	public void multiPlayer() {
		multiplayerPanel.show();
	}

	public void startLocalGame() {
		view.initGame();
	}

	public void networkGame() {
		networkPanel.show();
	}

	public void clearLocalhostLabel() {
		if (localhostTextField.getText().equals(LOCAL_HOST))
			localhostTextField.setText("");
	}

	public void clearRemotehostLabel() {
		if (remotehostTextField.getText().equals(REMOTE_HOST))
			remotehostTextField.setText("");
	}
<commit_msg>add initGame for single player<commit_after>package pylos.controller.screen;

import pylos.Pylos;
import pylos.model.Model;
import pylos.network.Network;
import pylos.view.View;
import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.controls.textfield.controller.TextFieldControl;
import de.lessvoid.nifty.elements.Element;
import de.lessvoid.nifty.screen.Screen;
import de.lessvoid.nifty.screen.ScreenController;

public class StartScreenController implements ScreenController {
	final static String LOCAL_HOST = " local host";
	final static String REMOTE_HOST = " remote host";

	Nifty nifty;
	Screen screen;
	View view;

	Element multiplayerPanel;
	Element networkPanel;
	TextFieldControl localhostTextField;
	TextFieldControl remotehostTextField;

	public void bind(Nifty nifty, Screen screen) {
		this.nifty = nifty;
		this.screen = screen;
		view = Pylos.view;
		multiplayerPanel = ScreenControllerUtils.find(screen, "layer/multi/multiButtons");
		multiplayerPanel.hideWithoutEffect();
		networkPanel = ScreenControllerUtils.find(screen, "layer/network/networkTextFields");
		networkPanel.hideWithoutEffect();
		localhostTextField = screen.findControl("localhost", TextFieldControl.class);
		localhostTextField.setText(LOCAL_HOST);
		remotehostTextField = screen.findControl("remotehost", TextFieldControl.class);
		remotehostTextField.setText(REMOTE_HOST);
	}

	public void onEndScreen() {
	}

	public void onStartScreen() {
	}

	public void singlePlayer() {
		Model.currentPlayer.other().ai = true;
		view.initGame();
	}

	public void multiPlayer() {
		multiplayerPanel.show();
	}

	public void startLocalGame() {
		view.initGame();
	}

	public void networkGame() {
		networkPanel.show();
	}

	public void clearLocalhostLabel() {
		if (localhostTextField.getText().equals(LOCAL_HOST))
			localhostTextField.setText("");
	}

	public void clearRemotehostLabel() {
		if (remotehostTextField.getText().equals(REMOTE_HOST))
			remotehostTextField.setText("");
	}

{'fraction_non_alphanumeric': 0.10682110682110682, 'fraction_numerical': 0.0, 'mean_word_length': 5.781849912739965, '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': '2491828', 'n_tokens_mistral': 1241, 'n_tokens_neox': 1156, 'n_words': 232}