Skip to content
Snippets Groups Projects
Commit 4e909980 authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko
Browse files

Merge branch 'V3.3' into feature-qr-code

parents a06d5b28 8cff5bf8
Branches
Tags
No related merge requests found
Showing
with 33 additions and 7 deletions
core/assets/common/game/runes/common/gfx/background.jpg

811 KiB

core/assets/common/game/runes/common/gfx/background.png

1.03 MiB

core/assets/common/screen/statistics/gfx/arrow_down.png

6.9 KiB | W: | H:

core/assets/common/screen/statistics/gfx/arrow_down.png

7.81 KiB | W: | H:

core/assets/common/screen/statistics/gfx/arrow_down.png
core/assets/common/screen/statistics/gfx/arrow_down.png
core/assets/common/screen/statistics/gfx/arrow_down.png
core/assets/common/screen/statistics/gfx/arrow_down.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/common/screen/statistics/gfx/arrow_down_pressed.png

6.22 KiB | W: | H:

core/assets/common/screen/statistics/gfx/arrow_down_pressed.png

7.04 KiB | W: | H:

core/assets/common/screen/statistics/gfx/arrow_down_pressed.png
core/assets/common/screen/statistics/gfx/arrow_down_pressed.png
core/assets/common/screen/statistics/gfx/arrow_down_pressed.png
core/assets/common/screen/statistics/gfx/arrow_down_pressed.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/common/screen/statistics/gfx/arrow_up.png

7.02 KiB | W: | H:

core/assets/common/screen/statistics/gfx/arrow_up.png

7.62 KiB | W: | H:

core/assets/common/screen/statistics/gfx/arrow_up.png
core/assets/common/screen/statistics/gfx/arrow_up.png
core/assets/common/screen/statistics/gfx/arrow_up.png
core/assets/common/screen/statistics/gfx/arrow_up.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/common/screen/statistics/gfx/arrow_up_pressed.png

6.26 KiB | W: | H:

core/assets/common/screen/statistics/gfx/arrow_up_pressed.png

6.86 KiB | W: | H:

core/assets/common/screen/statistics/gfx/arrow_up_pressed.png
core/assets/common/screen/statistics/gfx/arrow_up_pressed.png
core/assets/common/screen/statistics/gfx/arrow_up_pressed.png
core/assets/common/screen/statistics/gfx/arrow_up_pressed.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/common/screen/statistics/gfx/bookmark1.png

15.8 KiB | W: | H:

core/assets/common/screen/statistics/gfx/bookmark1.png

41.5 KiB | W: | H:

core/assets/common/screen/statistics/gfx/bookmark1.png
core/assets/common/screen/statistics/gfx/bookmark1.png
core/assets/common/screen/statistics/gfx/bookmark1.png
core/assets/common/screen/statistics/gfx/bookmark1.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/common/screen/statistics/gfx/bookmark1_pressed.png

18.4 KiB | W: | H:

core/assets/common/screen/statistics/gfx/bookmark1_pressed.png

26.2 KiB | W: | H:

core/assets/common/screen/statistics/gfx/bookmark1_pressed.png
core/assets/common/screen/statistics/gfx/bookmark1_pressed.png
core/assets/common/screen/statistics/gfx/bookmark1_pressed.png
core/assets/common/screen/statistics/gfx/bookmark1_pressed.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/common/screen/statistics/gfx/bookmark2.png

12.8 KiB | W: | H:

core/assets/common/screen/statistics/gfx/bookmark2.png

34 KiB | W: | H:

core/assets/common/screen/statistics/gfx/bookmark2.png
core/assets/common/screen/statistics/gfx/bookmark2.png
core/assets/common/screen/statistics/gfx/bookmark2.png
core/assets/common/screen/statistics/gfx/bookmark2.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/common/screen/statistics/gfx/bookmark2_pressed.png

19.6 KiB | W: | H:

core/assets/common/screen/statistics/gfx/bookmark2_pressed.png

