Commit e5999e80 authored by Aneta Steimarova's avatar Aneta Steimarova

#941 Created i-tests for game In The Darkness bonus difficulty

parent 2edc1aa6
......@@ -88,6 +88,7 @@ public class InTheDarknessGame extends AbstractTablexiaGame<List<MapWidget>> imp
public static final String PLAYER = "player";
public static final String EVENT_SHOW_ANIMATION_FINISHED = "show animation finished";
public static final String EVENT_SHOW_OTHER_FLOOR = "show other floor";
public enum GameLayer {
......@@ -191,7 +192,7 @@ public class InTheDarknessGame extends AbstractTablexiaGame<List<MapWidget>> imp
private final int START_TILE_OFFSET_X = 1;
private final int START_TILE_OFFSET_Y = 2;
private static final String BOOKMARK_FLOOR_TEXT_KEY = "floor";
public static final String BOOKMARK_FLOOR_TEXT_KEY = "floor";
private static final String SCORE0_TEXT_KEY = "score_0";
private static final String SCORE1_TEXT_KEY = "score_1";
private static final String SCORE2_TEXT_KEY = "score_2";
......@@ -684,6 +685,7 @@ public class InTheDarknessGame extends AbstractTablexiaGame<List<MapWidget>> imp
}
}
GameLayer.PLAYER_LAYER.getLayerEntity().setVisible(player.getActualFloor() == mapWidgetNumber);
triggerScenarioStepEvent(EVENT_SHOW_OTHER_FLOOR);
}
@Override
......
......@@ -135,6 +135,7 @@ public class MapWidget extends Group {
}
}
});
bookmarkButton.setName((floorNumber + 1) + " " + InTheDarknessGame.BOOKMARK_FLOOR_TEXT_KEY);
backgroundLayer.addActor(bookmarkButton);
}
......
TestGameKidnappingEasyNoneStar
TestGameKidnappingEasyOneStar
TestGameKidnappingEasyTwoStar
TestGameKidnappingEasyThreeStar
TestGameKidnappingMediumNoneStar
TestGameKidnappingMediumOneStar
TestGameKidnappingMediumTwoStar
TestGameKidnappingMediumThreeStar
TestGameKidnappingHardNoneStar
TestGameKidnappingHardOneStar
TestGameKidnappingHardTwoStar
TestGameKidnappingHardThreeStar
TestGameShootingRangeBonusNoneStar
TestGameShootingRangeBonusOneStar
TestGameShootingRangeBonusTwoStar
TestGameShootingRangeBonusThreeStar
TestGameRobberyBonusNoneStar
TestGameRobberyBonusOneStar
TestGameRobberyBonusTwoStars
TestGameRobberyBonusThreeStars
TestGameInTheDarknessEasy
TestGameInTheDarknessMedium
TestGameInTheDarknessHard
TestGameInTheDarknessBonus
TestGameInTheDarknessEasyScenario
TestGameInTheDarknessMediumScenario
TestGameInTheDarknessHardScenario
TestGameInTheDarknessBonusScenario
TestGameNightWatchBonusNoneStar
TestGameNightWatchBonusOneStar
TestGameNightWatchBonusTwoStars
TestGameNightWatchBonusThreeStars
TestGamePursuitBonusNoneStar
TestGamePursuitBonusOneStar
TestGamePursuitBonusTwoStars
TestGamePursuitBonusThreeStars
TestGameCrimeSceneBonusNoneStar
TestGameCrimeSceneBonusOneStar
TestGameCrimeSceneBonusTwoStar
TestGameCrimeSceneBonusThreeStar
TestGameKidnappingBonusNoneStar
TestGameKidnappingBonusOneStar
TestGameKidnappingBonusTwoStars
TestGameKidnappingBonusThreeStars
\ No newline at end of file
TestGameKidnappingBonusThreeStars
TestGameRunesBonusNoneStar
TestGameRunesBonusOneStar
TestGameRunesBonusTwoStars
TestGameRunesBonusThreeStars
TestGameSafeBonusNoneStars
TestGameSafeBonusOneStars
TestGameSafeBonusTwoStars
TestGameSafeBonusThreeStars
\ No newline at end of file
......@@ -46,9 +46,11 @@ TestGameRobberyBonusThreeStars
TestGameInTheDarknessEasy
TestGameInTheDarknessMedium
TestGameInTheDarknessHard
TestGameInTheDarknessBonus
TestGameInTheDarknessEasyScenario
TestGameInTheDarknessMediumScenario
TestGameInTheDarknessHardScenario
TestGameInTheDarknessBonusScenario
TestGameNightWatchEasyNoneStar
TestGameNightWatchEasyOneStar
TestGameNightWatchEasyTwoStar
......@@ -61,6 +63,10 @@ TestGameNightWatchHardNoneStar
TestGameNightWatchHardOneStar
TestGameNightWatchHardTwoStar
TestGameNightWatchHardThreeStar
TestGameNightWatchBonusNoneStar
TestGameNightWatchBonusOneStar
TestGameNightWatchBonusTwoStars
TestGameNightWatchBonusThreeStars
TestGamePursuitEasyNoneStar
TestGamePursuitEasyOneStar
TestGamePursuitEasyTwoStar
......@@ -73,6 +79,10 @@ TestGamePursuitHardNoneStar
TestGamePursuitHardOneStar
TestGamePursuitHardTwoStar
TestGamePursuitHardThreeStar
TestGamePursuitBonusNoneStar
TestGamePursuitBonusOneStar
TestGamePursuitBonusTwoStars
TestGamePursuitBonusThreeStars
TestGameCrimeSceneEasyNoneStar
TestGameCrimeSceneEasyOneStar
TestGameCrimeSceneEasyTwoStar
......@@ -101,6 +111,10 @@ TestGameKidnappingHardNoneStar
TestGameKidnappingHardOneStar
TestGameKidnappingHardTwoStar
TestGameKidnappingHardThreeStar
TestGameKidnappingBonusNoneStar
TestGameKidnappingBonusOneStar
TestGameKidnappingBonusTwoStars
TestGameKidnappingBonusThreeStars
TestGameRunesEasyNoneStar
TestGameRunesEasyOneStar
TestGameRunesEasyTwoStar
......
......@@ -43,6 +43,8 @@ import cz.nic.tablexia.testing.games.crime_scene.TestGameCrimeSceneMediumNoneSta
import cz.nic.tablexia.testing.games.crime_scene.TestGameCrimeSceneMediumOneStar;
import cz.nic.tablexia.testing.games.crime_scene.TestGameCrimeSceneMediumThreeStar;
import cz.nic.tablexia.testing.games.crime_scene.TestGameCrimeSceneMediumTwoStar;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessBonus;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessBonusScenario;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessEasy;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessEasyScenario;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessHard;
......@@ -241,6 +243,8 @@ public class TestRunner {
listOfTests.add(TestGameInTheDarknessEasyScenario.class);
listOfTests.add(TestGameInTheDarknessMediumScenario.class);
listOfTests.add(TestGameInTheDarknessHardScenario.class);
listOfTests.add(TestGameInTheDarknessBonus.class);
listOfTests.add(TestGameInTheDarknessBonusScenario.class);
listOfTests.add(TestGameNightWatchEasyNoneStar.class);
listOfTests.add(TestGameNightWatchEasyOneStar.class);
listOfTests.add(TestGameNightWatchEasyTwoStar.class);
......
/*
* Copyright (C) 2017 CZ.NIC, z.s.p.o. (http://www.nic.cz/)
*
* This program 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 <http://www.gnu.org/licenses/>.
*/
package cz.nic.tablexia.testing.games.in_the_darkness;
import cz.nic.tablexia.Tablexia;
import cz.nic.tablexia.game.AbstractTablexiaGame;
import cz.nic.tablexia.game.difficulty.GameDifficulty;
public class TestGameInTheDarknessBonus extends TestGameInTheDarkness {
public TestGameInTheDarknessBonus(Tablexia tablexia) {
super(tablexia);
expectedResult = AbstractTablexiaGame.GameResult.THREE_STAR;
difficulty = GameDifficulty.BONUS;
haveScenario = false;
}
}
/*
* Copyright (C) 2017 CZ.NIC, z.s.p.o. (http://www.nic.cz/)
*
* This program 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 <http://www.gnu.org/licenses/>.
*/
package cz.nic.tablexia.testing.games.in_the_darkness;
import java.util.Arrays;
import cz.nic.tablexia.Tablexia;
import cz.nic.tablexia.TablexiaSettings;
import cz.nic.tablexia.game.AbstractTablexiaGame;
import cz.nic.tablexia.game.difficulty.GameDifficulty;
import cz.nic.tablexia.game.games.in_the_darkness.action.InTheDarknessActionType;
public class TestGameInTheDarknessBonusScenario extends TestGameInTheDarkness {
public TestGameInTheDarknessBonusScenario(Tablexia tablexia) {
super(tablexia);
TablexiaSettings.GAMES_RANDOM_SEED = 1537270739566L;
difficulty = GameDifficulty.BONUS;
expectedResult = AbstractTablexiaGame.GameResult.THREE_STAR;
exceptedFail = 0;
haveScenario = true;
initSteps();
}
private void initSteps(){
scenarioSteps.put(0, Arrays.asList(new InTheDarknessActionType[]{
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.LEFT,
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.LEFT,
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.LEFT,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.LEFT,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.KEY,
InTheDarknessActionType.LEFT,
InTheDarknessActionType.LEFT,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.LEFT,
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.LEFT,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.STAIRS,
InTheDarknessActionType.GO,
InTheDarknessActionType.LEFT,
InTheDarknessActionType.GO,
InTheDarknessActionType.LEFT,
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
}));
}
}
TestGameInTheDarknessEasy
TestGameInTheDarknessMedium
TestGameInTheDarknessHard
TestGameInTheDarknessBonus
TestGameInTheDarknessEasyScenario
TestGameInTheDarknessMediumScenario
TestGameInTheDarknessHardScenario
TestGameInTheDarknessBonusScenario
\ No newline at end of file
Markdown is supported
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