Commit e05798b5 authored by Aneta Steimarova's avatar Aneta Steimarova

#941 Created tests for game Runes bonus difficulty

parent 66e17975
TestGameCrimeSceneEasyNoneStar
TestGameCrimeSceneEasyOneStar
TestGameCrimeSceneEasyTwoStar
TestGameCrimeSceneEasyThreeStar
TestGameCrimeSceneMediumNoneStar
TestGameCrimeSceneMediumOneStar
TestGameCrimeSceneMediumTwoStar
TestGameCrimeSceneMediumThreeStar
TestGameCrimeSceneHardNoneStar
TestGameCrimeSceneHardOneStar
TestGameCrimeSceneHardTwoStar
TestGameCrimeSceneHardThreeStar
TestGameCrimeSceneBonusNoneStar
TestGameCrimeSceneBonusOneStar
TestGameCrimeSceneBonusTwoStar
TestGameCrimeSceneBonusThreeStar
TestGameSafeEasyNoneStars
TestGameSafeEasyOneStars
TestGameSafeEasyTwoStars
TestGameSafeEasyThreeStars
TestGameSafeMediumNoneStars
TestGameSafeMediumOneStar
TestGameSafeMediumTwoStars
TestGameSafeMediumThreeStars
TestGameSafeHardNoneStars
TestGameSafeHardOneStar
TestGameSafeHardTwoStars
TestGameSafeHardThreeStars
TestGameSafeBonusNoneStars
TestGameSafeBonusOneStars
TestGameSafeBonusTwoStars
TestGameSafeBonusThreeStars
TestGameShootingRangeEasyNoneStar
TestGameShootingRangeEasyOneStar
TestGameShootingRangeEasyTwoStar
TestGameShootingRangeEasyThreeStar
TestGameShootingRangeMediumNoneStar
TestGameShootingRangeMediumOneStar
TestGameShootingRangeMediumTwoStar
TestGameShootingRangeMediumThreeStar
TestGameShootingRangeHardNoneStar
TestGameShootingRangeHardOneStar
TestGameShootingRangeHardTwoStar
TestGameShootingRangeHardThreeStar
TestGameShootingRangeBonusNoneStar
TestGameShootingRangeBonusOneStar
TestGameShootingRangeBonusTwoStar
TestGameShootingRangeBonusThreeStar
\ No newline at end of file
TestGameRunesEasyNoneStar
TestGameRunesEasyOneStar
TestGameRunesEasyTwoStar
TestGameRunesEasyThreeStar
TestGameRunesMediumNoneStar
TestGameRunesMediumOneStar
TestGameRunesMediumTwoStar
TestGameRunesMediumThreeStar
TestGameRunesHardNoneStar
TestGameRunesHardOneStar
TestGameRunesHardTwoStar
TestGameRunesHardThreeStar
TestGameRunesBonusNoneStar
TestGameRunesBonusOneStar
TestGameRunesBonusTwoStars
TestGameRunesBonusThreeStars
\ No newline at end of file
......@@ -109,6 +109,10 @@ TestGameRunesHardNoneStar
TestGameRunesHardOneStar
TestGameRunesHardTwoStar
TestGameRunesHardThreeStar
TestGameRunesBonusNoneStar
TestGameRunesBonusOneStar
TestGameRunesBonusTwoStars
TestGameRunesBonusThreeStars
TestGameProtocolEasyNoneStar <--This test could fail
TestGameProtocolEasyOneStar
TestGameProtocolEasyTwoStar
......@@ -150,4 +154,4 @@ TestStatisticsProtocol
TestStatisticsSafe
TestEncyclopedia
TestProfile
OfficeTestScenario
OfficeTestScenario
\ No newline at end of file
......@@ -109,6 +109,10 @@ import cz.nic.tablexia.testing.games.robbery.TestGameRobberyMediumNoneStar;
import cz.nic.tablexia.testing.games.robbery.TestGameRobberyMediumOneStar;
import cz.nic.tablexia.testing.games.robbery.TestGameRobberyMediumThreeStar;
import cz.nic.tablexia.testing.games.robbery.TestGameRobberyMediumTwoStar;
import cz.nic.tablexia.testing.games.runes.TestGameRunesBonusNoneStar;
import cz.nic.tablexia.testing.games.runes.TestGameRunesBonusOneStar;
import cz.nic.tablexia.testing.games.runes.TestGameRunesBonusThreeStars;
import cz.nic.tablexia.testing.games.runes.TestGameRunesBonusTwoStars;
import cz.nic.tablexia.testing.games.runes.TestGameRunesEasyNoneStar;
import cz.nic.tablexia.testing.games.runes.TestGameRunesEasyOneStar;
import cz.nic.tablexia.testing.games.runes.TestGameRunesEasyThreeStar;
......@@ -281,6 +285,10 @@ public class TestRunner {
listOfTests.add(TestGameRunesHardOneStar.class);
listOfTests.add(TestGameRunesHardTwoStar.class);
listOfTests.add(TestGameRunesHardThreeStar.class);
listOfTests.add(TestGameRunesBonusNoneStar.class);
listOfTests.add(TestGameRunesBonusOneStar.class);
listOfTests.add(TestGameRunesBonusTwoStars.class);
listOfTests.add(TestGameRunesBonusThreeStars.class);
listOfTests.add(TestGameProtocolEasyNoneStar.class);
listOfTests.add(TestGameProtocolEasyOneStar.class);
listOfTests.add(TestGameProtocolEasyTwoStar.class);
......
......@@ -138,7 +138,7 @@ public class TestGameRunes extends AbstractTestGame {
boolean mistakeInRound = playRound(targetPlate,runes);
if(mistakeInRound==true) mistakesCounter++;
if(!healthBar.hasHealthsLeft() || mistakesCounter >= 3 || round >= RunesGameProperties.GAME_ROUNDS){
if(!healthBar.hasHealthsLeft() || mistakesCounter >= 2 || round >= RunesGameProperties.GAME_ROUNDS){
break;
}
......
/*
* 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.runes;
import cz.nic.tablexia.Tablexia;
import cz.nic.tablexia.game.AbstractTablexiaGame;
import cz.nic.tablexia.game.difficulty.GameDifficulty;
public class TestGameRunesBonusNoneStar extends TestGameRunes {
public TestGameRunesBonusNoneStar(Tablexia tablexia) {
super(tablexia);
difficulty = GameDifficulty.BONUS;
expectedResult = AbstractTablexiaGame.GameResult.NO_STAR;
}
}
/*
* 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.runes;
import cz.nic.tablexia.Tablexia;
import cz.nic.tablexia.game.AbstractTablexiaGame;
import cz.nic.tablexia.game.difficulty.GameDifficulty;
public class TestGameRunesBonusOneStar extends TestGameRunes {
public TestGameRunesBonusOneStar(Tablexia tablexia) {
super(tablexia);
difficulty = GameDifficulty.BONUS;
expectedResult = AbstractTablexiaGame.GameResult.ONE_STAR;
}
}
/*
* 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.runes;
import cz.nic.tablexia.Tablexia;
import cz.nic.tablexia.game.AbstractTablexiaGame;
import cz.nic.tablexia.game.difficulty.GameDifficulty;
public class TestGameRunesBonusThreeStars extends TestGameRunes {
public TestGameRunesBonusThreeStars(Tablexia tablexia) {
super(tablexia);
difficulty = GameDifficulty.BONUS;
expectedResult = AbstractTablexiaGame.GameResult.THREE_STAR;
}
}
/*
* 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.runes;
import cz.nic.tablexia.Tablexia;
import cz.nic.tablexia.game.AbstractTablexiaGame;
import cz.nic.tablexia.game.difficulty.GameDifficulty;
public class TestGameRunesBonusTwoStars extends TestGameRunes {
public TestGameRunesBonusTwoStars(Tablexia tablexia) {
super(tablexia);
difficulty = GameDifficulty.BONUS;
expectedResult = AbstractTablexiaGame.GameResult.TWO_STAR;
}
}
......@@ -10,3 +10,7 @@ TestGameRunesHardNoneStar
TestGameRunesHardOneStar
TestGameRunesHardTwoStar
TestGameRunesHardThreeStar
TestGameRunesBonusNoneStar
TestGameRunesBonusOneStar
TestGameRunesBonusTwoStars
TestGameRunesBonusThreeStars
\ 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