代写Fireboy and Watergirl代写留学生Java程序

- 首页 >> Database作业

2. Fireboy and Watergirl (30 points)

Welcome to the Fireboy and Watergirl assignment! in this assignment you will practice recursion in combination with previously leamed concepts.

Start your assignment early! You need time to understand the assignment and to answer the many questions that will arise as you read the description and the code provided.

Refer to our Programming Assignments FAQ for instructions on how to install Vscode, how to use the command line and how to submit your assignments.

Overview

In this assignment, you will implement a recursive function using conditionals to check for safe paths forward. This assignment simulates the Eireboy and Watergidl game, and your program is meant to find a safe path by checking for any hazards and if so, moving the character back until they can find another path forward. This pattern continues until both characters find the exit.

In the original Fireboy and Watergirl game, both characters have hazards to avoid and diamonds to collect. In your program, both characters must avoid the green goo. Fireboy can walk through lava and will collect fire diamonds but must avoid water. Watergirl can walk through water and will collect water diamonds but must avold lava.

Implementation

Overview of files provided

• FireboyAndWatergirl.java - You will complete one function within the FireboyAndWatergirl class to implement the game functionality. You will submit this file to Autolab.

• Multiple input files are included; they store example mazes including an integer representing the dimension of the maze followed by characters representing each maze cell's contents. You are welcome to create your own input files, as they will not be submitted to Autolab.

FireboyAndWatergirl.java

• DO NOT add new import statements.

• DO NOT change any of the method's signatures.






站长地图