Commit 15e2590a authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko

Merge branch 'feature-itest-in-the-darkness' into 'V3.7'

Feature itest in the darkness

See merge request !736
parents 8eb52e8e 7a5dd0a7
TestGameProtocolEasyOneStar
TestGameProtocolEasyTwoStar
TestGameProtocolEasyThreeStar
TestGameProtocolMediumOneStar
TestGameProtocolMediumTwoStar
TestGameProtocolMediumThreeStar
TestGameProtocolHardOneStar
TestGameProtocolHardTwoStar
TestGameProtocolHardThreeStar
\ No newline at end of file
TestGameInTheDarknessEasyNoneStar
TestGameInTheDarknessEasyOneStar
TestGameInTheDarknessEasyTwoStars
TestGameInTheDarknessEasyThreeStars
TestGameInTheDarknessMediumNoneStar
TestGameInTheDarknessMediumOneStar
TestGameInTheDarknessMediumTwoStars
TestGameInTheDarknessMediumThreeStars
TestGameInTheDarknessHardNoneStar
TestGameInTheDarknessHardOneStar
TestGameInTheDarknessHardTwoStars
TestGameInTheDarknessHardThreeStars
TestGameInTheDarknessBonusNoneStar
TestGameInTheDarknessBonusOneStar
TestGameInTheDarknessBonusTwoStars
TestGameInTheDarknessBonusThreeStars
TestGameInTheDarknessEasyScenario
TestGameInTheDarknessMediumScenario
TestGameInTheDarknessHardScenario
TestGameInTheDarknessBonusScenario
\ No newline at end of file
......@@ -43,10 +43,22 @@ TestGameRobberyBonusNoneStar
TestGameRobberyBonusOneStar
TestGameRobberyBonusTwoStars
TestGameRobberyBonusThreeStars
TestGameInTheDarknessEasy
TestGameInTheDarknessMedium
TestGameInTheDarknessHard
TestGameInTheDarknessBonus
TestGameInTheDarknessEasyNoneStar
TestGameInTheDarknessEasyOneStar
TestGameInTheDarknessEasyTwoStars
TestGameInTheDarknessEasyThreeStars
TestGameInTheDarknessMediumNoneStar
TestGameInTheDarknessMediumOneStar
TestGameInTheDarknessMediumTwoStars
TestGameInTheDarknessMediumThreeStars
TestGameInTheDarknessHardNoneStar
TestGameInTheDarknessHardOneStar
TestGameInTheDarknessHardTwoStars
TestGameInTheDarknessHardThreeStars
TestGameInTheDarknessBonusNoneStar
TestGameInTheDarknessBonusOneStar
TestGameInTheDarknessBonusTwoStars
TestGameInTheDarknessBonusThreeStars
TestGameInTheDarknessEasyScenario
TestGameInTheDarknessMediumScenario
TestGameInTheDarknessHardScenario
......
......@@ -43,14 +43,26 @@ 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.TestGameInTheDarknessBonusNoneStar;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessBonusOneStar;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessBonusTwoStars;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessEasyNoneStar;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessEasyOneStar;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessEasyThreeStars;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessBonusThreeStars;
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;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessHardNoneStar;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessHardOneStar;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessHardThreeStars;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessHardScenario;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessMedium;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessHardTwoStars;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessMediumThreeStars;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessMediumScenario;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessEasyTwoStars;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessMediumNoneStar;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessMediumOneStar;
import cz.nic.tablexia.testing.games.in_the_darkness.TestGameInTheDarknessMediumTwoStars;
import cz.nic.tablexia.testing.games.kidnapping.TestGameKidnappingBonusNoneStar;
import cz.nic.tablexia.testing.games.kidnapping.TestGameKidnappingBonusOneStar;
import cz.nic.tablexia.testing.games.kidnapping.TestGameKidnappingBonusThreeStars;
......@@ -237,13 +249,25 @@ public class TestRunner {
listOfTests.add(TestGameRobberyBonusOneStar.class);
listOfTests.add(TestGameRobberyBonusTwoStars.class);
listOfTests.add(TestGameRobberyBonusThreeStars.class);
listOfTests.add(TestGameInTheDarknessEasy.class);
listOfTests.add(TestGameInTheDarknessMedium.class);
listOfTests.add(TestGameInTheDarknessHard.class);
listOfTests.add(TestGameInTheDarknessEasyNoneStar.class);
listOfTests.add(TestGameInTheDarknessEasyOneStar.class);
listOfTests.add(TestGameInTheDarknessEasyTwoStars.class);
listOfTests.add(TestGameInTheDarknessEasyThreeStars.class);
listOfTests.add(TestGameInTheDarknessMediumNoneStar.class);
listOfTests.add(TestGameInTheDarknessMediumOneStar.class);
listOfTests.add(TestGameInTheDarknessMediumTwoStars.class);
listOfTests.add(TestGameInTheDarknessMediumThreeStars.class);
listOfTests.add(TestGameInTheDarknessHardNoneStar.class);
listOfTests.add(TestGameInTheDarknessHardOneStar.class);
listOfTests.add(TestGameInTheDarknessHardTwoStars.class);
listOfTests.add(TestGameInTheDarknessHardThreeStars.class);
listOfTests.add(TestGameInTheDarknessBonusNoneStar.class);
listOfTests.add(TestGameInTheDarknessBonusOneStar.class);
listOfTests.add(TestGameInTheDarknessBonusTwoStars.class);
listOfTests.add(TestGameInTheDarknessBonusThreeStars.class);
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);
......
......@@ -110,6 +110,7 @@ public class TestGameInTheDarkness extends AbstractTestGame {
private int xMoveFinish = 1000;
private int yMoveFinish = 1000;
private int mistakesCounter = 0;
public TestGameInTheDarkness(Tablexia tablexia) {
super(tablexia);
......@@ -204,6 +205,13 @@ public class TestGameInTheDarkness extends AbstractTestGame {
waitForEvent(incGetSteps() + "Wait for first floor", InTheDarknessGame.EVENT_SHOW_OTHER_FLOOR);
exceptedFail = getMistakesForStars(expectedResult);
while(needMistake()){
setActionByAStarBonus(matrixMapFirstFloor, matrixMapSecondFloor, true);
startGame();
resetMenu();
mistakesCounter++;
}
setActionByAStarBonus(matrixMapFirstFloor, matrixMapSecondFloor);
startGame();
......@@ -213,6 +221,14 @@ public class TestGameInTheDarkness extends AbstractTestGame {
testStartAndFinishXAndY();
exceptedFail = getMistakesForStars(expectedResult);
while(needMistake()){
setActionByAStar(matrixMap, true);
startGame();
resetMenu();
mistakesCounter++;
}
setActionByAStar(matrixMap);
startGame();
......@@ -239,6 +255,18 @@ public class TestGameInTheDarkness extends AbstractTestGame {
}
private boolean needMistake() {
if(mistakesCounter < getMistakesForStars(expectedResult)) return true;
else return false;
}
private int getMistakesForStars(AbstractTablexiaGame.GameResult expectedResult) {
if(expectedResult == AbstractTablexiaGame.GameResult.NO_STAR) return InTheDarknessScoreResolver.ERROR_COUNT_ONE_STAR;
else if (expectedResult == AbstractTablexiaGame.GameResult.ONE_STAR) return InTheDarknessScoreResolver.ERROR_COUNT_TWO_STARS;
else if (expectedResult == AbstractTablexiaGame.GameResult.TWO_STAR) return InTheDarknessScoreResolver.ERROR_COUNT_THREE_STARS;
else return 0; //three stars
}
private void testStartAndFinishXAndY() {
//test start exists
if (startX == -1 || startY == -1) {
......@@ -294,7 +322,11 @@ public class TestGameInTheDarkness extends AbstractTestGame {
}
}
private void setActionByAStarBonus(int[][] matrixMapFirstFloor, int[][] matrixMapSecondFloor) {
private void setActionByAStarBonus(int[][] matrixMapFirstFloor, int[][] matrixMapSecondFloor){
setActionByAStarBonus(matrixMapFirstFloor, matrixMapSecondFloor, false);
}
private void setActionByAStarBonus(int[][] matrixMapFirstFloor, int[][] matrixMapSecondFloor, boolean makeMistake) {
ActionsWidget actionsWidget = (ActionsWidget) findGameActor(InTheDarknessGame.ACTIONS_WIDGET);
Player player = (Player) findGameActor(InTheDarknessGame.PLAYER);
......@@ -313,12 +345,14 @@ public class TestGameInTheDarkness extends AbstractTestGame {
}
int playerPosition = player.getActualPlayerOrientation().ordinal();
playerPosition = findPathAndSetActions(aStar, actionsWidget, playerPosition);
if(makeMistake)playerPosition = findPathAndSetActions(aStar, actionsWidget, playerPosition, true);
else playerPosition = findPathAndSetActions(aStar, actionsWidget, playerPosition);
if (playerPosition == -1){
logError("A star find path failed!");
stopTheTest();
}
if(makeMistake) return;
if(findKey){
//second path from key to stairs first floor
......@@ -354,7 +388,11 @@ public class TestGameInTheDarkness extends AbstractTestGame {
}
private int findPathAndSetActions(AStar aStar, ActionsWidget actionsWidget, int playerPosition) {
private int findPathAndSetActions(AStar aStar, ActionsWidget actionsWidget, int playerPosition){
return findPathAndSetActions(aStar, actionsWidget, playerPosition, false);
}
private int findPathAndSetActions(AStar aStar, ActionsWidget actionsWidget, int playerPosition, boolean makeMistake) {
Stack<Node> path = aStar.findPath();
if (path.isEmpty()){
logError("A star cannot find path");
......@@ -363,7 +401,7 @@ public class TestGameInTheDarkness extends AbstractTestGame {
//pop start node
path.pop();
return setActionByPath(path,actionsWidget,playerPosition);
return setActionByPath(path,actionsWidget,playerPosition, makeMistake);
}
private void setStartAndEnd(AStar aStar, int startX, int startY, int endX, int endY) {
......@@ -383,6 +421,10 @@ public class TestGameInTheDarkness extends AbstractTestGame {
}
private void setActionByAStar(int[][] matrixMap){
setActionByAStar(matrixMap, false);
}
private void setActionByAStar(int[][] matrixMap, boolean makeMistake){
ActionsWidget actionsWidget = (ActionsWidget) findGameActor(InTheDarknessGame.ACTIONS_WIDGET);
Player player = (Player) findGameActor(InTheDarknessGame.PLAYER);
......@@ -401,13 +443,15 @@ public class TestGameInTheDarkness extends AbstractTestGame {
}
int playerPosition = player.getActualPlayerOrientation().ordinal();
playerPosition = findPathAndSetActions(aStar, actionsWidget, playerPosition);
playerPosition = findPathAndSetActions(aStar, actionsWidget, playerPosition, makeMistake);
if (playerPosition == -1){
logError("A start find path failed!");
stopTheTest();
}
if(makeMistake) return;
if(findKey){
//second path from key to safe
addActionsByTime(InTheDarknessActionType.KEY,actionsWidget.getAction(),1);
......@@ -417,7 +461,7 @@ public class TestGameInTheDarkness extends AbstractTestGame {
}
}
private int setActionByPath(Stack<Node> path, ActionsWidget actionsWidget,int playerPosition ){
private int setActionByPath(Stack<Node> path, ActionsWidget actionsWidget,int playerPosition, boolean makeMistake ){
Node current;
Node next;
......@@ -448,16 +492,35 @@ public class TestGameInTheDarkness extends AbstractTestGame {
stepCount+=times;
if(diff < 0){
addActionsByTime(InTheDarknessActionType.LEFT,actionsWidget.getAction(),times);
if(makeMistake){
addActionsByTime(InTheDarknessActionType.RIGHT,actionsWidget.getAction(),times);
addActionsByTime(InTheDarknessActionType.GO, actionsWidget.getAction(), 1);
stepCount++;
return needOrientation;
}
else addActionsByTime(InTheDarknessActionType.LEFT,actionsWidget.getAction(),times);
}else{
addActionsByTime(InTheDarknessActionType.RIGHT,actionsWidget.getAction(),times);
if(makeMistake){
addActionsByTime(InTheDarknessActionType.LEFT,actionsWidget.getAction(),times);
addActionsByTime(InTheDarknessActionType.GO, actionsWidget.getAction(), 1);
stepCount++;
return needOrientation;
}
else addActionsByTime(InTheDarknessActionType.RIGHT,actionsWidget.getAction(),times);
}
}
//Check door
if(current.getTypeStep() == DOOR.ordinal() && !isOpenedDoor(current)){
addActionsByTime(InTheDarknessActionType.DOOR,actionsWidget.getAction(),1);
openedDoors.add(current);
if(makeMistake){
addActionsByTime(InTheDarknessActionType.GO, actionsWidget.getAction(), 1);
stepCount++;
return needOrientation;
}
else{
addActionsByTime(InTheDarknessActionType.DOOR,actionsWidget.getAction(),1);
openedDoors.add(current);
}
stepCount++;
}
......
/*
* Copyright (C) 2018 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 TestGameInTheDarknessBonusNoneStar extends TestGameInTheDarkness {
public TestGameInTheDarknessBonusNoneStar(Tablexia tablexia) {
super(tablexia);
expectedResult = AbstractTablexiaGame.GameResult.NO_STAR;
difficulty = GameDifficulty.BONUS;
haveScenario = false;
}
}
/*
* Copyright (C) 2018 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 TestGameInTheDarknessBonusOneStar extends TestGameInTheDarkness {
public TestGameInTheDarknessBonusOneStar(Tablexia tablexia) {
super(tablexia);
expectedResult = AbstractTablexiaGame.GameResult.ONE_STAR;
difficulty = GameDifficulty.BONUS;
haveScenario = false;
}
}
......@@ -25,21 +25,98 @@ import cz.nic.tablexia.game.AbstractTablexiaGame;
import cz.nic.tablexia.game.difficulty.GameDifficulty;
import cz.nic.tablexia.game.games.in_the_darkness.action.InTheDarknessActionType;
/**
* This test is for testing obstacles
*/
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;
expectedResult = AbstractTablexiaGame.GameResult.ONE_STAR;
exceptedFail = 5;
haveScenario = true;
initSteps();
}
private void initSteps(){
scenarioSteps.put(0, Arrays.asList(new InTheDarknessActionType[]{
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.STAIRS,
}));
scenarioSteps.put(1, Arrays.asList(new InTheDarknessActionType[]{
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.LEFT,
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.GO,
InTheDarknessActionType.LEFT,
InTheDarknessActionType.STAIRS,
}));
scenarioSteps.put(2, Arrays.asList(new InTheDarknessActionType[]{
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
InTheDarknessActionType.STAIRS,
}));
scenarioSteps.put(3, 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.GO,
}));
scenarioSteps.put(4, Arrays.asList(new InTheDarknessActionType[]{
InTheDarknessActionType.GO,
InTheDarknessActionType.RIGHT,
InTheDarknessActionType.GO,
......
......@@ -21,8 +21,8 @@ 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) {
public class TestGameInTheDarknessBonusThreeStars extends TestGameInTheDarkness {
public TestGameInTheDarknessBonusThreeStars(Tablexia tablexia) {
super(tablexia);
expectedResult = AbstractTablexiaGame.GameResult.THREE_STAR;
difficulty = GameDifficulty.BONUS;
......
/*
* Copyright (C) 2018 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 TestGameInTheDarknessBonusTwoStars extends TestGameInTheDarkness {
public TestGameInTheDarknessBonusTwoStars(Tablexia tablexia) {
super(tablexia);
expectedResult = AbstractTablexiaGame.GameResult.TWO_STAR;
difficulty = GameDifficulty.BONUS;
haveScenario = false;
}
}
/*
* Copyright (C) 2018 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 TestGameInTheDarknessEasyNoneStar extends TestGameInTheDarkness {
public TestGameInTheDarknessEasyNoneStar(Tablexia tablexia) {
super(tablexia);
expectedResult = AbstractTablexiaGame.GameResult.NO_STAR;
difficulty = GameDifficulty.EASY;
haveScenario = false;
}
}
/*
* Copyright (C) 2018 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 TestGameInTheDarknessEasyOneStar extends TestGameInTheDarkness {
public TestGameInTheDarknessEasyOneStar(Tablexia tablexia) {
super(tablexia);
expectedResult = AbstractTablexiaGame.GameResult.ONE_STAR;
difficulty = GameDifficulty.EASY;
haveScenario = false;
}
}
......@@ -29,6 +29,7 @@ import cz.nic.tablexia.game.games.in_the_darkness.action.InTheDarknessActionType
/**
* Created by lmarik on 24.2.17.
* This test is for testing obstacles
*/
public class TestGameInTheDarknessEasyScenario extends TestGameInTheDarkness {
......
......@@ -26,8 +26,8 @@ import cz.nic.tablexia.game.difficulty.GameDifficulty;
* Created by lmarik on 23.2.17.
*/
public class TestGameInTheDarknessEasy extends TestGameInTheDarkness {
public TestGameInTheDarknessEasy(Tablexia tablexia) {
public class TestGameInTheDarknessEasyThreeStars extends TestGameInTheDarkness {
public TestGameInTheDarknessEasyThreeStars(Tablexia tablexia) {
super(tablexia);
expectedResult = AbstractTablexiaGame.GameResult.THREE_STAR;
difficulty = GameDifficulty.EASY;
......
/*
* Copyright (C) 2018 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 TestGameInTheDarknessEasyTwoStars extends TestGameInTheDarkness {
public TestGameInTheDarknessEasyTwoStars(Tablexia tablexia) {
super(tablexia);
expectedResult = AbstractTablexiaGame.GameResult.TWO_STAR;
difficulty = GameDifficulty.EASY;
haveScenario = false;
}
}
/*
* Copyright (C) 2018 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 TestGameInTheDarknessHardNoneStar extends TestGameInTheDarkness {
public TestGameInTheDarknessHardNoneStar(Tablexia tablexia) {
super(tablexia);
expectedResult = AbstractTablexiaGame.GameResult.NO_STAR;
difficulty = GameDifficulty.HARD;
haveScenario = false;
}
}
/*
* Copyright (C) 2018 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.
*