活动图中不同参与者的可选活动和重复活动 [英] Optional activity and repeating activity for different actors in an activity diagram

查看:297
本文介绍了活动图中不同参与者的可选活动和重复活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个游戏正在尝试为其创建活动图,但遇到了一些问题。

I've got a game that I'm trying to create an activity diagram for but I run into some problems.

到目前为止,我的尝试如下所示:

My try so far looks like this:

这说明流程很好,创建了GUI-> Player执行动作一个->动作2->结束。

This shows the flow good, the GUI is created -> Player performs actions one -> Action Two -> Ends turn.

但是我真正不喜欢的是如何解决动作3。它应该是可选的,并且可以从系统创建GUI操作一直执行到玩家结束转身为止。不过,执行动作三仍然不能使玩家在主循环中来回移动。

But what I don't really like is how I could solve action 3. It is suppose to be optional and can be performed anytime from the "System creates GUI" action up until "Player ends turn". Though, performing action three still doesn't move the player back or forth in the "main cycle".

游戏中有4位玩家经历相同的周期,但我不确定这是否是一个很好的方法。

The game has 4 players that go through the same cycle but I'm not sure this is a very good way to do it.

推荐答案

如何使用Fork and Join呢?

How about this using Fork and Join?

这篇关于活动图中不同参与者的可选活动和重复活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