Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DISCRETE MATH: CONSTRUCT A FINITE STATE DIAGRAM TO MODEL THE GAME You are going to develop a simple shooting game. There is one hero in

DISCRETE MATH: CONSTRUCT A FINITE STATE DIAGRAM TO MODEL THE GAME

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago