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
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
.idea/
*.iws
*.iml
*.ipr
Expand Down Expand Up @@ -40,5 +37,8 @@ bin/

### Mac OS ###
.DS_Store

### Custom ###
/.gigaide/
/.idea/
*.kts
*.gradle.kts
5 changes: 4 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,23 @@ repositories {
}

dependencies {
implementation("org.jfree:jfreechart:1.5.4")

testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-engine")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testImplementation("org.assertj:assertj-core:3.24.2")
}

tasks.test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}

tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Thu Sep 25 16:59:28 YEKT 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
47 changes: 32 additions & 15 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 23 additions & 18 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 5 additions & 10 deletions src/main/java/ru/urfu/Main.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
package ru.urfu;

//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.

import ru.urfu.console.Communicator;

public class Main {
public static void main(String[] args) {
//TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
// to see how GIGA IDE suggests fixing it.
System.out.printf("Hello and welcome!");
Communicator.runChampionship();


for (int i = 1; i <= 5; i++) {
//TIP Press <shortcut actionId="Debug"/> to start debugging your code. We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint
// for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>.
System.out.println("i = " + i);
}
}
}
33 changes: 33 additions & 0 deletions src/main/java/ru/urfu/console/Communicator.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package ru.urfu.console;

import ru.urfu.graphic.Graphic;
import ru.urfu.parser.Parser;
import ru.urfu.resolver.Resolver;

import java.util.Scanner;

public class Communicator {
public static void runChampionship(){
var scanner = new Scanner(System.in);
System.out.print("Введите файл для анализа: ");
var fileName = scanner.nextLine();
var players = Parser.parseCsvToList(fileName);

var res = new Resolver(players);

System.out.print("Кол-во игроков без агенства: ");
System.out.println(res.getCountWithoutAgency());

System.out.print("Максимальное число голов, забитых защитником: ");
System.out.println(res.getMaxDefenderGoalsCount());

System.out.print("Позиция самого дорогого немецкого игрока: ");
System.out.println(res.getTheExpensiveGermanPlayerPosition());

System.out.print("Самая грубая команда: ");
System.out.println(res.getTheRudestTeam());

Graphic.showPositionDistributionChart(players);

}
}
Loading