Question: You are going to develop a simple shooting game. There is one hero in a battle field with few enemies and other characters. There are

 You are going to develop a simple shooting game. There is

You are going to develop a simple shooting game. There is one hero in a battle field with few enemies and other characters. There are three states in the game which are WANDER, EVADE and ATTACK. When the hero is wandering the field and suddenly encounters enemies while he is not in vulnerable situation, he will go into ATTACK stage by shooting the enemies. However, if while wandering the field and the hero suddenly encounters enemies and he is in vulnerable situation, he will shoot the enemies and goes into EVADE stage. While in ATTACK stage, if the hero encounters enemies and he is not vulnerable, he will remain in that stage and continues shooting. But if he encounters enemies and he is vulnerable, he will shoot and goes into EVADE stage. While in EVADE stage, if the hero encounters enemies and he is not vulnerable, he will go into ATTACK stage and shoots. But if he encounters enemies and he is vulnerable, he will remain in that stage and continues shooting. When the hero encounters characters that are not his enemies, he will not shoot. If he is in the WANDER stage at that time, he will continue wandering the field. If he is in ATTACK or EVADE stages, he will switch into WANDER stage. The inputs and outputs are given in the Table 1 below. Construct a finite state diagram to model the game. Table 1 Input Output not enemies shoot enemies & not vulnerable not shoot enemies & vulnerable

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!