Methods Summary |
---|
public int | getAttempts()
return attempts;
|
public java.lang.String | getColor1()
return foreground;
|
public java.lang.String | getColor2()
return background;
|
public boolean | getHint()
return hint.equalsIgnoreCase("Hint");
|
public boolean | getHintTaken()
return tookHints;
|
public int | getIntval()
return intval;
|
public boolean | getSuccess()
if (background.equalsIgnoreCase("black") ||
background.equalsIgnoreCase("cyan")) {
if (foreground.equalsIgnoreCase("black") ||
foreground.equalsIgnoreCase("cyan"))
return true;
else
return false;
}
return false;
|
public void | processRequest(javax.servlet.http.HttpServletRequest request)
// background = "yellow";
// foreground = "red";
if (! color1.equals(foreground)) {
if (color1.equalsIgnoreCase("black") ||
color1.equalsIgnoreCase("cyan")) {
background = color1;
}
}
if (! color2.equals(background)) {
if (color2.equalsIgnoreCase("black") ||
color2.equalsIgnoreCase("cyan")) {
foreground = color2;
}
}
attempts++;
|
public void | reset()
foreground = "red";
background = "yellow";
|
public void | setAction(java.lang.String x)
if (!tookHints)
tookHints = x.equalsIgnoreCase("Hint");
hint = x;
|
public void | setColor1(java.lang.String x)
color1 = x;
|
public void | setColor2(java.lang.String x)
color2 = x;
|
public void | setIntval(int value)
intval = value;
|