Examples of CalcEngineProphesier


Examples of edu.villanova.studs.poker.calcengine.CalcEngineProphesier

   
    public CalcEngineProphesierTest(String sTestName) {
        super(sTestName);

        td = new TableDataCommunity();
        proph = new CalcEngineProphesier();
        cards = new ArrayList<Card>();
        p = new Player();
    }
View Full Code Here

Examples of edu.villanova.studs.poker.calcengine.CalcEngineProphesier

            p = new Player();
            p.addCard( new Card(3,3) );
            p.addCard( new Card(4,4) );
            td.addPlayer( p );
            p = new Player();
            proph = new CalcEngineProphesier();
            proph.setOtherOptions( opts );
            proph.setGameData(td);
           
            proph.getCalculationResults();
           
View Full Code Here

Examples of edu.villanova.studs.poker.calcengine.CalcEngineProphesier

            assertTrue("Unexpected Error Message for English single-player failure", e.getLocalizedMessage().equals( "ERROR: Calculating hand results failed while Running individual player simulations<br>CAUSE: " + e.getCause() ) );
        }   
    }
   
    private void doGermanExecuteTests() {
        proph = new CalcEngineProphesier();
        Hashtable<String, Object> opts = new Hashtable<String, Object>();
        //Multi-player simulation failure
        try {
            //Create an invalid # of simulations in the options
            opts.put( CalcEngineFactory.ENGINE_PROPH_SIMS, 0 );
            td.setOptions(opts);
           
            //add 2 players to the game
            td.clearPlayers();
            p = new Player();
            p.addCard( new Card(3,3) );
            p.addCard( new Card(4,4) );
            td.addPlayer( p );
            p = new Player();
            p.addCard( new Card(1,2) );
            p.addCard( new Card(4,3) );
            td.addPlayer( p );
           
            //setup the table data so configuration will pass (execution will fail with dup card on the table)           
            Table t = new Table();
           
            td.setGameTable( t );
           
            proph.setOtherOptions( opts );
            proph.setGameData(td);
           
            proph.getCalculationResults();
           
        } catch (TransportException e) {
            fail( "An unexpeced error occured while setting up the German GetCalculationResults multi-player Test: " + e.getMessage() );
        } catch (CalcEngineException e ) {
            //Test overriden version of getLocalizedMessage()
            assertTrue("Unexpected Error Message for German multi-player failure", e.getLocalizedMessage().equals( "FEHLER: Berechnung der Ergebnisse konnte nicht w�hrend Ausf�hren von Multi-Player-Simulationen<br>URSACHE: " + e.getCause() ) );
        }
       
        //Single-player simulation failure
        try {
            //Create a valid # of simulations in the options
            opts.put( CalcEngineFactory.ENGINE_PROPH_SIMS, 10000 );
            td.setOptions(opts);
           
            //add only 1 player to the game - will cause single player failure
            td.clearPlayers();
            p = new Player();
            p.addCard( new Card(3,3) );
            p.addCard( new Card(4,4) );
            td.addPlayer( p );
            p = new Player();
            proph = new CalcEngineProphesier();
            proph.setOtherOptions( opts );
            proph.setGameData(td);
           
            proph.getCalculationResults();
           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.