Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
254 changes: 254 additions & 0 deletions IronBattle/battleLogs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@

---ROUND 1---
>>> s attacked q
>>> q's health is: 183
>>> q attacked s
>>> s's health is: 153

---ROUND 1---
>>> q attacked w
>>> w's health is: 150
>>> w attacked q
>>> q's health is: 185

---ROUND 2---
>>> q attacked w
>>> w's health is: 143
>>> w attacked q
>>> q's health is: 182

---ROUND 3---
>>> q attacked w
>>> w's health is: 140
>>> w attacked q
>>> q's health is: 179

---ROUND 4---
>>> q attacked w
>>> w's health is: 137
>>> w attacked q
>>> q's health is: 172

---ROUND 5---
>>> q attacked w
>>> w's health is: 134
>>> w attacked q
>>> q's health is: 169

---ROUND 6---
>>> q attacked w
>>> w's health is: 127
>>> w attacked q
>>> q's health is: 166

---ROUND 7---
>>> q attacked w
>>> w's health is: 120
>>> w attacked q
>>> q's health is: 163

---ROUND 8---
>>> q attacked w
>>> w's health is: 113
>>> w attacked q
>>> q's health is: 160

---ROUND 9---
>>> q attacked w
>>> w's health is: 110
>>> w attacked q
>>> q's health is: 157

---ROUND 10---
>>> q attacked w
>>> w's health is: 107
>>> w attacked q
>>> q's health is: 150

---ROUND 11---
>>> q attacked w
>>> w's health is: 100
>>> w attacked q
>>> q's health is: 147

---ROUND 12---
>>> q attacked w
>>> w's health is: 93
>>> w attacked q
>>> q's health is: 140

---ROUND 13---
>>> q attacked w
>>> w's health is: 93
>>> w attacked q
>>> q's health is: 137

---ROUND 14---
>>> q attacked w
>>> w's health is: 90
>>> w attacked q
>>> q's health is: 134

---ROUND 15---
>>> q attacked w
>>> w's health is: 83
>>> w attacked q
>>> q's health is: 134

---ROUND 16---
>>> q attacked w
>>> w's health is: 80
>>> w attacked q
>>> q's health is: 131

---ROUND 17---
>>> q attacked w
>>> w's health is: 77
>>> w attacked q
>>> q's health is: 128

---ROUND 18---
>>> q attacked w
>>> w's health is: 74
>>> w attacked q
>>> q's health is: 121

---ROUND 19---
>>> q attacked w
>>> w's health is: 71
>>> w attacked q
>>> q's health is: 118

---ROUND 20---
>>> q attacked w
>>> w's health is: 68
>>> w attacked q
>>> q's health is: 111

---ROUND 21---
>>> q attacked w
>>> w's health is: 68
>>> w attacked q
>>> q's health is: 108

---ROUND 22---
>>> q attacked w
>>> w's health is: 65
>>> w attacked q
>>> q's health is: 105

---ROUND 23---
>>> q attacked w
>>> w's health is: 62
>>> w attacked q
>>> q's health is: 98

---ROUND 24---
>>> q attacked w
>>> w's health is: 59
>>> w attacked q
>>> q's health is: 95

---ROUND 25---
>>> q attacked w
>>> w's health is: 56
>>> w attacked q
>>> q's health is: 92

---ROUND 26---
>>> q attacked w
>>> w's health is: 49
>>> w attacked q
>>> q's health is: 92

---ROUND 27---
>>> q attacked w
>>> w's health is: 46
>>> w attacked q
>>> q's health is: 89

---ROUND 28---
>>> q attacked w
>>> w's health is: 43
>>> w attacked q
>>> q's health is: 86

---ROUND 29---
>>> q attacked w
>>> w's health is: 36
>>> w attacked q
>>> q's health is: 83

---ROUND 30---
>>> q attacked w
>>> w's health is: 33
>>> w attacked q
>>> q's health is: 80

---ROUND 31---
>>> q attacked w
>>> w's health is: 30
>>> w attacked q
>>> q's health is: 73

