mirror of
https://github.com/AJMicke/KickerELO.git
synced 2026-03-11 13:31:02 +01:00
Get database connection info from envir, rename artifact, make fake 2 vs 2 calculation a little less fake
This commit is contained in:
1
pom.xml
1
pom.xml
@@ -76,6 +76,7 @@
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<finalName>kickerelo</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
@@ -19,7 +19,6 @@ public class EloCalculationService {
|
||||
* @param toreVerlierer The number of goals of the losing player
|
||||
*/
|
||||
public void updateElo1vs1(Spieler gewinner, Spieler verlierer, short toreVerlierer) {
|
||||
final float initialElo = 1500;
|
||||
final float baseK = 50;
|
||||
final float reductionPerGoal = 0.1f * baseK;
|
||||
|
||||
@@ -43,7 +42,7 @@ public class EloCalculationService {
|
||||
gewinnerVorn.setElo2vs2(gewinnerVorn.getElo2vs2() + 10 - toreVerlierer);
|
||||
gewinnerHinten.setElo2vs2(gewinnerHinten.getElo2vs2() + 10 - toreVerlierer);
|
||||
verliererVorn.setElo2vs2(verliererVorn.getElo2vs2() - 10 + toreVerlierer);
|
||||
verliererHinten.setElo2vs2(verliererHinten.getElo2vs2());
|
||||
verliererHinten.setElo2vs2(verliererHinten.getElo2vs2() - 10 + toreVerlierer);
|
||||
}
|
||||
|
||||
public float getInitialElo1vs1() {
|
||||
|
||||
@@ -28,6 +28,7 @@ public class PlayerListView extends VerticalLayout {
|
||||
Grid.Column<Spieler> elo2vs2Column = playerGrid.getColumnByKey("elo2vs2");
|
||||
nameColumn.setHeader("Name");
|
||||
elo1vs1Column.setHeader("Elo 1 vs 1");
|
||||
elo2vs2Column.setHeader("Elo 2 vs 2");
|
||||
|
||||
playerGrid.setColumnOrder(nameColumn, elo1vs1Column, elo2vs2Column);
|
||||
|
||||
|
||||
@@ -2,12 +2,9 @@ server.port=${PORT:8080}
|
||||
logging.level.org.atmosphere = warn
|
||||
spring.mustache.check-template-location = false
|
||||
|
||||
# Launch the default browser when starting the application in development mode
|
||||
vaadin.launch-browser=true
|
||||
|
||||
spring.datasource.url=jdbc:mariadb://localhost:3306/kickerelo
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=root
|
||||
spring.datasource.url=${DATABASE_URI}
|
||||
spring.datasource.username=${DATABASE_USER}
|
||||
spring.datasource.password=${DATABASE_PASSWORD}
|
||||
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
|
||||
spring.jpa.hibernate.ddl-auto=validate
|
||||
spring.jpa.show-sql=false
|
||||
|
||||
Reference in New Issue
Block a user