StendhalDesign: Difference between revisions
Content deleted Content added
No edit summary |
No edit summary |
||
Line 26:
We need to use several use cases to describe our game.
===Player's user case===
<pre>
Player: Hi
Line 37:
Seller: Thank you! Bye
</pre>
<pre>
Player: Hi
Line 51:
Buyer: Thank you! Bye
</pre>
===Pig seller's user case===
FOREVER do:
* Listen to Player
* If listen "Hi":
** Seller says "Greetings <Player>!"
* If listen "Buy pig" from Player:
** Seller says "Do you want to buy a pig for 50 coins?"
* If listen "yes" from Player:
** If Player money - 50 > 0:
*** set Player money=Player money - 50
*** Duplicate Pig
*** Make Pig follows Player
* Say by to Player
DONE
===Pig's user case===
* Pig is in Farm
* Player buys Pig
* Pig seller duplicates Pig
* Pig follows Player
* If Pig finds food:
** Pig moves to food
** Pig eats food
** Pig gains weight
* Player sells Pig
* Pig dissappear
===Wolf's user case===
* Wolf moves
* If Wolf sees Pig:
** Wolf attacks Pig
* If Wolf is attacked:
** Wolf attacks Attacker
| |||