---ROUND 32---
>>> q attacked w
>>> w's health is: 30
>>> w attacked q
>>> q's health is: 70

---ROUND 33---
>>> q attacked w
>>> w's health is: 27
>>> w attacked q
>>> q's health is: 67

---ROUND 34---
>>> q attacked w
>>> w's health is: 20
>>> w attacked q
>>> q's health is: 67

---ROUND 35---
>>> q attacked w
>>> w's health is: 17
>>> w attacked q
>>> q's health is: 64

---ROUND 36---
>>> q attacked w
>>> w's health is: 14
>>> w attacked q
>>> q's health is: 57

---ROUND 37---
>>> q attacked w
>>> w's health is: 14
>>> w attacked q
>>> q's health is: 54

---ROUND 38---
>>> q attacked w
>>> w's health is: 11
>>> w attacked q
>>> q's health is: 51

---ROUND 39---
>>> q attacked w
>>> w's health is: 8
>>> w attacked q
>>> q's health is: 48

---ROUND 40---
>>> q attacked w
>>> w's health is: 1
>>> w attacked q
>>> q's health is: 45

---ROUND 41---
>>> q attacked w
>>> w's health is: -2
>>> w attacked q
>>> q's health is: 42
>>> q wins!
w has been defeated!
11 changes: 11 additions & 0 deletions IronBattle/characters.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
c1,Aragorn,Warrior,150,35,8
c2,Gimli,Warrior,180,42,6
c3,Legolas,Warrior,120,28,9
c4,Thorin,Warrior,160,30,7
c5,Boromir,Warrior,170,38,8
c6,Gandalf,Wizard,80,20,45
c7,Saruman,Wizard,90,15,50
c8,Radagast,Wizard,70,18,35
c9,Elrond,Wizard,85,22,40
c10,Merlin,Wizard,95,25,48
c11,Morgana,Wizard,60,12,30
7 changes: 7 additions & 0 deletions IronBattle/ironbattle/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"java.project.sourcePaths": ["src"],
"java.project.outputPath": "bin",
"java.project.referencedLibraries": [
"lib/**/*.jar"
]
}
18 changes: 18 additions & 0 deletions IronBattle/ironbattle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Getting Started

Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.

## Folder Structure

The workspace contains two folders by default, where:

- `src`: the folder to maintain sources
- `lib`: the folder to maintain dependencies

Meanwhile, the compiled output files will be generated in the `bin` folder by default.

> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.

## Dependency Management

The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
Binary file added IronBattle/ironbattle/bin/App.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added IronBattle/ironbattle/bin/characters/Wizard.class
Binary file not shown.
Binary file added IronBattle/ironbattle/bin/services/Attacker.class
Binary file not shown.
55 changes: 55 additions & 0 deletions IronBattle/ironbattle/src/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.Scanner;

import characters.Warrior;
import characters.Wizard;
import services.BattleSimulator;
import services.Creating1v1;
import services.CreatingBattleGround;

public class Main {

private static Scanner sc = new Scanner(System.in);
private static Random random = new Random();

public static void main(String[] args) throws FileNotFoundException {

List<characters.Character> characters;
String choise;

System.out.println("--- WELCOME TO IRONBATTLE ---");
System.out.println("PLEASE SELECT WHAT DO YOU WANT");
System.out.println("TYPE 'W' IF YOU WANT WATCH BATTLEGROUND, 'Q' IF YOU WANT 1V1");

do {
choise = sc.next();
} while(!choise.equals("Q") && !choise.equals("W") && !choise.equals("q") && !choise.equals("w"));



if(choise.equals("w")|| choise.equals("W")){
characters = CreatingBattleGround.addCharactersToBattleGround();
}
else{
characters = Creating1v1.prepareCharacters();
}

// System.out.println("\n---GAME STARTS---\n");

new BattleSimulator().startTheGame(characters); //en boyuk listi verir


// }

}




}
7 changes: 7 additions & 0 deletions IronBattle/ironbattle/src/characters/Attacker.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package characters;

public interface Attacker {

public void attack(Character attacksThisCharacter);

}
Loading