waaronmorris / CS162_Group_15_Project_1

0 stars 1 forks source link

Application Driver Function (Main Function) #6

Open waaronmorris opened 6 years ago

waaronmorris commented 6 years ago

Initialize the world with 5 doodlebugs and 100 ants. You will randomly place them on the grid. You will prompt the user to enter the number of time steps to run.

For each time step, do the following in your program: after moves, when breeding, eating, and starving are resolved, display the resulting grid. Draw the world using ASCII characters of “O” for an ant, “X” for a doodlebug and blank space for an empty space (the characters should be arranged to look like a grid). The doodlebugs will move before the ants in each time step. When you reach the time steps entered by the user, ask them to enter another number and start to run the simulation again or to exit the program. You must maintain the state of the current grid while creating the next display.

You should use a dynamic array to represent the grid. Each array element will be a pointer to a Critter. Get your program running and tested. You should see a cyclical pattern between the population of predators and prey, although random perturbations may lead to the elimination of one or both species.

For debugging your program, you should save the random placement until you have everything else working properly. In general, “random” is bad for testing and debugging.

waaronmorris commented 6 years ago

A lot of this will be implemented in the runBoard() function. Just need to implement a utility function to gather the size of the board. As well as any other user input.

ixm-ibrahim commented 6 years ago

Got it! Will get this done.

ixm-ibrahim commented 6 years ago

Got randomized ant and doodlebug positions working, waiting on the files to be readded for me to push.

waaronmorris commented 6 years ago

Awesome...I'll work on the write up and have it ready for everyone to review tomorrow morning. @Ibrahim9999, I'm totally glad you did that because I was prepared to just finish coding it tonight. Is there anything else we need to do?

ixm-ibrahim commented 6 years ago

I think just finishing the doodlebug files, bug fixing, and reflection document is all we need left! We might need to polish up on the output of the Board but as I haven't been able to successfully compile it yet we'll see.

-I should add, I wasn't able to test out the functions I made due to the program not compiling, so there may be some errors in what I did

ixm-ibrahim commented 6 years ago

@waaronmorris I finished removing all the bugs. The only one I didn't remove is in the Board destructor, where the "auto" keyword doesn't compile on the OSU servers. I don't know the proper syntax for maps nor what they exactly do in relation to our project, so I left it alone. The last things we need are:

  1. Reflecting document with testing tables (I can do the menu-related ones)
  2. Finishing file comment headers, most of them are either empty or refer to the Langton's Ant project
  3. Testing to make sure the project fully fits the requirements