Skip to content

Commit

Permalink
Commit pre pull quinta release
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto-Negro committed Feb 23, 2024
1 parent b472be6 commit e88ebd8
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,39 @@ public void enterInTheGame(@Payload PlayerBody body, @DestinationVariable String
IGame game = null;
try {
game = GameRepository.getInstance().getCompletedGame(id);
Player player = Player.builder().userName(body.getUsername()).gameId(id).territories(new ArrayList<Territory>()).color(Player.PlayerColor.GREY).build();
Player player = Player.































().userName(body.getUsername()).gameId(id).territories(new ArrayList<Territory>()).color(Player.PlayerColor.GREY).build();
GameEntry action = GameEntry.builder().player(player).build();
GameRepository.getInstance().addPlayer(player);
game.onActionPlayer(action);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public synchronized void updateTerritoryOwner(String territoryName, Player playe
}
public synchronized void updateTerritoryArmies(String territoryName, String gameId, int armies) throws GameException {
db.updateTerritoryArmies(territoryName, gameId, armies);
}
}


//TurnDao
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mvcguru.risiko.maven.eclipse.states;
gotpackage com.mvcguru.risiko.maven.eclipse.states;

import java.io.IOException;
import java.io.Serializable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import org.junit.jupiter.api.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;

class GameStateTest {

@Mock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ void totalGameLogic() throws IOException, GameException, DatabaseConnectionExcep
TerritorySetup territorySetup3 = TerritorySetup.builder().player(player1).setUpBody(setUpBody3).build();
game.getState().onActionPlayer(territorySetup3);

assertEquals(game.getState().getClass().toString(), BattleState.class.toString());

}

Expand Down

0 comments on commit e88ebd8

Please sign in to comment.