StendhalDesign: Difference between revisions

Content deleted Content added
No edit summary
Line 30:
We need to use several use cases to describe our game.
===Player's user case===
* Player enter village in entry point
* Player moves to Farm zone
* Player talks with Sheep seller
<pre>
Player: Hienter village in entry point
* Player moves to Farm zone
Seller: Greetings! How may I help you?
 
Player: buy Sheep
Seller:Player Dotalks you want to buy awith Sheep for 50 coins?seller
Player: yesHi
Seller: Thank youGreetings! ByeHow may I help you?
Player: buy Sheep
Buyer Seller: Do you want to sellbuy thisa Sheep for 7350 coins?
Player: yes
Buyer Seller: Thank you! Bye
 
* Player moves. Sheep follows Player.
* Player moves to plains
* Player moves around looking for food
* Player protect Sheep of wolves attacks
 
* When Sheep is big enough Player moves to Village
* Player talks with Sheep sellerbuyer
Player: Hi
Seller Buyer: Greetings! How may I help you?
Player: sell Sheep
** Seller says " Buyer: Do you want to buysell athis Sheep for 5073 coins?"
Player: yes
Buyer: Thank you! Bye
 
* Player spend money in new Sheep and equipment
*# Armor
*# Weapon
*# Healing potions
</pre>
* Player moves. Sheep follows Player.
* Player moves to plains
* Player moves around looking for food
* Player protect Sheep of wolves attacks
* When Sheep is big enough Player moves to Village
* Player talks with Sheep buyer
<pre>
Player: Hi
Buyer: Greetings! How may I help you?
Player: sell Sheep
Buyer: Do you want to sell this Sheep for 73 coins?
Player: yes
Buyer: Thank you! Bye
</pre>
* Player spend money in new Sheep and equipment
*# Armor
*# Weapon
*# Healing potions
 
===Sheep seller's user case===
<pre>
FOREVER do:
* Listen to Player
 
* If listen "Hi":
** Seller says "Greetings <Player>!"
* If listen "Buy Sheep"Seller fromsays "Greetings <Player:>!"
 
** Seller says "Do you want to buy a Sheep for 50 coins?"
* If listen "yesBuy Sheep" from Player:
** Seller says "Do you want to sell buy a Sheep for <estimated price>50 coins?"
** If Player money - 50 > 0:
 
*** set Player money=Player money - 50
* If listen "yes" from Player:
*** Duplicate Sheep
*** Make Sheep follows If Player money - 50 > 0:
* Say bye to set Player money=Player money - 50
*** Duplicate Sheep
Make Sheep follows Player
Say bye to Player
DONE
<pre>
 
===Sheep buyer's user case===
<pre>
FOREVER do:
* Listen to Player
 
* If listen "Hi":
** Seller says "Greetings <Player>!"
* If listen "Sell Sheep"Seller fromsays "Greetings <Player:>!"
 
** Estimate Sheep value related to Sheep weight
If listen "Sell Sheep" from Player:
** Seller says "Do you want to sell buy a Sheep for <estimated price> coins?"
** Estimate Sheep value related to Sheep weight
* If listen "yes" from Player:
** set Player money=Player moneySeller +says "Do you want to sell buy a Sheep for <estimated price> coins?"
** Destroy Sheep
* Say byeIf tolisten "yes" from Player:
*** set Player money=Player money -+ <estimated 50price>
** Destroy Sheep
Say bye to Player
DONE
</pre>
 
===Sheep's user case===
<pre>
* Sheep is in Farm
* Player buys Sheep is in Farm
* Sheep sellerPlayer duplicatesbuys Sheep
* Sheep followsseller Playerduplicates Sheep
* If Sheep findsfollows food:Player
 
** Sheep moves to food
** If Sheep eatsfinds food:
** Sheep gainsmoves to weightfood
* Player sells Sheep eats food
* Sheep dissappeargains weight
 
* Player talks withsells Sheep buyer
Sheep dissappear
</pre>
 
===Wolf's user case===
<pre>
* Wolf moves
* If Wolf sees Sheep:moves
** If Wolf attackssees Sheep:
* If Wolf isattacks attacked:Sheep
** Wolf attacks Attacker
If Wolf is attacked:
** Wolf attacks Attacker
</pre>
 
 
== Entities ==