fukurou
the supreme coder
★★★
- Joined
- Dec 17, 2021
- Posts
- 2,293
Java:
public class Brain{
private Thinkable chi;
private Actionable MVC;
public Brain(actionable MVC, thinkable chobit) {
chi=chobit;this.MVC = MVC;
}
public void doIt(String ear, String skin, String eye){
String result = chi.think(ear,skin,eye);
MVC.act(result);
}
}
Python:
''' Brain CLASS '''
class Brain:
def __init__(self, chobit: Thinkable, mvc: Actionable):
super().__init__()
self.chi: Thinkable = chobit
self.mvc: Actionable = mvc
def doIt(self, ear: str, skin: str, eye: str):
temp_str: str = self.chi.think(ear, skin, eye)
self.mvc.act(temp_str)