24.1 KiB | W: | H:

core/assets/common/screen/statistics/gfx/bookmark2_pressed.png
core/assets/common/screen/statistics/gfx/bookmark2_pressed.png
core/assets/common/screen/statistics/gfx/bookmark2_pressed.png
core/assets/common/screen/statistics/gfx/bookmark2_pressed.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/common/screen/statistics/gfx/bookmark3.png

18.2 KiB | W: | H:

core/assets/common/screen/statistics/gfx/bookmark3.png

40.6 KiB | W: | H:

core/assets/common/screen/statistics/gfx/bookmark3.png
core/assets/common/screen/statistics/gfx/bookmark3.png
core/assets/common/screen/statistics/gfx/bookmark3.png
core/assets/common/screen/statistics/gfx/bookmark3.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/common/screen/statistics/gfx/bookmark3_pressed.png

18.3 KiB | W: | H:

core/assets/common/screen/statistics/gfx/bookmark3_pressed.png

23.6 KiB | W: | H:

core/assets/common/screen/statistics/gfx/bookmark3_pressed.png
core/assets/common/screen/statistics/gfx/bookmark3_pressed.png
core/assets/common/screen/statistics/gfx/bookmark3_pressed.png
core/assets/common/screen/statistics/gfx/bookmark3_pressed.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/cs/screen/nightwatchpage/gfx/startbutton.png

7.45 KiB | W: | H:

core/assets/cs/screen/nightwatchpage/gfx/startbutton.png

12.5 KiB | W: | H:

core/assets/cs/screen/nightwatchpage/gfx/startbutton.png
core/assets/cs/screen/nightwatchpage/gfx/startbutton.png
core/assets/cs/screen/nightwatchpage/gfx/startbutton.png
core/assets/cs/screen/nightwatchpage/gfx/startbutton.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/cs/screen/nightwatchpage/gfx/startbutton_pressed.png

7.51 KiB | W: | H:

core/assets/cs/screen/nightwatchpage/gfx/startbutton_pressed.png

12.5 KiB | W: | H:

core/assets/cs/screen/nightwatchpage/gfx/startbutton_pressed.png
core/assets/cs/screen/nightwatchpage/gfx/startbutton_pressed.png
core/assets/cs/screen/nightwatchpage/gfx/startbutton_pressed.png
core/assets/cs/screen/nightwatchpage/gfx/startbutton_pressed.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/de/screen/nightwatchpage/gfx/startbutton.png

30.8 KiB | W: | H:

core/assets/de/screen/nightwatchpage/gfx/startbutton.png

28.4 KiB | W: | H:

core/assets/de/screen/nightwatchpage/gfx/startbutton.png
core/assets/de/screen/nightwatchpage/gfx/startbutton.png
core/assets/de/screen/nightwatchpage/gfx/startbutton.png
core/assets/de/screen/nightwatchpage/gfx/startbutton.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/de/screen/nightwatchpage/gfx/startbutton_pressed.png

8.31 KiB | W: | H:

core/assets/de/screen/nightwatchpage/gfx/startbutton_pressed.png

14.1 KiB | W: | H:

core/assets/de/screen/nightwatchpage/gfx/startbutton_pressed.png
core/assets/de/screen/nightwatchpage/gfx/startbutton_pressed.png
core/assets/de/screen/nightwatchpage/gfx/startbutton_pressed.png
core/assets/de/screen/nightwatchpage/gfx/startbutton_pressed.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/sk/screen/nightwatchpage/gfx/startbutton.png

7.23 KiB | W: | H:

core/assets/sk/screen/nightwatchpage/gfx/startbutton.png

12.3 KiB | W: | H:

core/assets/sk/screen/nightwatchpage/gfx/startbutton.png
core/assets/sk/screen/nightwatchpage/gfx/startbutton.png
core/assets/sk/screen/nightwatchpage/gfx/startbutton.png
core/assets/sk/screen/nightwatchpage/gfx/startbutton.png
  • 2-up
  • Swipe
  • Onion skin
