It’s very easy to do with flowcharts, but the exercise also asked to do it with sequences and I’m having a bit of trouble here.
I can get it to work fine, but after guessing the number correctly and the user picks “stop”, I want the program to completely stop instead of going on forever generating new ones. How do I do that?
Since you are using Flowchart i would suggest to use Flow Decision Activity for decisions instead of using multiple IF statements because this is not the best practice.
From what i can see you don’t have the Rule when user types ‘Stop’ the game will stop.
I’ve attached some workflow (idk if it works) but it shows you how you can make this.
As I said above, I know this is easier with flowcharts and decision activities, but I want to do it with sequences, for the purpose of learning, as the exercise asked. I don’t have a rule when use types “Stop” because this is my question I don’t know what rule to use to make it stop.
The problem is that Sequence activity is used for processes that are going one after another (in a sequence), that is why there is only one Output from them. There is no point in trying it this way because it is a bad practice. If you really want to do this, i would put only one Sequence activity at the beginning and inside of it i would put the rest, with some While or Do While activities to repeat the process.
Yeah I’m not sure this would work with a sequence. I’ve tried with While and Do While, but the bottom line is I cannot get back out to re-evaluate another guess (stuck in the loop). I’m moving on!