Minor changes to readme.md. Some minor formatiing.

This commit is contained in:
LevelX2 2014-03-02 21:58:13 +01:00
parent db1278b6f2
commit dc73d85cd0
6 changed files with 37 additions and 34 deletions

View file

@ -71,8 +71,8 @@ public class NewTournamentDialog extends MageDialog {
private UUID playerId;
private UUID roomId;
private Session session;
private List<TournamentPlayerPanel> players = new ArrayList<TournamentPlayerPanel>();
private List<JComboBox> packs = new ArrayList<JComboBox>();
private final List<TournamentPlayerPanel> players = new ArrayList<>();
private final List<JComboBox> packs = new ArrayList<>();
/** Creates new form NewTournamentDialog */
public NewTournamentDialog() {
@ -710,16 +710,19 @@ public class NewTournamentDialog extends MageDialog {
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_TYPE, tOptions.getTournamentType());
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_NUMBER_OF_FREE_MULLIGANS, Integer.toString(tOptions.getMatchOptions().getFreeMulligans()));
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_NUMBER_OF_WINS, Integer.toString(tOptions.getMatchOptions().getWinsNeeded()));
if (tOptions.getTournamentType().equals("Sealed Elimination")) {
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PACKS_SEALED, tOptions.getLimitedOptions().getSetCodes().toString());
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLAYERS_SEALED, Integer.toString(tOptions.getPlayerTypes().size()));
} else if (tOptions.getTournamentType().equals("Elimination Booster Draft")) {
DraftOptions draftOptions = (DraftOptions) tOptions.getLimitedOptions();
if (draftOptions != null) {
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PACKS_DRAFT, draftOptions.getSetCodes().toString());
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLAYERS_DRAFT, Integer.toString(tOptions.getPlayerTypes().size()));
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_DRAFT_TIMING, draftOptions.getTiming().name());
}
switch (tOptions.getTournamentType()) {
case "Sealed Elimination":
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PACKS_SEALED, tOptions.getLimitedOptions().getSetCodes().toString());
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLAYERS_SEALED, Integer.toString(tOptions.getPlayerTypes().size()));
break;
case "Elimination Booster Draft":
DraftOptions draftOptions = (DraftOptions) tOptions.getLimitedOptions();
if (draftOptions != null) {
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PACKS_DRAFT, draftOptions.getSetCodes().toString());
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLAYERS_DRAFT, Integer.toString(tOptions.getPlayerTypes().size()));
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_DRAFT_TIMING, draftOptions.getTiming().name());
}
break;
}
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_ALLOW_SPECTATORS, (tOptions.isWatchingAllowed()?"Yes":"No"));

View file

@ -56,8 +56,8 @@ import mage.cards.MagePermanent;
import mage.client.cards.BigCard;
import mage.client.cards.Permanent;
import mage.client.plugins.impl.Plugins;
import mage.client.util.audio.AudioManager;
import mage.client.util.Config;
import mage.client.util.audio.AudioManager;
import mage.constants.CardType;
import mage.view.PermanentView;

View file

