Best pattern to implement multiple conditional logic
<p>Firstly, I have read, and searched ways to refactor conditional logic - seems that 3 main approaches are suggested : Polymorphism (haven't tried, but don't think I can apply it this situation), Enums (have used) and The Strategy Pattern (I have used several times and like it).</p>

<p>However I have about 6-7 boolean conditions to check, and depending whether each one is true/false I want to do something different i.e.  </p>

<pre><code>true, false, false, true

false, false, true, false

true, true, ... you get the picture..
</code></pre>

<p>The boolean values are set by different preferences, that are all related in someway, but I need to handle differently depending on which ones are true or false. The amount of preferences could well increase as well, so something that is scalable and maintainable is what I'm after.</p>

<p>I know I can use The Strategy Pattern here, but not without a lot of conditional checks first (which I'm trying to avoid).</p>

<p>Example situation, the project centres around a music app, and specifically what to do when a track has finished, and what options dictate what happens next i.e :</p>

<p>SHUFFLE     </p>

<p>REPEAT  </p>

<p>PLAY_FROM_ALBUM_SONGS  </p>

<p>PLAY_FROM_ARTIST  </p>

<p>PLAY_FROM_GENRE</p>

<p>PLAY_FROM_ALL_SONGS</p>

<p>So a basic example would be the first and last are true (Shuffle &amp; Play from all songs) and rest are false. some cases if one is true, another has to be false - you cant play all songs from your library if you're playing just an album, so when some options are chosen they automatically change other ones they directly affect.</p>

<p>Any suggestions how this sort of conditional logic, based on multiple conditions (6/7+), can be refactored so it wont look like a behemoth of ugly code.</p>