用于棋盘游戏的用例图(Use Case diagram for board game)

编程入门 行业动态 更新时间:2024-10-24 00:28:37
用于棋盘游戏的用例图(Use Case diagram for board game)

我正在为我编写的跳棋游戏创建一个用例图。 在制作这些图像时你应该如何深入? 我读到他们应该很简单,但那是含糊不清的。 我是否需要创造更多的箭,例如在“常规移动”(意味着移动一块普通的棋子,与国王对抗)和“跳跃”之间? 或者没有连接在那里没有关系? 我只是不想制造太多的箭,因为它会显得很杂乱。 任何输入将不胜感激。

I'm creating a use case diagram for a checkers game that I programmed. How in-depth are you really supposed to go when making these? I read that they are supposed to be simple, but that is kind of vague. Do I need to create more arrows, for example between "move regular" (which means move a regular piece, as oppose to a king) and "jump"? Or is it fine not having a connection there? I just don't want to make too many arrows because it will begin to look pretty messy. Any input will be appreciated.

最满意答案

1)..UML ..图表.. ..深入你.. ..被假定为..我需要..更多的箭头..不想要.. .. ..看.. ..女士..?

如何深入和多么简单取决于许多因素,基本上是回答“为什么你需要它”“谁会读它”

实际上,可以帮助您做出决定的一系列问题和指南以及其他做法可能会相当长。 在Scott W. Ambler的在线书籍Agine Modeling:敏捷/精益文档:敏捷软件开发策略一章中列出了特别有用的一个。

你应该清楚的一件事是你需要什么类型的UML图

2)UML ..使用案例..更多箭头或..没有连接..很多箭头..?

用例图中的箭头不是任意的连接线,而是它们具有确切的含义,特别是<<include>>和<<extend>>关系,请参阅http://www.uml-diagrams.org/use-case -reference.html的定义和例子

在这里输入图像描述

除了图形泡沫外,用例还表示角色与设计系统之间的交互方式。 然后用更多/更少形式化的文本形式描述气泡的内容,参见维基百科:用例 ,尤其是Alistair Cockburn的用例页面,因为他基本上定义了该术语的含义(后来被UML采用),他的意见很重要。

3)我正在为我编程的跳棋游戏创建一个..UML ..图。

在你的情况下, King Piece泡沫似乎并没有包含或扩展由Player发起的Start Game泡泡,我看不到在其文本表示(或代码中)内可能隐藏的步骤顺序。

你开始画的东西看起来更像UML活动图 ,一个例子

在这里输入图像描述

和一些解释链接:

概述Debenedetti Emanuele,UML 2.0中的活动图 Conrad Bock(UML作者之一)的背景,UML 2活动和行为模型,对象技术杂志 UML 2活动和行动模型 UML 2活动和动作模型,第2部分:动作 UML 2活动和动作模型,第3部分:控制节点 UML 2活动和动作模型,第4部分:对象节点 UML 2活动和动作模型,第5部分:分区 UML 2活动和行动模型,第6部分:结构化活动 工具手册 PaceStar UML Diagrammer ,UML图表指南 - http://www.pacestar.com/uml/udg60.pdf Sparx企业架构师 ,使用UML第二部分 - 行为建模图 - http://www.sparxsystems.com.au/downloads/whitepapers/UML_Tutorial_Part_2_Introduction.pdf Microsoft Visual Studio ,UML活动图表 - http://msdn.microsoft.com/en-us/library/vstudio/dd409360.aspx

1) ..UML..diagram..how in-depth are you..supposed to..do I need..more arrows..don't want..it..look..messy..?

How in-depth and how simple depends on many factors, basically on an answer to "why you need it" and "who will read it".

Actually the set of questions and guides and other practices that can help you decide can be quite long. Especially useful one is listed in the chapter Agine Modeling: Agile/Lean Documentation: Strategies for Agile Software Development in Scott W. Ambler's online book.

One thing that you should get absolutely clear is what kinds of UML diagrams you need/want

2) UML..use case diagram..more arrows..or..no..connection..too many arrows..?

The arrows in use case diagrams are not an arbitrary connection lines but instead they have precise meaning, especially the <<include>> and <<extend>> relationship, see http://www.uml-diagrams.org/use-case-reference.html for their definition and examples

enter image description here

Besides being graphical bubbles the use case represent how an actor interacts with the System Under Design. Content of the bubbles is then described in more/less formalized text form, see Wikipedia: Use case and especially Alistair Cockburn's use case pages as he basically defined meaning of the term (later adopted by UML) his opinion matters.

3) I'm creating a..UML..diagram for a checkers game that I programmed..

In your case the King Piece bubble does not seem to be included-in or extending the Start Game bubble initiated by the Player and I don't see what sequence of steps might be hidden inside its textual representation (or in your code).

The things you began to draw look much more like UML Activity Diagram, an example

enter image description here

and some explaining links:

overview Debenedetti Emanuele, Activity diagrams in UML 2.0 background by Conrad Bock (one of UML authors), UML 2 Activity and Action Models, The Journal of Object Technology UML 2 Activity and Action Models UML 2 Activity and Action Models, Part 2: Actions UML 2 Activity and Action Models, Part 3: Control Nodes UML 2 Activity and Action Models, Part 4: Object Nodes UML 2 Activity and Action Models, Part 5: Partitions UML 2 Activity and Action Models, Part 6: Structured Activities tool manuals PaceStar UML Diagrammer, UML Diagramming Guide - http://www.pacestar.com/uml/udg60.pdf Sparx Enterprise Architect, Using UML Part Two – Behavioral Modeling Diagram - http://www.sparxsystems.com.au/downloads/whitepapers/UML_Tutorial_Part_2_Introduction.pdf Microsoft Visual Studio, UML Activity Diagrams - http://msdn.microsoft.com/en-us/library/vstudio/dd409360.aspx

更多推荐

本文发布于:2023-07-15 19:13:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1117714.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:棋盘   游戏   用例图   Case   board

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!