core/assets/sk/screen/nightwatchpage/gfx/startbutton_pressed.png

6.17 KiB | W: | H:

core/assets/sk/screen/nightwatchpage/gfx/startbutton_pressed.png

10.7 KiB | W: | H:

core/assets/sk/screen/nightwatchpage/gfx/startbutton_pressed.png
core/assets/sk/screen/nightwatchpage/gfx/startbutton_pressed.png
core/assets/sk/screen/nightwatchpage/gfx/startbutton_pressed.png
core/assets/sk/screen/nightwatchpage/gfx/startbutton_pressed.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -47,10 +47,20 @@ public enum GameDefinition implements ApplicationEvent, IMenuItem { ...@@ -47,10 +47,20 @@ public enum GameDefinition implements ApplicationEvent, IMenuItem {
RUNES (7, ApplicationTextManager.ApplicationTextsAssets.GAME_RUNES_TITLE, ApplicationTextManager.ApplicationTextsAssets.GAME_RUNES_DESCRIPTION, RunesPageScreen.class, RunesGame.class, false, new RunesGameResultResolver(),ApplicationTextManager.ApplicationTextsAssets.GAME_SCORE, ApplicationTextManager.ApplicationTextsAssets.GAME_AVERAGE_SCORE), RUNES (7, ApplicationTextManager.ApplicationTextsAssets.GAME_RUNES_TITLE, ApplicationTextManager.ApplicationTextsAssets.GAME_RUNES_DESCRIPTION, RunesPageScreen.class, RunesGame.class, false, new RunesGameResultResolver(),ApplicationTextManager.ApplicationTextsAssets.GAME_SCORE, ApplicationTextManager.ApplicationTextsAssets.GAME_AVERAGE_SCORE),
CRIME_SCENE (8, ApplicationTextManager.ApplicationTextsAssets.GAME_CRIME_SCENE_TITLE, ApplicationTextManager.ApplicationTextsAssets.GAME_CRIME_SCENE_DESCRIPTION, CrimeScenePageScreen.class, CrimeSceneGame.class, false, new CrimeSceneGame.GameResultResolver(), ApplicationTextManager.ApplicationTextsAssets.GAME_SCORE, ApplicationTextManager.ApplicationTextsAssets.GAME_AVERAGE_SCORE); CRIME_SCENE (8, ApplicationTextManager.ApplicationTextsAssets.GAME_CRIME_SCENE_TITLE, ApplicationTextManager.ApplicationTextsAssets.GAME_CRIME_SCENE_DESCRIPTION, CrimeScenePageScreen.class, CrimeSceneGame.class, false, new CrimeSceneGame.GameResultResolver(), ApplicationTextManager.ApplicationTextsAssets.GAME_SCORE, ApplicationTextManager.ApplicationTextsAssets.GAME_AVERAGE_SCORE);
public interface GameResultResolver { public static abstract class GameResultResolver {
AbstractTablexiaGame.GameResult getGameCupsResult(Game game); public abstract AbstractTablexiaGame.GameResult getGameCupsResult(Game game);
float getGameScoreResult(Game game); public abstract float getGameScoreResult(Game game);
List<GameScore> getGameScoreList(GameDifficulty difficulty, AbstractTablexiaGame.GameResult result); public abstract List<GameScore> getGameScoreList(GameDifficulty difficulty, AbstractTablexiaGame.GameResult result);
//Override this method if you want to use different values to sort graphs in statistics screen (eg. CrimeScene)
public float getStatisticsScore(Game game) {
return getGameScoreResult(game);
}
//Override this method if you want to show different formatted score in graph detail dialogs in statistics screen (eg. Pursuit or CrimeScene)
public String getFormattedScoreForStatistics(Game game) {
return Integer.toString(Math.round(getGameScoreResult(game)));
}
} }
private int gameNumber; private int gameNumber;
......
...@@ -108,7 +108,8 @@ public class CrimeSceneGame extends AbstractTablexiaGame<CrimeSceneGameState> { ...@@ -108,7 +108,8 @@ public class CrimeSceneGame extends AbstractTablexiaGame<CrimeSceneGameState> {
private int actualRound = 1; private int actualRound = 1;
private int wrongRounds = 0; private int wrongRounds = 0;
public static class GameResultResolver implements GameDefinition.GameResultResolver { public static class GameResultResolver extends GameDefinition.GameResultResolver {
private static final String FORMATTED_TEXT_FOR_STATISTICS_FORMAT = "%d / %d";
@Override @Override
public AbstractTablexiaGame.GameResult getGameCupsResult(Game game) { public AbstractTablexiaGame.GameResult getGameCupsResult(Game game) {
...@@ -121,6 +122,17 @@ public class CrimeSceneGame extends AbstractTablexiaGame<CrimeSceneGameState> { ...@@ -121,6 +122,17 @@ public class CrimeSceneGame extends AbstractTablexiaGame<CrimeSceneGameState> {
return Float.parseFloat(game.getGameScore(SCORE_KEY_COUNT, String.valueOf(correctSounds))); return Float.parseFloat(game.getGameScore(SCORE_KEY_COUNT, String.valueOf(correctSounds)));
} }
@Override
public float getStatisticsScore(Game game) {
//Score to sort graph values in statistics is calculated as "actualScore / maxScore". So 2 cups on hard difficulty wont show up higher than 3 cups on medium difficulty.
return getGameScoreResult(game) / (float)(getMaxScoreForDifficulty(GameDifficulty.getGameDifficultyForDifficultyNumber(game.getGameDifficulty())));
}
@Override
public String getFormattedScoreForStatistics(Game game) {
return String.format(FORMATTED_TEXT_FOR_STATISTICS_FORMAT, Math.round(getGameScoreResult(game)), getMaxScoreForDifficulty(GameDifficulty.getGameDifficultyForDifficultyNumber(game.getGameDifficulty())));
}
@Override @Override
public List<GameScore> getGameScoreList(GameDifficulty difficulty, GameResult result) { public List<GameScore> getGameScoreList(GameDifficulty difficulty, GameResult result) {
ArrayList gameScoreList = new ArrayList<GameScore>(1); ArrayList gameScoreList = new ArrayList<GameScore>(1);
...@@ -549,14 +561,18 @@ public class CrimeSceneGame extends AbstractTablexiaGame<CrimeSceneGameState> { ...@@ -549,14 +561,18 @@ public class CrimeSceneGame extends AbstractTablexiaGame<CrimeSceneGameState> {
actionsStripWidget.getSelectedActions().size() + objectsLayer.getChildren().size == getData().getSolution().size(); actionsStripWidget.getSelectedActions().size() + objectsLayer.getChildren().size == getData().getSolution().size();
} }
private int getMaxScore() { private static int getMaxScoreForDifficulty(GameDifficulty gameDifficulty) {
int maxScore = 0; int maxScore = 0;
for(int i = 0; i < MAX_ROUNDS; i++) { for(int i = 0; i < MAX_ROUNDS; i++) {
maxScore += CrimeSceneDifficulty.getCrimeSceneDifficultyForGameDifficulty(getGameDifficulty()).getNumberOfObjects() + i; maxScore += CrimeSceneDifficulty.getCrimeSceneDifficultyForGameDifficulty(gameDifficulty).getNumberOfObjects() + i;
} }
return maxScore; return maxScore;
} }
private int getMaxScore() {
return getMaxScoreForDifficulty(getGameDifficulty());
}
private void playAllSounds() { private void playAllSounds() {
preparePlaySoundScreen(true); preparePlaySoundScreen(true);
playSoundScreen.playSounds(); playSoundScreen.playSounds();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment