Skip to content

Commit

Permalink
Merge pull request #7 from alyssaruth/logger-4
Browse files Browse the repository at this point in the history
Logger 4
  • Loading branch information
alyssaruth authored Dec 7, 2023
2 parents f2cb16e + aab25c2 commit a00c075
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 530 deletions.
1 change: 0 additions & 1 deletion client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ plugins {
dependencies {
implementation("com.jgoodies:jgoodies-forms:1.6.0")
implementation("com.miglayout:miglayout-swing:5.2")
implementation("javax.mail:javax.mail-api:1.6.2")
implementation(project(":core"))
}

Expand Down
32 changes: 0 additions & 32 deletions client/src/main/java/object/EntropyClientDebugExtension.java

This file was deleted.

9 changes: 1 addition & 8 deletions client/src/main/java/online/util/DesktopEntropyClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,14 @@
import online.screen.ConnectingDialog;
import online.screen.EntropyLobby;
import screen.ScreenCache;
import util.AbstractDesktopClient;
import util.ClientEmailer;
import util.DialogUtil;
import util.MessageSender;
import util.MessageSenderParams;
import util.UpdateChecker;
import util.*;

public class DesktopEntropyClient extends AbstractDesktopClient
{
@Override
public void init()
{
super.init();

ClientEmailer.setObfuscationVersion(ENTROPY_VERSION_NUMBER);
}

@Override
Expand Down
13 changes: 1 addition & 12 deletions client/src/main/java/screen/BugReportDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,7 @@ private boolean valid()

private void sendReport()
{
String description = "BUG REPORT: " + descriptionField.getText();
String replication = textPaneReplicationSteps.getText();

if (Debug.sendBugReport(description, replication))
{
DialogUtil.showInfo("Bug report submitted.");
dispose();
}
else
{
DialogUtil.showInfo("Unable to send bug report. Please check your internet connection and try again.");
}
DialogUtil.showError("This feature is not yet implemented.");
}

@Override
Expand Down
6 changes: 1 addition & 5 deletions client/src/main/java/screen/MainScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -682,11 +682,7 @@ public String processCommand(String command)
}
}

if (command.equals("sendlogs"))
{
Debug.sendContentsAsEmailInSeparateThread("Manual logs (" + OnlineConstants.ENTROPY_VERSION_NUMBER + ")", true, null);
}
else if (command.equals("simulator"))
if (command.equals("simulator"))
{
SimulationDialog dialog = ScreenCache.getSimulationDialog();
dialog.initVariables();
Expand Down
4 changes: 0 additions & 4 deletions client/src/main/java/util/AbstractDesktopClient.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package util;

import javax.swing.JOptionPane;

public abstract class AbstractDesktopClient extends AbstractClient
implements CoreRegistry
{
Expand All @@ -10,7 +8,5 @@ public void init()
{
EncryptionUtil.setBase64Interface(new Base64Desktop());
MessageUtil.generatePublicKey();

ClientEmailer.tryToSendUnsentLogs();
}
}
198 changes: 0 additions & 198 deletions client/src/main/java/util/ClientEmailer.java

This file was deleted.

13 changes: 4 additions & 9 deletions client/src/main/java/util/CpuStrategies.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package util;

import object.*;

import java.util.ArrayList;
import java.util.Random;
import java.util.Vector;

import object.ApiStrategy;
import object.Bid;
import object.EntropyBid;
import object.Player;
import object.VectropyBid;
import static utils.InjectedThings.logger;

public class CpuStrategies
{
Expand Down Expand Up @@ -86,13 +84,10 @@ public static Bid processOpponentTurn(StrategyParms parms, Player opponent)
String strategyStr = opponent.getStrategy();
ApiUtil.saveStrategyErrorAndUnsetStrategies(ApiUtil.getApiStrategy(strategyStr), msg);
DialogUtil.showError(msg);
Debug.append("API bid failed validation: " + error);
}
else
{
Debug.stackTrace("Error validating bid: " + error);
Debug.append("Bid was " + bid);
Debug.append("Strategy: " + opponent.getStrategy());
logger.error("invalidBid", "Error validating bid [" + bid + "]. Error: " + error);
}

return null;
Expand Down
Loading

0 comments on commit a00c075

Please sign in to comment.