public void actionPerformed(ActionEvent arg0) {
		
		if (arg0.getSource() == startWindowPanel.getSinglePlayerButton()) {
			gameType = 0;
			controller = ControllerFactory.getAIControllerInstance(this);
			initGameWindow();
		}
		else if (arg0.getSource() == startWindowPanel.getMultiPlayerButton()) {
			gameType = 1;
			controller = ControllerFactory.getSingleUserControllerInstance(this);
			initGameWindow();
		}
		else if (arg0.getSource() == startWindowPanel.getNetworkButton()) {
			gameType = 2;
			try {
				controller = ControllerFactory.getNetworkController(this);
			} catch (Exception e) {
				viewError("Connection Error!");
				startNewGame();
			}
			initGetNetworkTypeWindow();
		}
		else if (arg0.getSource() == sendButton) {
			String msg = chatInputField.getText().trim();
			if (msg.length() > 0) {
				controller.message(msg);
				message(msg, nickName);
				chatInputField.setText("");
			}
		}
		else if (arg0.getSource() == joinRoomButton) {
			initJoinRoomWindow();
		}
		else if (arg0.getSource() == findRoomButton) {
			initFindRoomWindow();
		}
		else if (arg0.getSource() == continueButton) {
			if (spareText2 == null) {
				String nickname = nickNameInputField.getText().trim();
				if (nickname.length() == 0) {
					viewError("Please enter a valid nick name");
				} else {
					nickName = nickname;
					System.out.println("NICK" + getNickName());
					((NetworkController) controller).match();
					controller.run();
					initLoadingWindow();
				}
			} else {
				String nickname = nickNameInputField.getText().trim();
				String roomname = roomNameInputField.getText().trim();
				if (nickname.length() == 0) {
					viewError("Please enter a valid nick name");
				}
				if (roomname.length() == 0) {
					viewError("Please enter a valid room name");
				}
				nickName = nickname;
				try {
					((NetworkController) controller).register(roomname);
					controller.run();
				} catch (FullRoomException e) {
					e.printStackTrace();
				}
				initLoadingWindow();
			}
		}
	}