mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
* Added a simple skill level to set and filter for tables.
This commit is contained in:
parent
e3cb007848
commit
69b381779b
13 changed files with 462 additions and 177 deletions
|
|
@ -9,7 +9,7 @@ public enum MultiplayerAttackOption {
|
|||
LEFT("Attack Left"),
|
||||
RIGHT("Attack Right");
|
||||
|
||||
private String text;
|
||||
private final String text;
|
||||
|
||||
MultiplayerAttackOption(String text) {
|
||||
this.text = text;
|
||||
|
|
|
|||
51
Mage/src/mage/constants/SkillLevel.java
Normal file
51
Mage/src/mage/constants/SkillLevel.java
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.constants;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public enum SkillLevel {
|
||||
BEGINNER ("Beginner"),
|
||||
CASUAL("Casual"),
|
||||
SERIOUS ("Serious");
|
||||
|
||||
private final String text;
|
||||
|
||||
SkillLevel(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return text;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -34,6 +34,7 @@ import java.util.List;
|
|||
import mage.constants.MatchTimeLimit;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
import mage.constants.SkillLevel;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -51,6 +52,7 @@ public class MatchOptions implements Serializable {
|
|||
protected boolean limited;
|
||||
protected List<String> playerTypes = new ArrayList<>();
|
||||
protected String password;
|
||||
protected SkillLevel skillLevel;
|
||||
|
||||
/**
|
||||
* Time each player has during the game to play using his\her priority.
|
||||
|
|
@ -134,7 +136,6 @@ public class MatchOptions implements Serializable {
|
|||
return matchTimeLimit.getTimeLimit();
|
||||
}
|
||||
|
||||
|
||||
public MatchTimeLimit getMatchTimeLimit() {
|
||||
return this.matchTimeLimit;
|
||||
}
|
||||
|
|
@ -151,4 +152,11 @@ public class MatchOptions implements Serializable {
|
|||
this.password = password;
|
||||
}
|
||||
|
||||
public SkillLevel getSkillLevel() {
|
||||
return skillLevel;
|
||||
}
|
||||
|
||||
public void setSkillLevel(SkillLevel skillLevel) {
|
||||
this.skillLevel = skillLevel;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.game.tournament;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue