Package poker_game

Examples of poker_game.PlayerMove


  }
  
  @Test
  public void testSetChipForPairsPlus(){
    state.initialize();
    PlayerMove move=new PlayerMove();
    move.setPlayerChoose(PlayerMove.Choose.PairsPlus);
    state.setChip(move,10,0);
    int expectedWagerPairsPlus=10;
    int expectedWagerAnte=0;
    int expectedWagerPlay=0;
    assertEquals(state.getChipPairsPlus(),expectedWagerPairsPlus);
View Full Code Here


  }
 
  @Test
  public void testSetChipForAnte(){
    state.initialize();
    PlayerMove move=new PlayerMove();
    move.setPlayerChoose(PlayerMove.Choose.Ante);
    state.setChip(move,0,10);
    int expectedWagerPairsPlus=0;
    int expectedWagerAnte=10;
    int expectedWagerPlay=0;
    assertEquals(state.getChipPairsPlus(),expectedWagerPairsPlus);
View Full Code Here

  }
 
  @Test
  public void testSetChipForPairsPlusAnte(){
    state.initialize();
    PlayerMove move=new PlayerMove();
    move.setPlayerChoose(PlayerMove.Choose.PairsPlusAnte);
    state.setChip(move,10,10);
    int expectedWagerPairsPlus=10;
    int expectedWagerAnte=10;
    int expectedWagerPlay=0;
    assertEquals(state.getChipPairsPlus(),expectedWagerPairsPlus);
View Full Code Here

  }
 
  @Test
  public void testGiveCards(){
    state.initialize();
    PlayerMove move=new PlayerMove();
    move.setPlayerChoose(PlayerMove.Choose.PairsPlus);
    state.setChip(move,10,0);
    state.giveCards();
    int expectedNumberOfCards=3;
    assertEquals(state.getPlayerCards().size(),expectedNumberOfCards);
    assertEquals(state.getDealerCards().size(),expectedNumberOfCards);
View Full Code Here

    Card card6=new Card(Suit.SPADES,Rank.FIVE);
    player.add(card4);
      player.add(card5);
    player.add(card6);   
    state.setPlayerCards(player);
    PlayerMove move=new PlayerMove();
    move.setPlayerChoose(PlayerMove.Choose.PairsPlus);
    state.setChip(move,10,0);
    move.setPlayerDecision(PlayerMove.Decision.Deal)
    int expectedBalance=990;
    GameOver.Result expectedLose=GameOver.Result.LOSE;
    GameOver gameover=state.makeMove(move);
    assertEquals(gameover.getResult(),expectedLose);
    assertEquals(gameover.getBalance(),expectedBalance);    
View Full Code Here

    Card card6=new Card(Suit.SPADES,Rank.FIVE);
    player.add(card4);
      player.add(card5);
    player.add(card6);   
    state.setPlayerCards(player);
    PlayerMove move=new PlayerMove();
    move.setPlayerChoose(PlayerMove.Choose.Ante);
    state.setChip(move,0,10);
    move.setPlayerDecision(PlayerMove.Decision.Fold)
    int expectedBalance=990;
    GameOver.Result expectedLose=GameOver.Result.LOSE;
    GameOver gameover=state.makeMove(move);
    assertEquals(gameover.getResult(),expectedLose);
    assertEquals(gameover.getBalance(),expectedBalance);    
View Full Code Here

    player.add(card4);
      player.add(card5);
    player.add(card6);
    state.setDealerCards(dealer);
    state.setPlayerCards(player);
    PlayerMove move=new PlayerMove();
    move.setPlayerChoose(PlayerMove.Choose.Ante);
    state.setChip(move,0,10);
    move.setPlayerDecision(PlayerMove.Decision.Play)
    int expectedBalance=1020;
    GameOver.Result expectedWin=GameOver.Result.WIN;
    GameOver gameover=state.makeMove(move);
    assertEquals(gameover.getResult(),expectedWin);
    assertEquals(gameover.getBalance(),expectedBalance);  
View Full Code Here

    Card card6=new Card(Suit.SPADES,Rank.FIVE);
    player.add(card4);
      player.add(card5);
    player.add(card6);   
    state.setPlayerCards(player);
    PlayerMove move=new PlayerMove();
    move.setPlayerChoose(PlayerMove.Choose.PairsPlusAnte);
    state.setChip(move,10,10);
    move.setPlayerDecision(PlayerMove.Decision.Fold)
    int expectedBalance=980;
    GameOver.Result expectedLose=GameOver.Result.LOSE;
    GameOver gameover=state.makeMove(move);
    assertEquals(gameover.getResult(),expectedLose);
    assertEquals(gameover.getBalance(),expectedBalance);    
View Full Code Here

    player.add(card4);
      player.add(card5);
    player.add(card6);
    state.setDealerCards(dealer);
    state.setPlayerCards(player);
    PlayerMove move=new PlayerMove();
    move.setPlayerChoose(PlayerMove.Choose.PairsPlusAnte);
    state.setChip(move,10,10);
    int expectedBalance=990;
    GameOver.Result expectedLose=GameOver.Result.LOSE;
    move.setPlayerDecision(PlayerMove.Decision.Deal);
    GameOver gameover=state.makeMove(move);
    assertEquals(gameover.getResult(),expectedLose);
    assertEquals(gameover.getBalance(),expectedBalance);
    state.setBalance(gameover.getBalance());
    expectedBalance=1010;
    GameOver.Result expectedWin=GameOver.Result.WIN;
    move.setPlayerDecision(PlayerMove.Decision.Play);
    gameover=state.makeMove(move);
    assertEquals(gameover.getResult(),expectedWin);
    assertEquals(gameover.getBalance(),expectedBalance);      
  }
View Full Code Here

    player.add(card4);
      player.add(card5);
    player.add(card6);
    state.setDealerCards(dealer);
    state.setPlayerCards(player);
    PlayerMove move=new PlayerMove();
    move.setPlayerChoose(PlayerMove.Choose.Ante);
    state.setChip(move,0,10);
    int expectedBalance=1050;
    GameOver.Result expectedWin=GameOver.Result.WIN;
    move.setPlayerDecision(PlayerMove.Decision.Play);
    GameOver gameover=state.makeMove(move);
    assertEquals(gameover.getResult(),expectedWin);
    assertEquals(gameover.getBalance(),expectedBalance);      
  }
View Full Code Here

TOP

Related Classes of poker_game.PlayerMove

Copyright © 2018 www.massapicom. 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.