Class LaunchRulesBase

java.lang.Object
edu.wisc.game.web.ResultsBase
edu.wisc.game.web.LaunchRulesBase
Direct Known Subclasses:
LaunchMain, LaunchRules

public class LaunchRulesBase
extends ResultsBase
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.
  • Field Details

  • Constructor Details

    • LaunchRulesBase

      public LaunchRulesBase​(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
  • Method Details

    • mkForm

      protected String mkForm​(String text1, String text2, String exp, String pid, String buttonText)
    • mkCell

      protected String mkCell​(String exp)
      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 creating
      ri - Also add the necessary info to this structure
    • describeTrialList

      protected String describeTrialList​(TrialList t, HashSet<String> knownRuleSetNames) throws Exception
      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:
      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.
      modsShort - Modifiers for Part A. If null, skip this part
      modsLong - Modifiers for Part B. If null, skip this part.
      chosenRuleSet - If not null, we just show this rule set in Part B table