Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Homework R Write a function that takes as inputs a robot location and a terrain Map. The Map is a grid like the one from

image text in transcribed

Homework R Write a function that takes as inputs a robot location and a terrain Map. The Map is a grid like the one from activity 3 and each cell has a number associated with a terrain type (0-asphalt, 1-grass, 2-sand). Your function should return a string associated to the gait to be employed by the robot e.g., slow, medium, fast. void getGait (int x, int y, int *terrainMap, char* gaitSpeed) Wite a second function getLocalTerrain, which takes as inputs the current x,y robot location and the terrain map. The function should return the predominant terrain surrounding the robot. That is you need to look at all neighboring cells (N,S,E,W when applicable) and select the terrain that shows up the most. If there are ties, choose the worst terrain type. int getLocalTerrain(int x, int y, int *terrainMap) BVML3811 Homework R Write a function that takes as inputs a robot location and a terrain Map. The Map is a grid like the one from activity 3 and each cell has a number associated with a terrain type (0-asphalt, 1-grass, 2-sand). Your function should return a string associated to the gait to be employed by the robot e.g., slow, medium, fast. void getGait (int x, int y, int *terrainMap, char* gaitSpeed) Wite a second function getLocalTerrain, which takes as inputs the current x,y robot location and the terrain map. The function should return the predominant terrain surrounding the robot. That is you need to look at all neighboring cells (N,S,E,W when applicable) and select the terrain that shows up the most. If there are ties, choose the worst terrain type. int getLocalTerrain(int x, int y, int *terrainMap) BVML3811

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_2

Step: 3

blur-text-image_3

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

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions

Question

Define done of lymphocytes.

Answered: 1 week ago

Question

b. What are its goals and objectives?

Answered: 1 week ago