Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started