The Driver

Below is my Driver code. Create a class called PlayerDriver. Copy and paste my driver code below into your class. If everything was done correctly, no errors should occur and you should be able to run your simulation and check out the game. All of the game probabilities are made in the driver, so you can alter the if statements if you feel comfortable to give different players different advantages to win.

I would also encourage you to look through my code as a little foreshadow in the future. Notice my ArrayList of players? How nice is it to have an inheritance hierarchy so that I can do one list for both players and imposters. On top of the fact that they all have same methods so I can tell imposters and crewmate to do tasks and they do different things.

You can also observe my "clever" way of using final static ints in the program. I use the gameOver variable to record if the game is playing, or if the crew or imposter won. Originally, I wanted a boolean to say if the game was over, but then I couldn't easily detect which team won. So I use an int to record different statuses instead. What I like best is that each variable has a unique value, but then I set the gameOver variable equal to a READABLE state such as NO, to make it a lot easier to read. You can recall you were told to put a few lines in the other classes that I already wrote.

Unit 3 Lab Experience Driver