Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
Merge branch 'experimental' of https://github.com/inf112-v19/Sky7 int…
Browse files Browse the repository at this point in the history
…o experimental
  • Loading branch information
Carl August Gjørsvik authored and Carl August Gjørsvik committed May 3, 2019
2 parents 3fcce2c + c8fad89 commit 0a42395
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 34 deletions.
2 changes: 1 addition & 1 deletion src/main/java/sky7/Client/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

public class Client implements IClient {

private IBoard board; //TODO double check the code, might contain problems.
private IBoard board;
private IHost host;
private IPlayer player;
private STATE state;
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/sky7/board/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,6 @@ public Vector2 getDestination(Vector2 pos, DIRECTION dir, int distance) {
@Override
public void hideRobot(int player) {
Vector2 pos = robotPos[player];
//deadRobots[player] = robots[player];
//robots[player] = null;
//deadRobotPos[player] = robotPos[player];
//robotPos[player] = null;

for (ICell item : grid[(int) pos.x][(int) pos.y]) {
if (item instanceof RobotTile) {
grid[(int) pos.x][(int) pos.y].remove(item);
Expand Down Expand Up @@ -496,7 +491,6 @@ private boolean canConvoPush(Vector2 curCoords, DIRECTION to, boolean onlyExpres
*
*/

// todo: might putting this in a method
boolean foundBelt = false;
Belt belt = null;
boolean foundRobo = false;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/sky7/board/cellContents/Active/Belt.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public Texture getTexture() {
}
texture = new Texture(path);
}
return texture; //TODO: add Belt Texture
return texture;
}

@Override
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/sky7/card/ProgramCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ public ProgramCard(int priority, int move, int rotate) {
moveType = false;
}

public ProgramCard() {
}

@Override
public int priorityN() {
return priority;
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/sky7/gui/TextInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,4 @@ public void input (String text) {
@Override
public void canceled () {
}

public String getinput() {
return input;
}
}
10 changes: 1 addition & 9 deletions src/main/java/sky7/host/Host.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ public void setBoardName(String boardName) {

// FIELD VARIABLES --------------
private String boardName = "assets/Boards/VaultAssault.json";
// TODO MAX_N_PLAYERS should be set based on board.
private int MAX_N_PLAYERS = 8, nPlayers = 0, readyPlayers = 0, nRemotePlayers = 0, winner = -1;
private int nFlagsOnBoard = 4; // TODO should be set based on loaded board
private int nFlagsOnBoard = 4;
private boolean terminated = false, processingFinished = false;
private HOST_STATE nextState = HOST_STATE.BEGIN;
private HOST_STATE currentState = HOST_STATE.BEGIN;
Expand All @@ -46,7 +45,6 @@ public void setBoardName(String boardName) {
private IDeck pDeck;
private Game game;

// TODO host must know where each player can respawn.(?) Or should that be handled locally in game engine?

// CONSTRUCTORS -------------

Expand Down Expand Up @@ -292,7 +290,6 @@ private void runWAIT_FOR_PROCESSING() {
* Game is finished
*/
private void runFINISHED() {
// TODO if there is something to do when game is finished
terminated = true;
}

Expand Down Expand Up @@ -459,11 +456,6 @@ public void powerDownRepair(boolean[] currentPD) {

@Override
public boolean loseLifeToken(int playerID) {
// TODO what happens at lose of life-token
// Check if game over
// if so, do not ask for registry
// send game update until game is won or everybody loses.
// host must continue to host until match is won or everybody loses.

if(!gameOver[playerID]){
gameOver[playerID] = --lifeTokens[playerID]<=0;
Expand Down
10 changes: 0 additions & 10 deletions src/main/java/sky7/player/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ public void applyDamage(int applyDamage) {
if (damage > 4) {
nLocked = damage - 4;
}

// TODO if health reaches 0, consume a life token and respawn
}

@Override
Expand All @@ -66,14 +64,6 @@ public void repairDamage(int applyHealth) {

}

/* @Override
public void repair(int repairDamage) {
updateDamage(damage-repairDamage);
if (damage > 4) {
nLocked = damage-4;
} else nLocked = 0;
}*/

@Override
public void updateDamage(int totalDamage) {
Expand Down

0 comments on commit 0a42395

Please sign in to comment.