Package com.luxoft.dnepr.courses.unit3.model

Examples of com.luxoft.dnepr.courses.unit3.model.Card


  }

  @Test
  public void testCostOf() {
        ArrayList<Card> list1 = new ArrayList<Card>();
        list1.add(new Card(RANK_2, CLUBS));
    assertEquals(2, Deck.costOf(list1));

        ArrayList<Card> list2 = new ArrayList<Card>();
        list2.add(new Card(RANK_ACE, DIAMONDS));
        list2.add(new Card(RANK_10, SPADES));
        assertEquals(21, Deck.costOf(list2));

        List<Card> list3 = Deck.createDeck(1);
        assertEquals(380,Deck.costOf(list3));
View Full Code Here


        GameController controller = GameController.getInstance();
        controller.newGame(new Shuffler() {

            @Override
            public void shuffle(List<Card> deck) {
                deck.set(0, new Card(Rank.RANK_10, Suit.SPADES));
                deck.set(1, new Card(Rank.RANK_ACE, Suit.SPADES));
                deck.set(2, new Card(Rank.RANK_JACK, Suit.SPADES));
            }

        });
        assertEquals(controller.getMyHand().size(), 2);
        assertEquals(Rank.RANK_10, controller.getMyHand().get(0).getRank());
View Full Code Here

        GameController controller = GameController.getInstance();
        controller.newGame(new Shuffler() {

            @Override
            public void shuffle(List<Card> deck) {
                deck.set(0, new Card(Rank.RANK_2, Suit.SPADES));
                deck.set(1, new Card(Rank.RANK_5, Suit.SPADES));
                deck.set(2, new Card(Rank.RANK_3, Suit.SPADES));
                deck.set(3, new Card(Rank.RANK_3, Suit.CLUBS));
                deck.set(4, new Card(Rank.RANK_7, Suit.DIAMONDS));
                deck.set(5, new Card(Rank.RANK_10, Suit.SPADES));
                deck.set(6, new Card(Rank.RANK_8, Suit.DIAMONDS));
            }

        });

        assertTrue(controller.requestMore());
View Full Code Here

        GameController controller = GameController.getInstance();
        controller.newGame(new Shuffler() {

            @Override
            public void shuffle(List<Card> deck) {
                deck.set(0, new Card(Rank.RANK_2, Suit.SPADES));
                deck.set(1, new Card(Rank.RANK_5, Suit.SPADES));
                deck.set(2, new Card(Rank.RANK_3, Suit.SPADES));
                deck.set(3, new Card(Rank.RANK_3, Suit.CLUBS));
                deck.set(4, new Card(Rank.RANK_7, Suit.DIAMONDS));
                deck.set(5, new Card(Rank.RANK_10, Suit.SPADES));
                deck.set(6, new Card(Rank.RANK_ACE, Suit.DIAMONDS));
            }

        });

        assertTrue(controller.requestMore());
View Full Code Here

        GameController controller = GameController.getInstance();
        controller.newGame(new Shuffler() {

            @Override
            public void shuffle(List<Card> deck) {
                deck.set(0, new Card(Rank.RANK_2, Suit.SPADES));
                deck.set(1, new Card(Rank.RANK_5, Suit.SPADES));
                deck.set(2, new Card(Rank.RANK_3, Suit.SPADES));
                deck.set(3, new Card(Rank.RANK_3, Suit.CLUBS));
                deck.set(4, new Card(Rank.RANK_7, Suit.DIAMONDS));
                deck.set(5, new Card(Rank.RANK_10, Suit.SPADES));
                deck.set(6, new Card(Rank.RANK_4, Suit.DIAMONDS));
            }

        });

        assertTrue(controller.requestMore());
View Full Code Here


public class BlackJack {

  public static void main(String[] args) throws IOException {
    new WebServer(8081).start();
  }
View Full Code Here

TOP

Related Classes of com.luxoft.dnepr.courses.unit3.model.Card

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.