Roombrah

This project gave me practice with the concepts of file reading, object oriented programming, and arrays.

The simulator had to follow these conditions:

  1. Load a map of the house comprised of wall and dirt pieces.
  2. It will create a Roombrah that will move diagonally around the room.
  3. Whenever the Roombrah touches a wall it will bounce off the wall.
  4. Whenever the Roombrah touches a piece of dirt it removes the dirt.

The project was split into two parts. For the first part of the project we had to design a map, and we were given an algorithm to turn into code. The program had to read the file and examine each character. If the character was labeled a ā€œWā€ that stood for a wall, and ā€œDā€ stood for dirt. Here is an example of the map:

For the second part of the project we I had to use my knowledge of Object Oriented Programming. I created a Roombrah class, which controlled the movement of the roombrah. Whenever the roombrah would hit a wall, it would have to bounce of the wall and head in another direction. If the roombrah came across dirt it had to clean it up.

You can see the full simulation here: https://www.youtube.com/watch?v=DG5AZFdsSWc