forked from External/mage
Fixed some bugs in table handling. Fixed that matches were not set to finished yet, if players left match during sideboarding phase.
This commit is contained in:
parent
df9c200753
commit
40c25fae34
25 changed files with 274 additions and 140 deletions
|
|
@ -51,11 +51,19 @@ public class Config {
|
|||
remoteServer = p.getProperty("remote-server");
|
||||
maxGameThreads = Integer.parseInt(p.getProperty("max-game-threads"));
|
||||
maxSecondsIdle = Integer.parseInt(p.getProperty("max-seconds-idle"));
|
||||
minUserNameLength = Integer.parseInt(p.getProperty("minUserNameLength"));
|
||||
maxUserNameLength = Integer.parseInt(p.getProperty("maxUserNameLength"));
|
||||
userNamePattern = p.getProperty("userNamePattern");
|
||||
saveGameActivated = Boolean.parseBoolean(p.getProperty("saveGameActivated"));
|
||||
}
|
||||
|
||||
public static final String remoteServer;
|
||||
public static final int port;
|
||||
public static final int maxGameThreads;
|
||||
public static final int maxSecondsIdle;
|
||||
public static final int minUserNameLength;
|
||||
public static final int maxUserNameLength;
|
||||
public static final String userNamePattern;
|
||||
public static final boolean saveGameActivated;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
<xs:attribute name="minUserNameLength" type="xs:positiveInteger" use="required"/>
|
||||
<xs:attribute name="maxUserNameLength" type="xs:positiveInteger" use="required"/>
|
||||
<xs:attribute name="userNamePattern" type="xs:string" use="required"/>
|
||||
<xs:attribute name="maxAiOpponents" type="xs:string" use="optional"/>
|
||||
<xs:attribute name="saveGameActivated" type="xs:boolean" use="optional"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,10 @@ public class ConfigSettings {
|
|||
return config.getServer().getMaxAiOpponents();
|
||||
}
|
||||
|
||||
public Boolean isSaveGameActivated() {
|
||||
return config.getServer().isSaveGameActivated();
|
||||
}
|
||||
|
||||
public List<Plugin> getPlayerTypes() {
|
||||
return config.getPlayerTypes().getPlayerType();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Config.xsd">
|
||||
<server serverAddress="0.0.0.0" serverName="mage-server" port="17171" maxGameThreads="10" maxSecondsIdle="600" minUserNameLength="3" maxUserNameLength="14" userNamePattern="[^a-z0-9_]"/>
|
||||
<server serverAddress="0.0.0.0" serverName="mage-server" port="17171" maxGameThreads="10"
|
||||
maxSecondsIdle="600"
|
||||
minUserNameLength="3"
|
||||
maxUserNameLength="14"
|
||||
userNamePattern="[^a-z0-9_]"
|
||||
saveGameActivated="true"
|
||||
maxAiOpponents="15"
|
||||
saveGameActivated="false"
|
||||
/>
|
||||
<playerTypes>
|
||||
<playerType name="Human" jar="Mage.Player.Human.jar" className="mage.player.human.HumanPlayer"/>
|
||||
<playerType name="Computer - default" jar="Mage.Player.AI.jar" className="mage.player.ai.ComputerPlayer"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue