-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from EntelectChallenge/develop
Develop to master merge
- Loading branch information
Showing
99 changed files
with
2,126 additions
and
350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...rc/main/java/za/co/entelect/challenge/game/contracts/exceptions/MatchFailedException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package za.co.entelect.challenge.game.contracts.exceptions; | ||
|
||
public class MatchFailedException extends Exception { | ||
|
||
public MatchFailedException(String message) { | ||
super(message); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...ce/src/main/java/za/co/entelect/challenge/game/contracts/exceptions/TimeoutException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package za.co.entelect.challenge.game.contracts.exceptions; | ||
|
||
public class TimeoutException extends Exception { | ||
|
||
public TimeoutException(String message) { | ||
super(message); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
...gine-interface/src/main/java/za/co/entelect/challenge/game/contracts/game/GameEngine.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package za.co.entelect.challenge.game.contracts.game; | ||
|
||
import za.co.entelect.challenge.game.contracts.exceptions.TimeoutException; | ||
import za.co.entelect.challenge.game.contracts.map.GameMap; | ||
|
||
public interface GameEngine { | ||
|
||
boolean isGameComplete(GameMap gameMap); | ||
|
||
boolean isGameComplete(GameMap gameMap) throws TimeoutException; | ||
} |
13 changes: 13 additions & 0 deletions
13
...gine-interface/src/main/java/za/co/entelect/challenge/game/contracts/game/GameResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package za.co.entelect.challenge.game.contracts.game; | ||
|
||
public class GameResult { | ||
|
||
public String matchId = ""; | ||
public boolean isComplete = false; | ||
public boolean isSuccessful = false; | ||
public int winner = 0; | ||
public int playerOnePoints = 0; | ||
public int playerTwoPoints = 0; | ||
public int roundsPlayed = 0; | ||
public boolean verificationRequired = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
game-engine/core/src/main/java/za/co/entelect/challenge/core/engine/GameReferee.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package za.co.entelect.challenge.core.engine; | ||
|
||
public class GameReferee { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 10 additions & 2 deletions
12
.../core/src/main/java/za/co/entelect/challenge/core/entities/TowerDefenseJsonContainer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
package za.co.entelect.challenge.core.entities; | ||
|
||
import za.co.entelect.challenge.entities.Cell; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class TowerDefenseJsonContainer { | ||
|
||
protected GameDetails gameDetails; | ||
protected PlayerData[] players; | ||
protected CellStateContainer[][] gameMap; | ||
protected ArrayList<List<Cell>> teslaHitList; | ||
|
||
public TowerDefenseJsonContainer(CellStateContainer[][] gameMap, PlayerData[] players, int round){ | ||
gameDetails = new GameDetails(round); | ||
public TowerDefenseJsonContainer(CellStateContainer[][] gameMap, PlayerData[] players, int round, ArrayList<List<Cell>> teslaHitList) { | ||
this.gameDetails = new GameDetails(round); | ||
this.players = players; | ||
this.gameMap = gameMap; | ||
this.teslaHitList = teslaHitList; | ||
} | ||
} |
Oops, something went wrong.