3 ms·
You’re describing the strategy pattern, which is probably one of the most practical coding design patterns. Ex: each chess AI difficulty gets its own class, whi
by sameoldtune 2y ago
You’re describing the strategy pattern, which is probably one of the most practical coding design patterns. Ex: each chess AI difficulty gets its own class, which all extend a common interface.
- krapht 2y agoI still find it funny that somehow the idea of runtime function dispatch via function pointer is called the "strategy" pattern.
- sameoldtune 2y agoHey I didn’t name it!