Package ball.riddler538.ant.taskdefs
Class SolveExpress20171222Task
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- ball.riddler538.ant.taskdefs.AbstractTask
-
- ball.riddler538.ant.taskdefs.SolveExpress20171222Task
-
- All Implemented Interfaces:
AnnotatedAntTask,AntTaskLogMethods,AntTaskMixIn,ClasspathDelegateAntTask,ConfigurableAntTask,Cloneable
@AntTask("solve-express-2017-12-22") public class SolveExpress20171222Task extends AbstractTask
AntTaskto solve Riddler ExpressFrom Jeffrey Hope, open up your junk drawer and pull out those decks of cards:
Your challenge is to take any 50 cards from a standard 52-card deck and arrange them into 10 poker hands, one of each type from a royal flush down to a lowly high card.2 The hands you build always rank as the highest type of hand possible,3 and a card may not be reused across the hands. (This means, for example, that a four-of-a-kind better than four nines is impossible because it’d use a card you’d need to make a royal flush.) As in actual poker, it doesn’t matter what order the cards are arranged within a hand.
Sounds easy enough, and indeed there is more than one solution. But: Exactly how many solutions are there?
<solve-express-2017-12-22 classname="String" classpathref="Reference" description="String" taskname="String"> <classpath .../> </solve-express-2017-12-22>
Ranking Hand ---------------------------------------- RoyalFlush [A-♤, K-♤, Q-♤, J-♤, 10-♤] StraightFlush [K-♡, Q-♡, J-♡, 10-♡, 9-♡] FourOfAKind [8-♤, 8-♡, 8-♢, 8-♧, J-♧] FullHouse [A-♡, A-♢, A-♧, K-♢, K-♧] Flush [Q-♢, J-♢, 10-♢, 9-♢, 7-♢] Straight [7-♤, 6-♤, 5-♤, 4-♤, 3-♤] ThreeOfAKind [6-♡, 6-♢, 6-♧, 10-♧, 5-♧] TwoPair [9-♤, 9-♧, 7-♡, 7-♧, 4-♡] Pair [5-♡, 5-♢, 4-♢, 4-♧, 3-♡] HighCard [Q-♧, 3-♢, 3-♧, 2-♤, 2-♡] Remaining [2-♢, 2-♧]
- Author:
- Allen D. Ball
-
-
Field Summary
-
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
-
Constructor Summary
Constructors Constructor Description SolveExpress20171222Task()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()-
Methods inherited from class ball.riddler538.ant.taskdefs.AbstractTask
init
-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ball.util.ant.taskdefs.AnnotatedAntTask
getAntTaskName
-
Methods inherited from interface ball.util.ant.taskdefs.AntTaskLogMethods
log, log, log, log, log, log, log, log, log, log, log
-
Methods inherited from interface ball.util.ant.taskdefs.ClasspathDelegateAntTask
createClasspath, delegate, delegate, getClassForName, getClassLoader, setClassname, setClasspathref
-
Methods inherited from interface ball.util.ant.taskdefs.ConfigurableAntTask
configure
-
-
-
-
Constructor Detail
-
SolveExpress20171222Task
public SolveExpress20171222Task()
-
-
Method Detail
-
execute
public void execute() throws BuildException
- Specified by:
executein interfaceAnnotatedAntTask- Overrides:
executein classAbstractTask- Throws:
BuildException
-
-