Question: 3 . Write an LC - 3 program that flattens a 3 x 3 area centred underneath the player. a ) Place your code in
Write an LC program that flattens a x area centred underneath the player.
a Place your code in the assembly file terraformasm
b Let h denote the height of the land at the x z location of the player. The height of the x area centred underneath the player should be levelled so that it all has a height of h
c Locations with a land height of less than h should be built up to the required height by
placing cobblestone blocks block ID # Be careful not to replace any blocks unnecessarily; only air blocks should be replaced with cobblestone.
d Locations with a land height of more than h should be cut down to the required height by replacing nonair blocks with air blocks block ID #
e For the purposes of this problem, land height is defined as the yposition of the highest nonair block at the given xz coordinates.
f See Figure for a visual explanation note the filled blocks should be cobblestone, not dirt
Please give me the exact code needed for this specific problem.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
