Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →An if/else becomes a Strategy candidate when its branches are interchangeable ways to perform the same job, and changing or adding those alternatives is making the conditional harder to understand or maintain. There is no branch-count threshold: a short, stable choice may be clearer left as an if/else.
What makes a conditional a Strategy candidate?
Look at what the branches do, not how many there are. Strategy separates a family of algorithms behind a shared interface or callable boundary. The surrounding code—the context—delegates the work to whichever implementation the caller or policy selects.
As an Amazon Associate I earn from qualifying purchases.
For example, road, walking, public-transit, and cycling directions are different algorithms for the same job: building a route. The route planner can delegate to the selected algorithm rather than containing every routing procedure itself. Refactoring Guru’s Strategy overview uses route planning to illustrate this fit.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsA conditional is more compelling to refactor when its cases keep growing, each case implements a distinct version of the same task, or changing one alternative repeatedly requires editing a central class. Those are signs that the variants may have their own cohesion and change independently—not proof that every conditional is a design flaw.
#1 Best Overall
- EXPLORE THE ISLAND OF CATAN: Settle the uninhabited island of Catan by gathering resources, building infrastructure, and nurturing trade relationships.
- STRATEGY AND COMPETITION: Compete with 2-3 opponents to expand your settlements and cities while managing resources and avoiding the robber.
- TRADE, BUILD, AND SETTLE: Use brick, wood, wheat, ore, and sheep to construct roads, settlements, and cities in your race to 10 victory points.
- REPLAYABLE AND ENGAGING: With a modular hexagonal board, no two games are the same, offering endless strategic opportunities and replayability.
- FOR FAMILIES AND STRATEGY ENTHUSIASTS: Designed for 3-4 players, ages 10 and up, CATAN 6th Edition is perfect for family game nights and friendly competition. Add the CATAN 5-6 Player Extension (sold separately) to expand your game to 5-6 players.
Use these questions to decide
- What varies? If the branches are alternative algorithms for one job, Strategy may fit. If they perform unrelated actions, a strategy family may be the wrong abstraction.
- How often does it change? Frequent new variants or rule changes make separation more valuable. Stable cases usually do not justify extra indirection.
- Who should select the behavior? Strategy fits when a caller or policy chooses an implementation. If behavior follows the object’s internal condition and its transitions, consider State instead.
- Does the abstraction pay for itself? A named boundary should make the code easier to read, test, or extend. If it only adds classes and navigation, retain the simpler form.
- What does the language make simple? A function, lambda, or handler map can express a strategy boundary without a class hierarchy. Choose the smallest idiom that keeps the alternatives clear.
Shipping-cost example: when the branches start to earn their keep
Suppose an order calculates shipping cost with a conditional for each shipping type. With a small, stable set of types, the conditional may communicate the rule more directly. If shipping methods acquire independently changing calculation rules, each can instead implement the same calculation contract, and the order-processing code can delegate to the selected method.
The key change is not simply that another case appeared. It is that the alternatives are genuinely interchangeable implementations of one calculation and that separating them reduces the cost of change. Kai, in a DEV Community article published September 26, 2026, describes the trade-off this way: “A pattern is a trade, not a trophy.”
Rank #2
- Stratego is the strategic game where you challenge your opponents in the heat of battle
- Your task is to capture your opponent’s flag while defending your own
- Lead your men into battle, every move is crucial
- Includes 2 x 40 pre-printed playing pieces, Game board, Screen and 2 sorting trays for the pieces
- Suitable for 2 players, aged 8+
When leaving the if/else is better
A couple of rarely changing algorithms often do not warrant interfaces and separate classes. Kai’s shipping example treats two or three stable types as a reasonable case for keeping the conditional; that is a rule of thumb, not a measured cutoff. Refactoring Guru likewise cautions against adding Strategy when a few algorithms rarely change.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchIf each branch merely supplies different parameters to the same operation, a conditional or a clearer set of methods may be simpler. Strategy is useful when the algorithm itself varies, not just because a decision exists in the code.
Rank #3
- EXCITING TRAIN ADVENTURE: Embark on a journey across early 20th century North America, collecting train cards and claiming routes to expand your network and connect cities.
- EASY TO LEARN, HARD TO MASTER: With simple rules and engaging gameplay, Ticket to Ride is perfect for both new and experienced players, making it a great choice for family game nights.
- BEAUTIFUL GAME COMPONENTS: Features a giant map of the North American train network, accompanied by miniature trains for each player, enhancing the visual appeal and immersive experience.
- MULTIPLE WAYS TO WIN: Strategically collect color sets of train cards, complete your tickets, and build the longest routes to secure victory, offering endless replayability.
- FUN FOR ALL AGES: Whether you're playing with family or friends, Ticket to Ride offers hours of fun, making it an ideal choice for casual and competitive gamers alike.
Strategy, State, and polymorphism are not interchangeable fixes
Strategy versus State
Both patterns can delegate behavior to another object, but the reason for choosing that behavior differs. With Strategy, a caller or policy chooses among interchangeable algorithms. With State, the object’s internal state determines its behavior, and state transitions are part of the model. If a type code only chooses a calculation, Strategy may fit; if that value governs the object’s wider condition and several actions, State may be more appropriate. See Refactoring Guru’s State overview.
When polymorphism may fit instead
If conditionals based on object types or properties recur across methods and classes, the behavior may belong with the relevant types. Replacing a conditional with polymorphism is one possible refactoring for that situation. It is not a rule to eliminate every switch: when a switch only selects parameters for the same operation, polymorphism can add complexity without improving the design. Refactoring Guru’s discussion of switch statements describes these distinctions.
Rank #4
- CLASSIC TILE PLACEMENT: Draw and place landscape tiles to build cities, roads, fields, and monasteries, then deploy meeples as knights, farmers, and monks to claim features and score points.
- STRATEGY FOR ADULTS AND FAMILIES: Carcassonne pairs intuitive rules with meaningful decisions, making it accessible for ages 7+ while still engaging experienced adult board gamers.
- REPLAYABLE MEDIEVAL ADVENTURE: Randomized tile draws create a different landscape every game, bringing fresh puzzles and competitive fun to family game night and casual group play.
- TWO TO FIVE PLAYERS: Built for 2-5 players with an average 35-minute playtime, Carcassonne fits weeknight sessions at home, family gatherings on vacation, and adult board game evenings.
- INCLUDES MINI-EXPANSIONS: The base game comes with The Abbot and The River mini-expansions in the box, adding variety to the classic Carcassonne board game experience from the start.
A low-risk way to refactor
- Keep the direct conditional initially. Confirm that the cases represent alternatives for one identifiable job rather than unrelated operations.
- Name the varying work. Extract the algorithm into a method whose name and inputs make the shared job explicit.
- Separate implementations when change makes it worthwhile. Define a common interface or callable contract, move each algorithm variant behind it, and have the context delegate to the selected implementation.
- Keep selection visible. Make it easy to find where the caller or policy chooses a strategy; do not obscure the decision in an unnecessary layer.
This is a practical progression, not a formal standard. Stop at the simplest design that makes the variation understandable and manageable.
Free tools Windows power users keep installed
One-click scans. No signup required.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




