StendhalDesign: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
No edit summary
Line 30: Line 30:
We need to use several use cases to describe our game.
We need to use several use cases to describe our game.
===Player's user case===
===Player's user case===
* Player enter village in entry point
* Player moves to Farm zone
* Player talks with Sheep seller
<pre>
<pre>
Player: Hi
Player enter village in entry point
Player moves to Farm zone
Seller: Greetings! How may I help you?

Player: buy Sheep
Seller: Do you want to buy a Sheep for 50 coins?
Player talks with Sheep seller
Player: yes
Player: Hi
Seller: Thank you! Bye
Seller: Greetings! How may I help you?
Player: buy Sheep
Seller: Do you want to buy a Sheep for 50 coins?
Player: yes
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 buyer
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

Player spend money in new Sheep and equipment
* Armor
* Weapon
* Healing potions
</pre>
</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===
===Sheep seller's user case===
<pre>
FOREVER do:
FOREVER do:
* Listen to Player
Listen to Player

* If listen "Hi":
If listen "Hi":
** Seller says "Greetings <Player>!"
* If listen "Buy Sheep" from Player:
Seller says "Greetings <Player>!"

** Seller says "Do you want to buy a Sheep for 50 coins?"
* If listen "yes" from Player:
If listen "Buy Sheep" from Player:
Seller says "Do you want to buy a Sheep for 50 coins?"
** If Player money - 50 > 0:

*** set Player money=Player money - 50
If listen "yes" from Player:
*** Duplicate Sheep
*** Make Sheep follows Player
If Player money - 50 > 0:
* Say bye to Player
set Player money=Player money - 50
Duplicate Sheep
Make Sheep follows Player
Say bye to Player
DONE
DONE
<pre>


===Sheep buyer's user case===
===Sheep buyer's user case===
<pre>
FOREVER do:
FOREVER do:
* Listen to Player
Listen to Player

* If listen "Hi":
If listen "Hi":
** Seller says "Greetings <Player>!"
* If listen "Sell Sheep" from Player:
Seller says "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 money + <estimated price>
Seller says "Do you want to sell buy a Sheep for <estimated price> coins?"
** Destroy Sheep
* Say bye to Player
If listen "yes" from Player:
set Player money=Player money + <estimated price>
Destroy Sheep
Say bye to Player
DONE
DONE
</pre>


===Sheep's user case===
===Sheep's user case===
<pre>
* Sheep is in Farm
* Player buys Sheep
Sheep is in Farm
* Sheep seller duplicates Sheep
Player buys Sheep
* Sheep follows Player
Sheep seller duplicates Sheep
* If Sheep finds food:
Sheep follows Player

** Sheep moves to food
** Sheep eats food
If Sheep finds food:
** Sheep gains weight
Sheep moves to food
* Player sells Sheep
Sheep eats food
* Sheep dissappear
Sheep gains weight

Player sells Sheep
Sheep dissappear
</pre>


===Wolf's user case===
===Wolf's user case===
<pre>
* Wolf moves
* If Wolf sees Sheep:
Wolf moves
** Wolf attacks Sheep
If Wolf sees Sheep:
* If Wolf is attacked:
Wolf attacks Sheep
** Wolf attacks Attacker
If Wolf is attacked:
Wolf attacks Attacker
</pre>



== Entities ==
== Entities ==