/**
 * Copyright (C) 2022 by Martin Robillard. See https://codesample.info/about.html
 */
package e2.chapter7;

/**
 * Decorator that prints the card drawn on the console.
 */
public class LoggingDecorator extends AbstractDecorator {
	
	public LoggingDecorator(CardSource pElement) {
		super(pElement);
	}
	
	@Override
	public Card draw() {
Card card = super.draw();
System.out.println(String.format("Draws %s", card)); return card; } }