I have a question about conditions in state diagrams. In particular, see T4 Task 3:
Lets assume player 1 (blue) has three blue chips connected already. Player 2 (red) has just played some move that wont stop player 1 from winning. Player one has not yet but is about to make the winning move, dropping the 4th.
So we are at player 2’s turn. He has just moved, this means we followed player2Play[win Possible && connected red chips<4]. Now we are at Turn Player 1 . Now player 1 wants to drop their 4th connected chip and thus winning the game. Now i ask: Which path to take?
Because before player 1 plays, there are still only 3 connected blue chips. This means i can’t go on the path that leads to Win Player 1, because it is based on the condition that there are at least 4 connected chips, which there aren’t before executing player1Play (and thus making the winning move). Now i must go the path to Turn Player 2, because its condition matches the state. There are only 3 connected blue chips, which is less than 4. Because the condition matches i can now take this path and execute player1Play. Then we are at Turn Player 2. Now player 2 can only take the path to draw, since player 1 won already, which means no win possible, which is obviously not correct.
Is this a mistake in the Solution? Because as i understand it, a transition can only occur when the condition has been met inside of the state. In our case, the condition ([connected blue chips >=4]) can only be met after executing the very action (player1Play) it depends upon. But the Action will only be executed after the condition is satisfied, not before, right?
