-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
201 changed files
with
4,225 additions
and
1,494 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
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
36 changes: 36 additions & 0 deletions
36
cardshifter-api/src/main/java/com/cardshifter/api/both/PlayerConfigMessage.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,36 @@ | ||
package com.cardshifter.api.both; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import com.cardshifter.api.messages.Message; | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo; | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo.As; | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; | ||
|
||
public class PlayerConfigMessage extends Message { | ||
|
||
@JsonTypeInfo(include = As.PROPERTY, use = Id.NAME, property = "_type") | ||
private final Map<String, Object> configs; | ||
|
||
private final int gameId; | ||
|
||
PlayerConfigMessage() { | ||
this(0, null); | ||
} | ||
|
||
public PlayerConfigMessage(int gameId, Map<String, Object> configs) { | ||
super("playerconfig"); | ||
this.gameId = gameId; | ||
this.configs = configs; | ||
} | ||
|
||
public Map<String, Object> getConfigs() { | ||
return new HashMap<>(configs); | ||
} | ||
|
||
public int getGameId() { | ||
return gameId; | ||
} | ||
|
||
} |
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
23 changes: 23 additions & 0 deletions
23
cardshifter-api/src/main/java/com/cardshifter/api/outgoing/AvailableModsMessage.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,23 @@ | ||
package com.cardshifter.api.outgoing; | ||
|
||
import java.util.Arrays; | ||
|
||
import com.cardshifter.api.messages.Message; | ||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class AvailableModsMessage extends Message { | ||
|
||
private final String[] mods; | ||
|
||
@JsonCreator | ||
public AvailableModsMessage(@JsonProperty("mods") String[] mods) { | ||
super("availableMods"); | ||
this.mods = Arrays.copyOf(mods, mods.length); | ||
} | ||
|
||
public String[] getMods() { | ||
return Arrays.copyOf(mods, mods.length); | ||
} | ||
|
||
} |
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
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
8 changes: 0 additions & 8 deletions
8
cardshifter-core/src/main/java/com/cardshifter/ai/CardshifterAI.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.