Commit 5fbd7310 authored by Aneta Steimarova's avatar Aneta Steimarova

#944 Created none- one- two-star i-test for all difficulties for game In The Darkness

parent 3446b45e
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,9 +43,21 @@ TestGameRobberyBonusNoneStar
TestGameRobberyBonusOneStar
TestGameRobberyBonusTwoStars
TestGameRobberyBonusThreeStars
TestGameInTheDarknessEasyNoneStar
TestGameInTheDarknessEasyOneStar
TestGameInTheDarknessEasyTwoStars
TestGameInTheDarknessEasyThreeStars
TestGameInTheDarknessMediumNoneStar
TestGameInTheDarknessMediumOneStar
TestGameInTheDarknessMediumTwoStars
TestGameInTheDarknessMediumThreeStars
TestGameInTheDarknessHardNoneStar
TestGameInTheDarknessHardOneStar
TestGameInTheDarknessHardTwoStars
TestGameInTheDarknessHardThreeStars
TestGameInTheDarknessBonusNoneStar
TestGameInTheDarknessBonusOneStar
TestGameInTheDarknessBonusTwoStars
TestGameInTheDarknessBonusThreeStars
TestGameInTheDarknessEasyScenario
TestGameInTheDarknessMediumScenario
......
......@@ -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.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.TestGameInTheDarknessEasyScenario;
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.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,9 +249,21 @@ public class TestRunner {
listOfTests.add(TestGameRobberyBonusOneStar.class);
listOfTests.add(TestGameRobberyBonusTwoStars.class);
listOfTests.add(TestGameRobberyBonusThreeStars.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);
......
......@@ -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,6 +25,10 @@ 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);
......
/*
* 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 {
......
/*
* 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.
*
* 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 TestGameInTheDarknessHardOneStar extends TestGameInTheDarkness {
public TestGameInTheDarknessHardOneStar(Tablexia tablexia) {
super(tablexia);
expectedResult = AbstractTablexiaGame.GameResult.ONE_STAR;
difficulty = GameDifficulty.HARD;
haveScenario = false;
}
}
......@@ -28,6 +28,7 @@ import cz.nic.tablexia.game.games.in_the_darkness.action.InTheDarknessActionType
/**
* Created by lmarik on 27.2.17.
* This test is for testing obstacles
*/
public class TestGameInTheDarknessHardScenario extends TestGameInTheDarkness {
......
/*
* 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 TestGameInTheDarknessHardTwoStars extends TestGameInTheDarkness {
public TestGameInTheDarknessHardTwoStars(Tablexia tablexia) {
super(tablexia);
expectedResult = AbstractTablexiaGame.GameResult.TWO_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.
*
* 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 TestGameInTheDarknessMediumNoneStar extends TestGameInTheDarkness {
public TestGameInTheDarknessMediumNoneStar(Tablexia tablexia) {
super(tablexia);
expectedResult = AbstractTablexiaGame.GameResult.NO_STAR;
difficulty = GameDifficulty.MEDIUM;
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 TestGameInTheDarknessMediumOneStar extends TestGameInTheDarkness {
public TestGameInTheDarknessMediumOneStar(Tablexia tablexia) {
super(tablexia);
expectedResult = AbstractTablexiaGame.GameResult.ONE_STAR;
difficulty = GameDifficulty.MEDIUM;
haveScenario = false;
}
}
......@@ -28,6 +28,7 @@ import cz.nic.tablexia.game.games.in_the_darkness.action.InTheDarknessActionType
/**
* Created by lmarik on 27.2.17.
* This test is for testing obstacles
*/
public class TestGameInTheDarknessMediumScenario extends TestGameInTheDarkness {
......
/*
* 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.