Package org.scotlandyard.impl.engine.boardmap

Examples of org.scotlandyard.impl.engine.boardmap.LinkImpl


    GameEngine.instance().getBoardMaps().remove("Auckland");
  }
 
  @Test//TODO add description here
  public final void testEqualsObject() throws GameException{
    Link other = new LinkImpl(boardMap, TransportationMethod.BUS, a, b);
    Assert.assertTrue(link.equals(other));
    Link other2 = new LinkImpl(boardMap, TransportationMethod.TAXI, a, b);
    Assert.assertFalse(link.equals(other2));
    Link other3 = new LinkImpl(boardMap, TransportationMethod.BUS, a, new CoordinateImpl(boardMap,11,22));
    Assert.assertFalse(link.equals(other3));
    Link other4 = new LinkImpl(boardMap, TransportationMethod.BUS, new CoordinateImpl(boardMap,11,20), b);
    Assert.assertFalse(link.equals(other4));
  }
View Full Code Here


    Assert.assertEquals(link.getBoardMap(), boardMap);
  }

  @Test(expected=Exception.class)//TODO add description here
  public final void testLinkImpl2() throws Exception{
    Assert.assertNull(new LinkImpl(
        null,
        TransportationMethod.BUS,
        new CoordinateImpl(boardMap, 2, 2),
        new CoordinateImpl(boardMap, 1, 1)
    ));
View Full Code Here

   
  }

  @Test(expected=Exception.class)//TODO add description here
  public final void testLinkImpl3() throws Exception{
    Assert.assertNull(new LinkImpl(
        boardMap,
        null,
        new CoordinateImpl(boardMap, 2, 2),
        new CoordinateImpl(boardMap, 1, 1)
    ));
View Full Code Here

   
  }

  @Test(expected=Exception.class)//TODO add description here
  public final void testLinkImpl4() throws Exception{
    Assert.assertNull(new LinkImpl(
        boardMap,
        TransportationMethod.BUS,
        null,
        new CoordinateImpl(boardMap, 1, 1)
    ));
View Full Code Here

    ));
  }

  @Test(expected=Exception.class)//TODO add description here
  public final void testLinkImpl5() throws Exception{
    Assert.assertNull(new LinkImpl(
        boardMap,
        TransportationMethod.BUS,
        new CoordinateImpl(boardMap, 2, 2),
        null
    ));
View Full Code Here

    ));
  }

  @Test(expected=Exception.class)//TODO add description here
  public final void testLinkImpl6() throws Exception{
    Assert.assertNull(new LinkImpl(
        boardMap,
        TransportationMethod.BUS,
        new CoordinateImpl(boardMap, 12, 22),
        new CoordinateImpl(boardMap2, 12, 22)
    ));
View Full Code Here

    ));
  }

  @Test(expected=Exception.class)//TODO add description here
  public final void testLinkImpl7() throws Exception{
    Assert.assertNull(new LinkImpl(
        boardMap,
        TransportationMethod.BUS,
        new CoordinateImpl(boardMap2, 12, 22),
        new CoordinateImpl(boardMap, 12, 22)
    ));
View Full Code Here

    ));
  }

  @Test(expected=Exception.class)//TODO add description here
  public final void testLinkImpl8() throws Exception{
    Assert.assertNull(new LinkImpl(
        boardMap2,
        TransportationMethod.BUS,
        new CoordinateImpl(boardMap, 12, 22),
        new CoordinateImpl(boardMap, 12, 22)
    ));
View Full Code Here

    game = GameImpl.getNewInstance("2", creator, boardMap);
    final Game game2 = GameImpl.getNewInstance("3", creator, boardMap);
    final Coordinate coor = new CoordinateImpl(boardMap, 1.1, 2.2);
    final Coordinate coor1 = new CoordinateImpl(boardMap, 1.6, 2.6);
    //Token token = new TokenImpl(detective, TransportationMethod.BUS);
    final Link route = new LinkImpl(boardMap, TransportationMethod.BUS, coor, coor1);
    //token.setNumberOfTickets(10);

    detective.setTokens(game, TransportationMethod.BUS, 10);
    final Token token = detective.getTokens(game).get(TransportationMethod.BUS);
View Full Code Here

  @Before//TODO add description here
  public void setUp() throws Exception{
    a = new CoordinateImpl(boardMap, 10, 20);
    b = new CoordinateImpl(boardMap, 12, 22);
    link = new LinkImpl(boardMap, TransportationMethod.BUS, a, b);
  }
View Full Code Here

TOP

Related Classes of org.scotlandyard.impl.engine.boardmap.LinkImpl

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.