Question: I need help with a program in C++. 16.14 Homework 10a : Partial Lightbot Interpreter The game Lightbot https://en.wikipedia.org/wiki/Lightbot is a popular game that teaches

I need help with a program in C++.

I need help with a program in C++. 16.14 Homework 10a :Partial Lightbot Interpreter The game "Lightbot https://en.wikipedia.org/wiki/Lightbot is a popular game thatteaches programming concepts. In the game, players write programs in a simplelanguage to direct a robot around a 2D grid and switch on

16.14 Homework 10a : Partial Lightbot Interpreter The game "Lightbot https://en.wikipedia.org/wiki/Lightbot is a popular game that teaches programming concepts. In the game, players write programs in a simple language to direct a robot around a 2D grid and switch on lights at specific grid cells In this program, you will write an interpreter for a language similar to the Lightbot language. The interpreter will take as input an initial board configuration, including the location of the robot (the robot always starts facing to the right), and a program. It must then compute the resulting board configuration, and determine whether the bot will win the level or not (by switching on all the lights and stopping without dying). "Switching on a square toggles the light if there is one, and does nothing otherwise. Language Commands: Left rotate left 90 degrees rotate right 90 degrees go forward one square toggle light if there is one in the current square Right Forward Switch If Condition Statements Check the condition. If it is true, execute the statements, otherwise skip to after the close) Possible conditions: forwardOpen, backOpen, leftOpen, rightOpen forwardClosed, backClosed, leftClosed, rightClosed hasLight, lightOn, lightoff 16.14 Homework 10a : Partial Lightbot Interpreter The game "Lightbot https://en.wikipedia.org/wiki/Lightbot is a popular game that teaches programming concepts. In the game, players write programs in a simple language to direct a robot around a 2D grid and switch on lights at specific grid cells In this program, you will write an interpreter for a language similar to the Lightbot language. The interpreter will take as input an initial board configuration, including the location of the robot (the robot always starts facing to the right), and a program. It must then compute the resulting board configuration, and determine whether the bot will win the level or not (by switching on all the lights and stopping without dying). "Switching on a square toggles the light if there is one, and does nothing otherwise. Language Commands: Left rotate left 90 degrees rotate right 90 degrees go forward one square toggle light if there is one in the current square Right Forward Switch If Condition Statements Check the condition. If it is true, execute the statements, otherwise skip to after the close) Possible conditions: forwardOpen, backOpen, leftOpen, rightOpen forwardClosed, backClosed, leftClosed, rightClosed hasLight, lightOn, lightoff

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!