jeudi 24 octobre 2019

Implementation of simple monster battle game with user selected variables

I am creating a simple battle game where the user selects two of four types of monsters to battle (werewolf, ghost, ghoul, demon). Per the requirements each monster is a child class of the parent class Monster.

I am having a lot of trouble figuring out how to let the user play the game. Since the user selects the type of monsters, the only way I can think to implement the different play combinations is through separate if loops based on the input selection. This is messy and inefficient. Any suggestions on alternative options is greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire