Skip to content

Commit b426aa9

Browse files
committed
refactor(sdk): adjust some parameter names
1 parent b6b1780 commit b426aa9

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

sdk/src/server-api/sc/api/plugins/host/GameLoader.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package sc.api.plugins.host;
22

3-
import com.thoughtworks.xstream.XStream;
43
import org.slf4j.Logger;
54
import org.slf4j.LoggerFactory;
65
import sc.api.plugins.IGameState;
@@ -73,18 +72,18 @@ public void onGameError(String roomId, ProtocolErrorMessage error) {
7372
}
7473

7574
@Override
76-
public void onGameOver(String roomId, GameResult o) {
75+
public void onGameOver(String roomId, GameResult result) {
7776
this.finished = true;
7877
}
7978

8079
@Override
81-
public void onNewState(String roomId, IGameState o) {
80+
public void onNewState(String roomId, IGameState state) {
8281
logger.debug("Received new state");
8382
if (!this.finished) {
8483
for (Class<?> clazz : this.clazzes) {
85-
if (clazz.isInstance(o)) {
84+
if (clazz.isInstance(state)) {
8685
logger.debug("Received game info of type {}", clazz.getName());
87-
this.obj = clazz.cast(o);
86+
this.obj = clazz.cast(state);
8887
this.finished = true;
8988
this.client.stop();
9089
}

sdk/src/server-api/sc/framework/HelperMethods.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package sc.framework;
22

3-
import org.slf4j.Logger;
4-
import org.slf4j.LoggerFactory;
53
import sc.shared.SlotDescriptor;
64

75
import java.text.DateFormat;
@@ -11,10 +9,8 @@
119

1210
public class HelperMethods {
1311

14-
private static final Logger logger = LoggerFactory.getLogger(HelperMethods.class);
15-
16-
private static final DateFormat dateTimeFormat = new SimpleDateFormat(
17-
"yyyy.MM.dd HH_mm_ss");
12+
private static final DateFormat dateTimeFormat =
13+
new SimpleDateFormat("yyyy.MM.dd HH_mm_ss");
1814

1915
/**
2016
* Returns the current date and time as string formatted as yyyy.MM.dd
@@ -45,7 +41,6 @@ public static String generateReplayFilename(String pluginUuid, List<SlotDescript
4541
replayFileName.append("_");
4642
replayFileName.append(HelperMethods.getCurrentDateTime().replace(' ', '_'));
4743
replayFileName.append(".xml");
48-
logger.debug("Generated file name {}", replayFileName.toString());
4944
return replayFileName.toString();
5045
}
5146

0 commit comments

Comments
 (0)