예제 #1
0
  @Before
  public void setUp() throws Exception {
    int[] tiles = {
      1, 1, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0,
      0, 0, 0
    };
    Tile last = M1;
    Hands hands = new Hands(tiles, last);
    List<Tile> dora = new ArrayList<>(1);
    dora.add(CHN);

    List<Tile> uradora = new ArrayList<>(1);
    uradora.add(M2);
    GeneralSituation general;
    general = new GeneralSituation(true, false, PEI, dora, uradora);
    PersonalSituation personal;
    personal = new PersonalSituation(true, false, false, false, false, false, NAN);

    player = new Player(hands, general, personal);
    player.calculate();
  }
예제 #2
0
 @Test
 public void testGetScore() throws Exception {
   assertEquals(SCORE32000, player.getScore());
 }
예제 #3
0
 @Test
 public void testGetFu() throws Exception {
   assertEquals(0, player.getFu());
 }
예제 #4
0
  @Test
  public void testGetYakumanListItem() throws Exception {
    List<Yakuman> actual = player.getYakumanList();

    assertThat(actual, hasItems(CHIHO));
  }
예제 #5
0
  @Test
  public void testGetYakumanListSize() throws Exception {
    List<Yakuman> actual = player.getYakumanList();

    assertEquals(1, actual.size());
  }
예제 #6
0
 @Test
 public void testGetNormalYaku() throws Exception {
   List<NormalYaku> actual = player.getNormalYakuList();
   assertEquals(0, actual.size());
 }