mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-17 06:59:29 +00:00
added strategy pattern sample
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
public class MeleeStrategy implements DragonSlayingStrategy {
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
System.out.println("With your Excalibur you severe the dragon's head!");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user