Thanks to visit codestin.com
Credit goes to github.com

Skip to content

4dillusions/Arena

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arena Azure Static Web Apps CI/CD

Arena is a simple Turn-based 1v1 battle simulator.

Clone

git clone https://github.com/4dillusions/Arena.git

Build

Open ArenaProject.sln and build solution

Run (example)

cd Arena\ArenaProject\ArenaConsoleApp\bin\Debug\net8.0
ArenaConsoleApp.exe 4

Specification

There are many heroes in the arena like bowman, knight rider and swordsman. Every hero have an id, power and can attack and defense according to rules:

Bowman (attack)

  • knight rider (defense): dies 40%, lives 60%
  • swordsman (defense): dies
  • bowman (defense): dies

Swordsman (attack)

  • knight rider (defense): nothing happens
  • swordsman (defense): dies
  • bowman (defense): dies

Knight rider (attack)

  • knight rider (defense): dies
  • swordsman (defense): knight rider dies
  • bowman (defense): dies

The game is divided into turns. An attacker and a defender are selected randomly for every turns. The other heroes rest and their power increase by 10. Their power can't increase above maximum.

The power of the heroes decrease half. The power is less than quarter of the initial/maximum power then hero die.

Initial and maximum power:

  • knight rider: 150
  • swordsman: 120
  • bowman: 100

Before first turns generate heroes randomly. The random number is a parameter for game. The game lasts until a maximum of one hero remains. After turns write log with heroes properties. Create this game as a console application.

About

software engineer interview test (C#, .NET 8, TDD, MVCS, cross-platform)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages