package client;

import java.util.HashMap;
import bank.*;

public final class Clients {
	private static final Clients clients = new Clients();
	private HashMap<Integer, Client> clientList = new HashMap<Integer, Client>();;

	private Clients() {
	}

	public static Clients getInstance() {
		return clients;
	}

	public HashMap<Integer, Client> getClientList() {
		return clientList;
	}

	public Client getClient(int key) {
		return clientList.get(key);
	}

	public void createClient(String name) { // name, key
		for (int i = 1; i < 100; i++)
			if (!clientList.containsKey(i)) {
				clientList.put(i, new Client(name));
				return;
			}
	}

	public void deleteClient(int key) {
		if (clientList.containsKey(key))
			clientList.remove(key);
	}

	public boolean haveAccount(Bank bank, Client client) {
		if (client.getAccountNumber(bank).equals("0"))
			return false;
		return true;
	}
}

@@ -503,16 +503,51 @@
 me, key%0A
+%09%09if (name.equals(%220%22))%0A%09%09%09return;%0A
 %09%09for (i
@@ -564,11 +564,25 @@
 i %3C 
-100
+Integer.MAX_VALUE
 ; i+

add go back function