@@ -0,0 +1,1326 @@
+package bwyap.familyfeud.game.fastmoney.state;%0A%0A/**%0A * This class is responsible for creating and initializing the game states within the Family Feud fast money phase.%0A * Each state should only be created once.%0A * @author bwyap%0A *%0A */%0Apublic class FFFastMoneyStateFactory %7B%0A%09%0A%09private static FFFastMoneyState p1Answer;%0A%09private static FFFastMoneyState p1Reveal;%0A%09private static FFFastMoneyState p2Answer;%0A%09private static FFFastMoneyState p2Reveal;%0A%0A%09/**%0A%09 * Get the FFPlayState object for the specified state.%0A%09 * A new state object is created if it has not already been created.%0A%09 * @param type%0A%09 * @return%0A%09 */%0A%09public static FFFastMoneyState getState(FFFastMoneyStateType type, Object data) %7B%0A%09%09switch(type) %7B%0A%09%09case P1_ANSWER:%0A%09%09%09if (p1Answer == null) createP1Answer();%0A%09%09%09return p1Answer;%0A%09%09case P1_REVEAL:%0A%09%09%09if (p1Reveal == null) createP1Reveal();%0A%09%09%09return p1Reveal;%0A%09%09case P2_ANSWER:%0A%09%09%09if (p2Answer == null) createP2Answer();%0A%09%09%09return p2Answer;%0A%09%09case P2_REVEAL:%0A%09%09%09if (p2Reveal == null) createP2Reveal();%0A%09%09%09return p2Reveal;%09%09%0A%09%09%7D%0A%09%09return null;%0A%09%7D%0A%09%0A%09// =================%0A%09// Create the states%0A%09// =================%0A%09%0A%09private static void createP1Answer() %7B%0A%09%09%0A%09%7D%0A%09%0A%09private static void createP1Reveal() %7B%0A%09%09%09%0A%09%7D%0A%09%0A%09private static void createP2Answer() %7B%0A%09%09%0A%09%7D%0A%09%0A%09private static void createP2Reveal() %7B%0A%09%09%0A%09%7D%0A%09%0A%7D%0A

Create FFFastMoneyStateFactory template