diff --git a/docs/match/2.4.match.format.md b/docs/match/2.4.match.format.md index 632566be..490b8600 100644 --- a/docs/match/2.4.match.format.md +++ b/docs/match/2.4.match.format.md @@ -19,10 +19,10 @@ Here you can specify * Note: you can toggle between 'Best of' and 'Total of' sets to play * number of games per set * How you want the final set to finish: may deviate from the initial sets. - * E.g. a longer tiebreak, or - * no games and a deciding tiebreak immediatly + * E.g. a longer tiebreak to 10 instead of 7, or + * no games in the final set : start deciding match tiebreak immediately * number of games to be played - * Note: you can toggle between 'Best of' and 'Total of' games to play + * Note: you can toggle between 'Best of' and 'Total of' games to play * how many points per game * what format of Tie-break you want to use * If you want the tiebreak to start one-game early (e.g. at 5-5 if sets are played to 6 games) @@ -46,7 +46,7 @@ Here you can specify * Name of the assessor * Announcement language (currently supported are English, French, German, Spanish, Portuguese, Dutch, Czech) -In case of a 'Doubles' match you also have the option to specify the 'Sequence of Serve' used for the doubles match. +In case of a 'Doubles' match you also have the option to specify the 'Sequence of Serve' used for the doubles match. Note that if you do not want to specify an event, and the fields are e.g. already pre-filled for you, you can clear them by 'long clicking' on the label `Event`. (And similarly you can clear the player fields by 'long clicking' the label `Players`, and clear the referee fields by 'long clicking' the label `Referee`.) diff --git a/docs/social/4.7.club.website.md b/docs/social/4.7.club.website.md index ad884653..14e1165b 100644 --- a/docs/social/4.7.club.website.md +++ b/docs/social/4.7.club.website.md @@ -57,9 +57,9 @@ If you want to protect you url where results can be posted to, there is the opti To do so add a line with `Authentication=Basic` to your URLs configuration. So for example it will look like this now: Name=Demo URL - FeedMatches=http://squore.double-yellow.be/demo/demo.matches.json - FeedPlayers=http://squore.double-yellow.be/demo/demo.players.txt - PostResult=http://squore.double-yellow.be/demo/demo.post.matchresult.basic.authentication.php + FeedMatches=https://squore.double-yellow.be/demo/demo.matches.json + FeedPlayers=https://squore.double-yellow.be/demo/demo.players.txt + PostResult=https://squore.double-yellow.be/demo/demo.post.matchresult.basic.auth.php Authentication=Basic If this line exists in your 'Active' URL section, the Squore app will ask a Username and Password combination before posting the result to the URL. diff --git a/res/values-de/OfficialAnnouncements.xml b/res/values-de/OfficialAnnouncements.xml index ad6ae001..31c9d20e 100644 --- a/res/values-de/OfficialAnnouncements.xml +++ b/res/values-de/OfficialAnnouncements.xml @@ -13,6 +13,7 @@ Rückschläger Null Beide + Spiel %s Satz an %s Spiel an %s Ein Satz beide diff --git a/res/values-fr/OfficialAnnouncements.xml b/res/values-fr/OfficialAnnouncements.xml index dc646448..8eac2f02 100644 --- a/res/values-fr/OfficialAnnouncements.xml +++ b/res/values-fr/OfficialAnnouncements.xml @@ -11,6 +11,7 @@ %1$s au service, %2$s à la réception 0–0 + Jeu %s Jeu %s Match %s Un jeu partout diff --git a/res/values-it/OfficialAnnouncements.xml b/res/values-it/OfficialAnnouncements.xml index a54a4f44..8fbe8b2e 100644 --- a/res/values-it/OfficialAnnouncements.xml +++ b/res/values-it/OfficialAnnouncements.xml @@ -13,6 +13,7 @@ Risposta Zero a zero + Gioco %s Gioco a %s Incontro a %s Un gioco pari diff --git a/res/values-nl/tennispadel.xml b/res/values-nl/tennispadel.xml index 73057c16..26e3cb7a 100644 --- a/res/values-nl/tennispadel.xml +++ b/res/values-nl/tennispadel.xml @@ -19,10 +19,10 @@ Start Tiebreak een game vroeger Tiebreak zal gespeeld worden bij %1$d-%1$d - TieBreak Tot 7 - TieBreak Tot 10 - Geen games - Gelijk TieBreak Tot 7 - Geen games - Gelijk TieBreak Tot 10 + Normaal aantal games - TieBreak Tot 7 + Normaal aantal games - TieBreak Tot 10 + Geen games - Match TieBreak Tot 7 + Geen games - Match TieBreak Tot 10 Games Tot 12 - Dan TieBreak Tot 7 Games Tot 12 - Dan TieBreak Tot 10 Geen Tie-Break diff --git a/res/values/OfficialAnnouncements.xml b/res/values/OfficialAnnouncements.xml index ffef2243..fbe1d037 100644 --- a/res/values/OfficialAnnouncements.xml +++ b/res/values/OfficialAnnouncements.xml @@ -13,6 +13,7 @@ Receive Love-all + Game %s Game to %s Match to %s One game all diff --git a/res/values/tennispadel.xml b/res/values/tennispadel.xml index 6c5511cb..8f3e14f8 100644 --- a/res/values/tennispadel.xml +++ b/res/values/tennispadel.xml @@ -26,12 +26,12 @@ Start Tiebreak One Game Early Tie break will start at %1$d-%1$d - TieBreak To 7 - TieBreak To 10 - No Games - TieBreak To 7 - No Games - TieBreak To 10 - Games To 12 - Then TieBreak To 7 - Games To 12 - Then TieBreak To 10 + Games as normal - TieBreak To 7 + Games as normal - TieBreak To 10 + No Games - Match TieBreak To 7 + No Games - Match TieBreak To 10 + Games To 12 - If equal, TieBreak To 7 + Games To 12 - If equal, TieBreak To 10 No Tie-Break diff --git a/src/com/doubleyellow/scoreboard/model/Model.java b/src/com/doubleyellow/scoreboard/model/Model.java index 06548d7e..1747ebfb 100755 --- a/src/com/doubleyellow/scoreboard/model/Model.java +++ b/src/com/doubleyellow/scoreboard/model/Model.java @@ -1215,7 +1215,16 @@ public Player getLastScorer() { } public ScoreLine getLastScoreLine() { - return ListUtil.getLast(getGameScoreHistory()); + List gameScoreHistory = getGameScoreHistory(); + if ( ListUtil.isEmpty(gameScoreHistory) ) { + // introduced for GSM Speak + int iTail = ListUtil.size(m_lGamesScorelineHistory); + while(iTail > 0 && ListUtil.isEmpty(gameScoreHistory) ) { + iTail--; + gameScoreHistory = m_lGamesScorelineHistory.get(iTail); + } + } + return ListUtil.getLast(gameScoreHistory); } public ScoreLine getLastCall() { diff --git a/src/com/doubleyellow/scoreboard/speech/Speak.java b/src/com/doubleyellow/scoreboard/speech/Speak.java index 6b720cb6..cd5c5090 100644 --- a/src/com/doubleyellow/scoreboard/speech/Speak.java +++ b/src/com/doubleyellow/scoreboard/speech/Speak.java @@ -369,6 +369,13 @@ private void score(Model model) if ( gsmModel != null ) { List> gamesWonPerSet = gsmModel.getGamesWonPerSet(); gamesWonLastSet = ListUtil.getLast(gamesWonPerSet); + + Player pGameWonBy = gsmModel.getLastScorer(); + if ( pGameWonBy != null ) { + String sName = gsmModel.getName(pGameWonBy); + String sGameX = getResourceString(R.string.oa_game_NamePlayerX__TennisPadel, sName); + setTextToSpeak(SpeechType.GameWon, sGameX); + } } else { gamesWonLastSet = model.getGamesWon(); } @@ -528,7 +535,6 @@ private void gameBall(Model model) if ( model instanceof GSMModel ) { GSMModel gsmModel = (GSMModel) model; - // TODO: set ball Player[] possibleSetBallFor = gsmModel.isPossibleSetVictoryFor(); Boolean bIsSetBall = (possibleSetBallFor != null) && (possibleSetBallFor.length != 0); if ( bIsSetBall ) { @@ -613,19 +619,6 @@ private String x_GamesTo_y(int iGamesLeader, int iGamesTrailer, int iResIdGameOr //------------------------------ /** text fragments will be announced in this sequence they are defined in this enumeration */ - private enum SpeechType { - //Call, - //StartAnnouncement, - Handout, - GamesScore, - GSMSetScore, - ScoreServer, - ScoreReceiver, - Gameball, - //EndAnnouncement, - TimerRelated, - Other, - } private String[] m_sText = new String[SpeechType.values().length]; private void setTextToSpeak(SpeechType type, Object oText) { if ( oText == null ) { return; } diff --git a/src/com/doubleyellow/scoreboard/speech/SpeechType.java b/src/com/doubleyellow/scoreboard/speech/SpeechType.java new file mode 100644 index 00000000..97933a87 --- /dev/null +++ b/src/com/doubleyellow/scoreboard/speech/SpeechType.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2020 Iddo Hoeve + * + * Squore is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.doubleyellow.scoreboard.speech; + +public enum SpeechType { + //Call, + //StartAnnouncement, + Handout, + GameWon, + /* GSM and others: oa_a_leads_xGamesToy, oa_a_wins_xGamesToy as well as oa_a_wins_set_b_xGamesToy__TennisPadel */ + GamesScore, + GSMSetScore, + ScoreServer, + ScoreReceiver, + Gameball, + //EndAnnouncement, + TimerRelated, + Other, +}