@Override
	public void commandReceived(Object command) {
		Command message = (Command) command;
		String action = message.getCommand();
		if (action.equals("clear_selection")) {
			selectedCard = null;
		} else if (action.equals("select_card")) {
			selectedCard = (RedCard)message.getBaggage();
		} else if (action.equals("new_green_card")) {
			currentGreen = (GreenCard)message.getBaggage();
		} else if (action.equals("remove_card")) {
			redDeck.remove((RedCard)message.getBaggage());
		} else if (action.equals("add_card")) {
			redDeck.add((RedCard)message.getBaggage());
		} else if (action.equals("player_left")) {
			System.out.println("player "+message.getBaggage()+" left.");
		} else if (action.equals("set_game_state")) {
			this.gameState = (int)message.getBaggage();
		} else {
			System.err.println("Unknown command: "+action);
		}
	}