Samasaur1 / CityManagement

A text-based city management game
3 stars 7 forks source link

Debt flag not working #3

Closed Samasaur1 closed 6 years ago

Samasaur1 commented 6 years ago

When you say buy food 100 and you don't have enough money to cover that, the game refuses to let you buy it. This is correct. However, when you use a d flag in the 4th word, like buy food 100 d, the game should let you go into debt. This doesn't work.

My suspicions are:

Samasaur1 commented 6 years ago

After 1d30fb1fa503b8ec268c0713b19e4327dd33cdb1, the debt flag works if you use ddd ddd after your buy command. This is even more confusing. I have tested this. It only works with TWO ddds. Furthermore, they HAVE to be 3 ds, as in ddd.

Samasaur1 commented 6 years ago

After 82f31eb764da9e47374a32845a44a25bd950a522, the debt flag works if you use d d after your buy command. The problem is now that you have to do it twice.

Samasaur1 commented 6 years ago

Further testing, still on 82f31eb764da9e47374a32845a44a25bd950a522, has shown that the final word does not need to be a d. It only needs to exist. This basically confirms that there is a problem with followingWords.size() <= 3 and not !(followingWords.get(2).charAt(0) == "d".charAt(0))

Samasaur1 commented 6 years ago

After d883bbf80edbe881da06d9a301cc07d0729ccf2d, you can now go into debt with only one d! We are now halfway there!

Samasaur1 commented 6 years ago

I guess we were most of the way there. Either way, we can now go into debt with one word that contains a d in it. Well done, team!

PS: Self-congratulation works wonders on productivity levels