Question: C++ help with a game. Need help writing code for ai and player input of the game. With given API: Appendix C: API Movement Description

C++ help with a game. Need help writing code for ai and player input of the game.

With given API:

C++ help with a game. Need help writing code for ai and

player input of the game. With given API: Appendix C: API Movement

Appendix C: API Movement Description Return Type Function void void void void void void start() forward( Moves forward in the direction of the bot's rotation. backward Moves backward opposite the direction of the bot's rotation. rotateLeft() Rotates the bot counter-clockwise rotateRight() Rotates the bot clockwise skip() Must be called at the start of the game Skips the current turn. Game Data Return Type Function getMyScore() Counts the number of cells painted in your color getTurn( s the current turn number [first turn is e). getMaxTurns() Gets the maximum number of turns the game can last. isPlaying() Indicates whether or not the game is still in progress int Sensors Return Type Function Description Gets the bot's angle of rotation (e-up, 90- right, 180 - down, 270- left]. Gets the bot's x coordinate. Gets the bot's y coordinate. Gets the number of columns in the game map. Gets the number of rows in the game map int getRotation() getx() getY() getXSize() getYSize() isInBounds(int x, int y) Indicates whether or not [x, y) is in the map. isBlocked (int x, int y) Indicates whether or not [x, y) is currently unavailable to move to isMyColor(int x, int y) Indicates whether or not [x, y] is painted in your color int Appendix C: API Movement Description Return Type Function void void void void void void start() forward( Moves forward in the direction of the bot's rotation. backward Moves backward opposite the direction of the bot's rotation. rotateLeft() Rotates the bot counter-clockwise rotateRight() Rotates the bot clockwise skip() Must be called at the start of the game Skips the current turn. Game Data Return Type Function getMyScore() Counts the number of cells painted in your color getTurn( s the current turn number [first turn is e). getMaxTurns() Gets the maximum number of turns the game can last. isPlaying() Indicates whether or not the game is still in progress int Sensors Return Type Function Description Gets the bot's angle of rotation (e-up, 90- right, 180 - down, 270- left]. Gets the bot's x coordinate. Gets the bot's y coordinate. Gets the number of columns in the game map. Gets the number of rows in the game map int getRotation() getx() getY() getXSize() getYSize() isInBounds(int x, int y) Indicates whether or not [x, y) is in the map. isBlocked (int x, int y) Indicates whether or not [x, y) is currently unavailable to move to isMyColor(int x, int y) Indicates whether or not [x, y] is painted in your color int

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!