Text Battle Simulator

Text Battle Simulator

This is a simulator of battles in which swordsmen, archers, cavalry and war elephants can take part. Set the characteristics of the two armies and see which one wins!

You can specify the characteristics of two armies (name and number of troops) and watch a simulation of their battle in text form. Each warrior has damage and lives. All warriors take turns attacking the enemy and dealing damage to him. Archers shoot at the beginning of the battle and deal damage to the enemy from a distance. After the end of the firefight, the remaining warriors pounce on the enemy.

I wrote the battle simulation code six months ago for my telegram bot. I never launched this bot (either because there was no need to use it, or because it was too poorly written). Well, I decided to post one of its parts so that it would not gather dust somewhere in the memory of my computer without doing anything, but would benefit someone else.

I hope one of you will make a wonderful text game with it :slight_smile:

1 Like

Would be nice to see some sort of animation to see it happening instead of … bang! done.

1 Like

There is something similar in the telegram bot, but I did not do it here.

1 Like