Package game

Examples of game.Player


   * Create a new state and players for each test
   */
  public void setUp()
  {
    state = new ComputerTurnSate();
    p1 = new Player();
    p2 = new Player();
  }
View Full Code Here


   * Create a new state and players for each test
   */
  public void setUp()
  {
    state = new PlayerTurnState();
    p1 = new Player();
    p2 = new Player();
  }
View Full Code Here

   */
  public GoFish()
  {
    resetDeck();
    setId(3);
    player = new Player(new GoFishHand());
    computer = new Player(new GoFishHand());
    turnState = new PlayerTurnState();
    start();
  }
View Full Code Here

     * Test of getPlayer method, of class Action.
     */
    @Test
    public void testGetPlayer() {
        System.out.println("getPlayer");
        Player result = actionTest.getPlayer();
        Player expResult = player;
        assertEquals(result, expResult);
    }
View Full Code Here

    }

   
    @Before
    public void setUp() {
        player=new Player(5,5,5,false);
        game=new Game("username",001);
        instance=new Action(player,"action","value",game,session);
    }
View Full Code Here

     */
    @Test
    public void testGetPlayer() {
        System.out.println("getPlayer");

        Player result = instance.getPlayer();
        assertEquals(player, result);

    }
View Full Code Here

    @Test
    public void testPerformAction() {
        System.out.println("performAction");
       
     
       Player  player=new Player(5,5,5,false);
       Game game=new Game("username",001);
       Action action=new Action(player,"action","value",game,session);
       
        ActionPerformerInterface instance = new ActionPerformerInterfaceImpl();
        instance.performAction(action);
View Full Code Here

    protected void processRequest(final HttpServletRequest request, final HttpServletResponse response)
            throws ServletException, IOException {
        final HttpSession session = request.getSession();
        final String email = (String) session.getAttribute("email");
        final Game game = (Game) session.getAttribute("game");
        Player player = null;
        if (game != null) {
            player = game.getPlayer(email);
        }
        final String actionType = (String) request.getParameter("action");
        final String value = (String) request.getParameter("value");
View Full Code Here

   
    @Before
    public void setUp() {
       
        player=new Player(4,4,4,false);
        game=new Game("username",001);
        action=new Action(player,"BAH","value",game,session);
    }
View Full Code Here

TOP

Related Classes of game.Player

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.