Skip to content

Commit

Permalink
refactor!: Fight to Bout (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustl22 committed Dec 7, 2023
1 parent 8a4dcc1 commit 001e198
Show file tree
Hide file tree
Showing 75 changed files with 2,068 additions and 2,009 deletions.
4 changes: 2 additions & 2 deletions wrestling_scoreboard_client/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Wrestling Scoreboard Client

Wrestling software for managing team fights and tournaments.
Wrestling software for managing team bouts and tournaments.

Tags: scoreboard, wrestling, scoring, bracket, mat, team fight, tournament
Tags: scoreboard, wrestling, scoring, bracket, mat, team bout, tournament

## Deployment

Expand Down
2 changes: 1 addition & 1 deletion wrestling_scoreboard_client/debian/debian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ control:
Priority: optional
Depends: libgcrypt20, libgstreamer-plugins-base1.0-0, libgstreamer1.0-dev, libgtk-3-0, libjpeg-turbo8, liblz4-1, libstdc++6, libzstd1
Maintainer: August Oberhauser
Description: Wrestling software for managing team fights and tournaments.
Description: Wrestling software for managing team bouts and tournaments.

options:
exec_out_dir: build/linux/x64/release/debian/
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Version=0.0.1
Name=Wrestling Scoreboard
GenericName=Sports event administration
Comment=Wrestling software for managing team fights and tournaments.
Comment=Wrestling software for managing team bouts and tournaments.
Terminal=false
Type=Application
Categories=Utility
Expand Down
63 changes: 63 additions & 0 deletions wrestling_scoreboard_client/lib/data/bout_result.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:wrestling_scoreboard_common/common.dart';

String getFullNameFromBoutResult(BoutResult? result, BuildContext context) {
return '${getAbbreviationFromBoutResult(result, context)} | ${getDescriptionFromBoutResult(result, context)}';
}

String getDescriptionFromBoutResult(BoutResult? result, BuildContext context) {
AppLocalizations loc = AppLocalizations.of(context)!;
switch (result) {
case BoutResult.vfa:
return loc.boutResultVfa;
case BoutResult.vin:
return loc.boutResultVin;
case BoutResult.vca:
return loc.boutResultVca;
case BoutResult.vsu:
return loc.boutResultVsu;
case BoutResult.vsu1:
return loc.boutResultVsu1;
case BoutResult.vpo:
return loc.boutResultVpo;
case BoutResult.vpo1:
return loc.boutResultVpo1;
case BoutResult.vfo:
return loc.boutResultVfo;
case BoutResult.dsq:
return loc.boutResultDsq;
case BoutResult.dsq2:
return loc.boutResultDsq2;
default:
return '';
}
}

String getAbbreviationFromBoutResult(BoutResult? result, BuildContext context) {
AppLocalizations loc = AppLocalizations.of(context)!;
switch (result) {
case BoutResult.vfa:
return loc.boutResultVfaAbbr;
case BoutResult.vin:
return loc.boutResultVinAbbr;
case BoutResult.vca:
return loc.boutResultVcaAbbr;
case BoutResult.vsu:
return loc.boutResultVsuAbbr;
case BoutResult.vsu1:
return loc.boutResultVsu1Abbr;
case BoutResult.vpo:
return loc.boutResultVpoAbbr;
case BoutResult.vpo1:
return loc.boutResultVpo1Abbr;
case BoutResult.vfo:
return loc.boutResultVfoAbbr;
case BoutResult.dsq:
return loc.boutResultDsqAbbr;
case BoutResult.dsq2:
return loc.boutResultDsq2Abbr;
default:
return '';
}
}
6 changes: 6 additions & 0 deletions wrestling_scoreboard_client/lib/data/bout_role.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import 'package:flutter/material.dart';
import 'package:wrestling_scoreboard_common/common.dart';

MaterialColor getColorFromBoutRole(BoutRole role) {
return role == BoutRole.red ? Colors.red : Colors.blue;
}
63 changes: 0 additions & 63 deletions wrestling_scoreboard_client/lib/data/fight_result.dart

This file was deleted.

6 changes: 0 additions & 6 deletions wrestling_scoreboard_client/lib/data/fight_role.dart

This file was deleted.

46 changes: 23 additions & 23 deletions wrestling_scoreboard_client/lib/l10n/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -69,29 +69,29 @@
"matchNumber": "Begegnungs-ID / Kampf-ID",
"lineup": "Aufstellung",
"lineups": "Aufstellungen",
"fight": "Kampf",
"fights": "Kämpfe",
"fightNo": "Kampf-Nr.",
"fightResultVfa": "Schultersieg",
"fightResultVin": "Aufgabesieg wegen Verletzung",
"fightResultVca": "Sieger durch 3 Verwarnungen / Regelwidrigkeit des Gegners",
"fightResultVsu": "Technische Überlegenheit - Verlierer ohne Technische Punkte",
"fightResultVsu1": "Technische Überlegenheit - Verlierer hat Technische Punkte",
"fightResultVpo": "Punktsieg - Verlierer ohne Technische Punkte",
"fightResultVpo1": "Punktsieg - Verlierer hat Technische Punkte",
"fightResultVfo": "Sieger durch Ausschluss des Gegners vom Wettkampf wegen Nichtantritt",
"fightResultDsq": "Sieger durch Ausschluss des Gegners vom Wettkampf wegen Unsportlichkeit / Tätlichkeit",
"fightResultDsq2": "Beide Ringer disqualifiziert wegen Unsportlichkeit / Regelwidrigkeit",
"fightResultVfaAbbr": "SS",
"fightResultVinAbbr": "AS",
"fightResultVcaAbbr": "DV",
"fightResultVsuAbbr": "TÜ",
"fightResultVsu1Abbr": "TÜ1",
"fightResultVpoAbbr": "PS",
"fightResultVpo1Abbr": "PS1",
"fightResultVfoAbbr": "DN",
"fightResultDsqAbbr": "DQ",
"fightResultDsq2Abbr": "DQ2",
"bout": "Kampf",
"bouts": "Kämpfe",
"boutNo": "Kampf-Nr.",
"boutResultVfa": "Schultersieg",
"boutResultVin": "Aufgabesieg wegen Verletzung",
"boutResultVca": "Sieger durch 3 Verwarnungen / Regelwidrigkeit des Gegners",
"boutResultVsu": "Technische Überlegenheit - Verlierer ohne Technische Punkte",
"boutResultVsu1": "Technische Überlegenheit - Verlierer hat Technische Punkte",
"boutResultVpo": "Punktsieg - Verlierer ohne Technische Punkte",
"boutResultVpo1": "Punktsieg - Verlierer hat Technische Punkte",
"boutResultVfo": "Sieger durch Ausschluss des Gegners vom Wettkampf wegen Nichtantritt",
"boutResultDsq": "Sieger durch Ausschluss des Gegners vom Wettkampf wegen Unsportlichkeit / Tätlichkeit",
"boutResultDsq2": "Beide Ringer disqualifiziert wegen Unsportlichkeit / Regelwidrigkeit",
"boutResultVfaAbbr": "SS",
"boutResultVinAbbr": "AS",
"boutResultVcaAbbr": "DV",
"boutResultVsuAbbr": "TÜ",
"boutResultVsu1Abbr": "TÜ1",
"boutResultVpoAbbr": "PS",
"boutResultVpo1Abbr": "PS1",
"boutResultVfoAbbr": "DN",
"boutResultDsqAbbr": "DQ",
"boutResultDsq2Abbr": "DQ2",

"red": "Red",
"blue": "Blue",
Expand Down
46 changes: 23 additions & 23 deletions wrestling_scoreboard_client/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -72,29 +72,29 @@
"matchNumber": "Match-ID",
"lineup": "Lineup",
"lineups": "Lineups",
"fight": "Fight",
"fights": "Fights",
"fightNo": "Fight-No.",
"fightResultVfa": "Victory by fall",
"fightResultVin": "Victory by injury",
"fightResultVca": "Victory by cautions - the opponent received 3 cautions \"O\" due to error against the rules",
"fightResultVsu": "Technical superiority - loser without technical points",
"fightResultVsu1": "Technical superiority - loser with technical points",
"fightResultVpo": "Victory by points - the loser without any technical points",
"fightResultVpo1": "Victory by points - the loser with technical points",
"fightResultVfo": "Victory by forfeit - no show up on the mat",
"fightResultDsq": "Victory by disqualification of the opponent from the whole competition due to infringement of the rules",
"fightResultDsq2": "In case both wrestlers have been disqualified due to infringement of the rules",
"fightResultVfaAbbr": "VFA",
"fightResultVinAbbr": "VIN",
"fightResultVcaAbbr": "VCA",
"fightResultVsuAbbr": "VSU",
"fightResultVsu1Abbr": "VSU1",
"fightResultVpoAbbr": "VPO",
"fightResultVpo1Abbr": "VPO1",
"fightResultVfoAbbr": "VFO",
"fightResultDsqAbbr": "DSQ",
"fightResultDsq2Abbr": "DSQ2",
"bout": "Bout",
"bouts": "Bouts",
"boutNo": "Bout-No.",
"boutResultVfa": "Victory by fall",
"boutResultVin": "Victory by injury",
"boutResultVca": "Victory by cautions - the opponent received 3 cautions \"O\" due to error against the rules",
"boutResultVsu": "Technical superiority - loser without technical points",
"boutResultVsu1": "Technical superiority - loser with technical points",
"boutResultVpo": "Victory by points - the loser without any technical points",
"boutResultVpo1": "Victory by points - the loser with technical points",
"boutResultVfo": "Victory by forfeit - no show up on the mat",
"boutResultDsq": "Victory by disqualification of the opponent from the whole competition due to infringement of the rules",
"boutResultDsq2": "In case both wrestlers have been disqualified due to infringement of the rules",
"boutResultVfaAbbr": "VFA",
"boutResultVinAbbr": "VIN",
"boutResultVcaAbbr": "VCA",
"boutResultVsuAbbr": "VSU",
"boutResultVsu1Abbr": "VSU1",
"boutResultVpoAbbr": "VPO",
"boutResultVpo1Abbr": "VPO1",
"boutResultVfoAbbr": "VFO",
"boutResultDsqAbbr": "DSQ",
"boutResultDsq2Abbr": "DSQ2",

"red": "Red",
"blue": "Blue",
Expand Down
Loading

0 comments on commit 001e198

Please sign in to comment.