77
00:05:39,520 --> 00:05:41,520
另外一个就是循环
78
00:05:41,520 --> 00:05:45,520
如果怎么样
79
00:05:45,520 --> 00:05:47,520
就再做一遍
80
00:05:47,520 --> 00:05:49,520
如果还满足条件就再做一遍
81
00:05:49,520 --> 00:05:51,520
那就是循环
82
00:05:51,520 --> 00:05:53,520
循环的这个
83
00:05:53,520 --> 00:05:55,520
画法
84
00:05:55,520 --> 00:05:57,520
循环有两种
85
00:05:57,520 --> 00:05:59,520
一种是
86
00:05:59,520 --> 00:06:01,520
先判断
87
00:06:01,520 --> 00:06:03,520
第二种是
88
00:06:03,520 --> 00:06:05,520
至少做一遍
89
00:06:05,520 --> 00:06:07,520
然后再判断
90
00:06:07,520 --> 00:06:11,520
这个的话
91
00:06:11,520 --> 00:06:13,520
这个
92
00:06:13,520 --> 00:06:15,520
这个你看,这个对应的图
93
00:06:15,520 --> 00:06:17,520
比较好理解
94
00:06:17,520 --> 00:06:19,520
这个过来
95
00:06:19,520 --> 00:06:21,520
做一遍
96
00:06:21,520 --> 00:06:23,520
你看这里面
97
00:06:23,520 --> 00:06:25,520
这里面
98
00:06:25,520 --> 00:06:27,520
这是进来的
99
00:06:27,520 --> 00:06:29,520
也就是说,这个
100
00:06:29,520 --> 00:06:31,520
实际上是合并的点
101
00:06:31,520 --> 00:06:35,520
这个是合并的点
102
00:06:35,520 --> 00:06:37,520
它并不是决策点
103
00:06:37,520 --> 00:06:41,520
是把这边
104
00:06:41,520 --> 00:06:43,520
这边有令牌过来
105
00:06:43,520 --> 00:06:45,520
这边有没有不知道
106
00:06:45,520 --> 00:06:47,520
但是无所谓有没有
107
00:06:47,520 --> 00:06:49,520
这里有了,这两个合并
108
00:06:49,520 --> 00:06:51,520
过来
109
00:06:51,520 --> 00:06:53,520
所以它是有令牌的
110
00:06:53,520 --> 00:06:55,520
这个
111
00:06:55,520 --> 00:06:57,520
这个肯定要做一遍
112
00:06:57,520 --> 00:06:59,520
过来之后,你看这个
113
00:06:59,520 --> 00:07:01,520
这是进来的
114
00:07:01,520 --> 00:07:03,520
出去的,出去的
115
00:07:03,520 --> 00:07:05,520
这个才是
116
00:07:05,520 --> 00:07:07,520
才是条件
117
00:07:07,520 --> 00:07:09,520
条件在这里
118
00:07:11,520 --> 00:07:13,520
这是条件
119
00:07:13,520 --> 00:07:15,520
满足条件走这边
120
00:07:15,520 --> 00:07:17,520
不满足就终止了
121
00:07:17,520 --> 00:07:19,520
对吧
122
00:07:19,520 --> 00:07:21,520
这个是这个
123
00:07:21,520 --> 00:07:23,520
那
124
00:07:23,520 --> 00:07:25,520
第二个就是
125
00:07:25,520 --> 00:07:27,520
什么
126
00:07:27,520 --> 00:07:29,520
先判断
127
00:07:29,520 --> 00:07:31,520
我们看我们的图
128
00:07:31,520 --> 00:07:33,520
过来
129
00:07:33,520 --> 00:07:35,520
进来
130
00:07:35,520 --> 00:07:37,520
然后条件
131
00:07:37,520 --> 00:07:39,520
满足就做A1
132
00:07:39,520 --> 00:07:41,520
做A1之后
133
00:07:41,520 --> 00:07:43,520
你看,这个令牌释出来之后
134
00:07:43,520 --> 00:07:45,520
释放出来之后
135
00:07:45,520 --> 00:07:47,520
你看,这里过来
136
00:07:47,520 --> 00:07:49,520
它又回到这里来
137
00:07:49,520 --> 00:07:51,520
对不对
138
00:07:51,520 --> 00:07:53,520
实际上,也就是说这个
139
00:07:53,520 --> 00:07:55,520
这个菱形
140
00:07:55,520 --> 00:07:57,520
这有两个进入
141
00:07:57,520 --> 00:07:59,520
但是这个进
142
00:07:59,520 --> 00:08:01,520
这个进,它只发生一遍
143
00:08:01,520 --> 00:08:03,520
对不对
144
00:08:03,520 --> 00:08:05,520
这个过来以后
145
00:08:05,520 --> 00:08:07,520
146
00:08:07,520 --> 00:08:09,520
这个就没有了
147
00:08:09,520 --> 00:08:11,520
初始这个只发生一次
148
00:08:11,520 --> 00:08:13,520
然后这个令牌
149
00:08:13,520 --> 00:08:15,520
就被分叉
150
00:08:15,520 --> 00:08:17,520
过来的嘛,然后它得到令牌
151
00:08:17,520 --> 00:08:19,520
过来,过来
152
00:08:19,520 --> 00:08:21,520
所以这时候这个没有令牌了
153
00:08:21,520 --> 00:08:23,520
这地方令牌已经被它用掉了
154
00:08:23,520 --> 00:08:25,520
它没有再产生,令牌
155
00:08:25,520 --> 00:08:27,520
过这边来,这样
156
00:08:27,520 --> 00:08:29,520
假设条件满足
157
00:08:29,520 --> 00:08:31,520
不满足就完蛋了嘛
158
00:08:31,520 --> 00:08:33,520
就走了
159
00:08:33,520 --> 00:08:35,520
条件满足,就过来
160
00:08:35,520 --> 00:08:37,520
令牌从这里过来
161
00:08:37,520 --> 00:08:39,520
所以呢,它表面上是两个
162
00:08:39,520 --> 00:08:41,520
是两个进来,但其实这里只有一个进来
163
00:08:41,520 --> 00:08:43,520
对吧
164
00:08:43,520 --> 00:08:45,520
一个进来,然后就分叉
165
00:08:45,520 --> 00:08:47,520
只不过第一次的时候,是这个扮演的进来
166
00:08:47,520 --> 00:08:49,520
以后是这个来扮演
167
00:08:49,520 --> 00:08:51,520
以后是这个来扮演
168
00:08:51,520 --> 00:08:55,520
这样来
169
00:08:55,520 --> 00:08:59,520
这是
170
00:08:59,520 --> 00:09:01,520
这两种循环
171
00:09:01,520 --> 00:09:03,520
的画图
172
00:09:03,520 --> 00:09:05,520
那这里面
173
00:09:05,520 --> 00:09:07,520
有一个要注意的
174
00:09:07,520 --> 00:09:09,520
就是说,像这个,比如说,循环
175
00:09:09,520 --> 00:09:11,520
假设这个
176
00:09:11,520 --> 00:09:13,520
你看这里
177
00:09:13,520 --> 00:09:15,520
两个进来
178
00:09:15,520 --> 00:09:17,520
这样过来,合并
179
00:09:17,520 --> 00:09:19,520
这样过来
180
00:09:19,520 --> 00:09:21,520
假设
181
00:09:21,520 --> 00:09:23,520
不要这个呢
182
00:09:23,520 --> 00:09:25,520
不要这个点
183
00:09:25,520 --> 00:09:27,520
我直接画这里,这个不行
184
00:09:27,520 --> 00:09:29,520
为什么,你看这个是动作
185
00:09:29,520 --> 00:09:31,520
动作
186
00:09:31,520 --> 00:09:33,520
它就严格要求什么
187
00:09:33,520 --> 00:09:35,520
如果有多个入边
188
00:09:35,520 --> 00:09:37,520
那每个入边都要有令牌才可以
189
00:09:37,520 --> 00:09:39,520
但是它是等不到
190
00:09:39,520 --> 00:09:41,520
两个令牌的,为什么,因为
191
00:09:41,520 --> 00:09:43,520
这个令牌过来
192
00:09:43,520 --> 00:09:47,520
这个令牌是什么
193
00:09:47,520 --> 00:09:49,520
是由这边过来
194
00:09:49,520 --> 00:09:51,520
但是这边的令牌
195
00:09:51,520 --> 00:09:53,520
怎么来的,它是从这边过来
196
00:09:53,520 --> 00:09:55,520
满足条件又回来的
197
00:09:55,520 --> 00:09:57,520
所以呢,你这个令牌
198
00:09:57,520 --> 00:09:59,520
过不去,它就没有办法过来
199
00:09:59,520 --> 00:10:01,520
你的令牌要能够过去的话
200
00:10:01,520 --> 00:10:03,520
怎么样
201
00:10:03,520 --> 00:10:05,520
你这里面就要有令牌
202
00:10:05,520 --> 00:10:07,520
所以它就死在这里了
203
00:10:07,520 --> 00:10:09,520
也就是说,A1
204
00:10:09,520 --> 00:10:11,520
它不会执行的
205
00:10:11,520 --> 00:10:13,520
但这个不叫非法,因为
206
00:10:13,520 --> 00:10:15,520
没准你就是让它卡在这里
207
00:10:15,520 --> 00:10:17,520
它只是说卡在这里
208
00:10:17,520 --> 00:10:19,520
并不非法
209
00:10:19,520 --> 00:10:21,520
210
00:10:21,520 --> 00:10:23,520
这个也是一种形状
211
00:10:23,520 --> 00:10:25,520
就像围棋里面
212
00:10:25,520 --> 00:10:27,520
死棋一样,不能说
213
00:10:27,520 --> 00:10:29,520
死棋是非法的
214
00:10:29,520 --> 00:10:31,520
它就死在这里了
215
00:10:31,520 --> 00:10:35,520
所以呢,这里,你看这里
216
00:10:35,520 --> 00:10:37,520
这里
217
00:10:37,520 --> 00:10:39,520
就不需要,因为这是合并点
218
00:10:39,520 --> 00:10:41,520
两个
219
00:10:41,520 --> 00:10:43,520
把这边令牌
220
00:10:43,520 --> 00:10:45,520
合成一个
221
00:10:45,520 --> 00:10:47,520
不管有没有
222
00:10:47,520 --> 00:10:49,520
有就有,没有就没有
223
00:10:49,520 --> 00:10:51,520
合成一个
224
00:10:55,520 --> 00:10:57,520
这是决策点
225
00:10:57,520 --> 00:11:01,520
下面
226
00:11:01,520 --> 00:11:03,520
我们用这个决策点来做一个题
227
00:11:03,520 --> 00:11:05,520
这个
228
00:11:05,520 --> 00:11:07,520
案例描述里面有这么一句话
229
00:11:07,520 --> 00:11:09,520
如果奖品是实物
230
00:11:09,520 --> 00:11:11,520
首先要抽奖了
231
00:11:11,520 --> 00:11:13,520
用这个软件抽奖
232
00:11:13,520 --> 00:11:15,520
看案例描述里面
233
00:11:15,520 --> 00:11:17,520
有一个抽奖的动作
234
00:11:17,520 --> 00:11:19,520
抽奖,如果奖品是实物,就这样
235
00:11:19,520 --> 00:11:21,520
用活动图
236
00:11:23,520 --> 00:11:25,520
把这个画出来
237
00:11:25,520 --> 00:11:27,520
把这个过程画出来
238
00:11:27,520 --> 00:11:29,520
泳道可以不用画
239
00:11:29,520 --> 00:11:31,520
比如说,这个是老师干的
240
00:11:31,520 --> 00:11:33,520
这是学生干的
241
00:11:33,520 --> 00:11:35,520
这是抽奖软件干的
242
00:11:35,520 --> 00:11:37,520
这微信干的
243
00:11:37,520 --> 00:11:39,520
这不用画
244
00:11:39,520 --> 00:11:41,520
你就说干了什么就行了
245
00:11:41,520 --> 00:11:43,520
是哪个系统干的,泳道不用画,还没讲