package network.server;

public class ServerLogicThread extends Thread {

	private final Server server;

	public ServerLogicThread(Server server) {
		this.server = server;
	}

	public void cancel() {
		interrupt();
	}

	@Override
	public void run() {
		while (!interrupted()) {
			server.update();
			try {
				Thread.sleep(50);
			} catch (InterruptedException e) {
				e.printStackTrace();
				break;
			}
		}
	}

}