@ -40,13 +40,13 @@ import mage.view.TournamentTypeView;
*/
public class ServerState implements Serializable {
private List<GameTypeView> gameTypes;
private List<TournamentTypeView> tournamentTypes;
private String[] playerTypes;
private String[] deckTypes;
private String[] draftCubes;
private boolean testMode;
private MageVersion version;
private final List<GameTypeView> gameTypes;
private final List<TournamentTypeView> tournamentTypes;
private final String[] playerTypes;
private final String[] deckTypes;
private final String[] draftCubes;
private final boolean testMode;
private final MageVersion version;
public ServerState(List<GameTypeView> gameTypes, List<TournamentTypeView> tournamentTypes, String[] playerTypes, String[] deckTypes, String[] draftCubes, boolean testMode, MageVersion version) {
this.gameTypes = gameTypes;

View file

@ -50,9 +50,9 @@ public class TournamentFactory {
private static final TournamentFactory INSTANCE = new TournamentFactory();
private static final Logger logger = Logger.getLogger(TournamentFactory.class);
private Map<String, Class<Tournament>> tournaments = new HashMap<String, Class<Tournament>>();
private Map<String, TournamentType> tournamentTypes = new HashMap<String, TournamentType>();
private List<TournamentTypeView> tournamentTypeViews = new ArrayList<TournamentTypeView>();
private final Map<String, Class<Tournament>> tournaments = new HashMap<>();
private final Map<String, TournamentType> tournamentTypes = new HashMap<>();
private final List<TournamentTypeView> tournamentTypeViews = new ArrayList<>();
public static TournamentFactory getInstance() {
return INSTANCE;
@ -69,7 +69,7 @@ public class TournamentFactory {
tournament = con.newInstance(new Object[] {options});
// transfer set information, create short info string for included sets
tournament.setTournamentType(tournamentTypes.get(tournamentType));
Map<String,Integer> setInfo = new LinkedHashMap<String,Integer>();
Map<String,Integer> setInfo = new LinkedHashMap<>();
for (String setCode: options.getLimitedOptions().getSetCodes()) {
tournament.getSets().add(Sets.findSet(setCode));
int count = setInfo.containsKey(setCode) ? setInfo.get(setCode) : 0;

View file

@ -65,7 +65,7 @@ public class Updater {
* @throws Exception
*/
public HashMap<String, String> readLocalData() throws Exception {
HashMap<String, String> result = new HashMap<String, String>();
HashMap<String, String> result = new HashMap<>();
for (File f : findFiles()) {
result.put(f.getPath().replaceAll("\\\\", "/"), ChechsumHelper.getSHA1Checksum(f.getPath()));
}
@ -79,7 +79,7 @@ public class Updater {
* @throws Exception
*/
public List<File> findFiles() throws Exception {
ArrayList<File> result = new ArrayList<File>();
ArrayList<File> result = new ArrayList<>();
result.addAll(FileHelper.findAllFilesInDir("mage-client/lib"));
result.addAll(FileHelper.findAllFilesInDir("mage-client/plugins"));
result.addAll(FileHelper.findAllFilesInDir("mage-server/lib"));
@ -95,7 +95,7 @@ public class Updater {
* @throws Exception
*/
public HashMap<String, String> downloadAndParseUpdateData() throws Exception {
HashMap<String, String> result = new HashMap<String, String>();
HashMap<String, String> result = new HashMap<>();
URL url = new URL(URL_PREFIX + "update-data.txt");
URLConnection urlConnection = url.openConnection();
urlConnection.connect();
@ -104,7 +104,7 @@ public class Updater {
String[] lines = scanner.nextLine().split(" ");
if (lines.length == 2) {
result.put(lines[1], lines[0]);
//System.out.println("jar " + lines[1] + ", checksum " + lines[0]);
System.out.println("jar " + lines[1] + ", checksum " + lines[0]);
}
}
return result;
@ -120,7 +120,7 @@ public class Updater {
* @return List of files to be replaced with newer versions.
*/
public List<String> findUpdated(HashMap<String, String> local, HashMap<String, String> remote) {
ArrayList<String> result = new ArrayList<String>();
ArrayList<String> result = new ArrayList<>();
for (String remoteFile : remote.keySet()) {
if (local.containsKey(remoteFile)) {
if (!local.get(remoteFile).equals(remote.get(remoteFile))) {
@ -133,7 +133,7 @@ public class Updater {
}
public List<String> findNew(HashMap<String, String> local, HashMap<String, String> remote) {
ArrayList<String> result = new ArrayList<String>();
ArrayList<String> result = new ArrayList<>();
for (String remoteFile : remote.keySet()) {
if (!local.containsKey(remoteFile)) {
//System.out.println("new jar found - " + remoteFile);
@ -152,7 +152,7 @@ public class Updater {
* @return List of files to be removed.
*/
public List<String> findRemoved(HashMap<String, String> local, HashMap<String, String> remote) {
ArrayList<String> result = new ArrayList<String>();
ArrayList<String> result = new ArrayList<>();
for (String localFile : local.keySet()) {
if (!remote.containsKey(localFile)) {
//System.out.println("deleted jar found - " + localFile);

View file

@ -1,6 +1,6 @@
# MAGE - Magic, Another Game Engine
MAGE allows you to play magic against one or more online players or computer opponents. It includes full rules enforcement for **7210** unique cards (12178 in all). Starting with Eventide, all regular sets have all the cards implemented ([status in detail](http://ct-magefree.rhcloud.com/stats)).
MAGE allows you to play magic against one or more online players or computer opponents. It includes full rules enforcement for **7,750** unique cards (13,100 in all). Starting with Eventide, all regular sets have nearly all the cards implemented ([status in detail](http://ct-magefree.rhcloud.com/stats)).
There is at least one public server where you can play MAGE against other players. Apart from this, you can also host your own server to play against the AI and/or your friends.
@ -17,9 +17,9 @@ You can visit the official MAGE forum [here](http://www.slightlymagic.net/forum/
## Installation
Download the latest release from [here](http://download.magefree.com). You need this to be able to play on the official server.
After you extract the contents of the arhive, you will find batch files to start the client/server in the corresponding directories. See the included readme files for more instructions.
After you extract the content of the archive, you will find batch files to start the client/server in the corresponding directories. See the included readme files for more instructions.
You will need to have the [Java Runtime Environment](http://java.com/en/) Version 6 Update 24 or greater.
You will need to have the [Java Runtime Environment](http://java.com/en/) Version 7.
Here you can find a log of the latest changes: [Release changes] (http://github.com/magefree/mage/wiki/Release-changes)