@Override
	public void actionPerformed(final ActionEvent e) {
		if (e.getSource() == bConnect) {
			connect();
			
		} else if (e.getSource() == bJoin) {
			join(Integer.parseInt((String) nrPlayers.getSelectedItem()));
		} else if (e.getSource() == aiList) {
			if (aiList.getSelectedIndex() == 0) {
				client.setIsPlaying(true);
				client.setAI(2);
			}
			if (aiList.getSelectedIndex() == 1) {
				client.setIsPlaying(false);
				client.setAI(1);
			}
			if (aiList.getSelectedIndex() == 2) {
				client.setIsPlaying(false);
				client.setAI(2);
			}
			if (aiList.getSelectedIndex() == 3) {
				client.setIsPlaying(false);
				client.setAI(3);
			}

		} 

	}