Package edu.wisc.game.web
Class LaunchRulesBase
java.lang.Object
edu.wisc.game.web.ResultsBase
edu.wisc.game.web.LaunchRulesBase
- Direct Known Subclasses:
LaunchMain
,LaunchRules
The common base for the Launch pages that allows one to play all
rule sets from rules/APP, rules/MLC, and others. As requested by Paul on
2021-10-12 and 2021-10-13.
The M need not provide bonuses, and can use the standard 4 colors and shapes. I'd suggest either 5 to 8 pieces (a random number). People should be able to give up even at the first screen, if that is supported.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The list of rule sets to be displayed in the Android appstatic enum
The name refers to the directory from whih trial lists or rule sets are readstatic class
An auxiliary class that can be used to transmit information about the buttons etc the Android app needs to display -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HashMap<String,
Vector<PlayerInfo>> All PlayerInfo objects associated with this repeat userprotected boolean
This will be set to true in the MLC page (LaunchMain), to guaranteeFields inherited from class edu.wisc.game.web.ResultsBase
displayName, infomsg, uid
-
Constructor Summary
ConstructorsConstructorDescriptionLaunchRulesBase
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
buildTable
(String[] modsShort, String[] modsLong, String[] hm, LaunchRulesBase.Mode z, String chosenRuleSet) Builds Part A and Part B tablesprotected String
describeTrialList
(TrialList t, HashSet<String> knownRuleSetNames) Creates a description of a trial list, consisting of the descriptions of all rule sets in the list.protected String
Creates a table cell for a given P: or R: plan, with a "PLAY!" button and information about any previous rounds.protected String
Methods inherited from class edu.wisc.game.web.ResultsBase
exceptionTrace, getDisplayText, getErrmsg, getError, getEx, giveError, giveError, loggedIn, setErrmsg, setError
-
Field Details
-
allPlayers
All PlayerInfo objects associated with this repeat user -
tableText
-
mustUseDevClient
protected boolean mustUseDevClientThis will be set to true in the MLC page (LaunchMain), to guarantee
-
-
Constructor Details
-
LaunchRulesBase
public LaunchRulesBase(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
-
-
Method Details
-
mkForm
-
mkCell
Creates a table cell for a given P: or R: plan, with a "PLAY!" button and information about any previous rounds.- Parameters:
exp
- The experiment plan the button(s) for which we are creatingri
- Also add the necessary info to this structure
-
describeTrialList
Creates a description of a trial list, consisting of the descriptions of all rule sets in the list.- Parameters:
knownRuleSetNames
- The method will add all encountered rule set names to this set.- Throws:
Exception
-
buildTable
protected void buildTable(String[] modsShort, String[] modsLong, String[] hm, LaunchRulesBase.Mode z, String chosenRuleSet) Builds Part A and Part B tables- Parameters:
modsShort
- Modifiers for Part A. If null, skip this partmodsLong
- Modifiers for Part B. If null, skip this part.z
- "APP" or "MLC". This is the name of the directory (under the main rule set directory) in which to look for the rule set files.chosenRuleSet
- If not null, we just show this rule set in Part B table
-