Examples of River


Examples of com.google.code.timetrail.backend.River

  @Test
  public void testTakeFerryNutritionist() {
    control.setPlayer(nutritionist);

    River river;
    for (Place p : places) {
      river = new River(control, p);
      String ferry = river.takeFerry();
      assertFalse(
          "Not able to take Ferry",
          ferry.equals("You don't have enough money to make it across!"));
    }

    river = new River(control, control.getCurrentPlace());
    assertEquals(40, river.getFerryPrice());

    control.getPlayer().intializeSkills();

    assertEquals(40, river.getFerryPrice());
  }
View Full Code Here

Examples of com.google.code.timetrail.backend.River

  @Test
  public void testFordNutritionist() {
    control.setPlayer(nutritionist);

    River river;
    for (Place p : places) {
      river = new River(control, p);
      int passed = 0;
      for (int i = 0; i < 10000; i++) {
        String ford = river.ford();
        if (ford.equals("You sucessfully made it across the time stream"))
          passed++;
      }

      if (p.getName().equals("Kansas River")
View Full Code Here

Examples of com.google.code.timetrail.backend.River

 
  @Test
  public void testCaulkNutritionist() {
    control.setPlayer(nutritionist);

    River river;
    for (Place p : places) {
      river = new River(control, p);
      int passed = 0;
      for (int i = 0; i < 10000; i++) {
        String ford = river.ford();
        if (ford.equals("You sucessfully made it across the time stream"))
          passed++;
      }

      assertEquals(.35, (double) passed / 10000.0, 0.55);
View Full Code Here

Examples of game.River

    crossButton = new Button(this, SWT.NONE);
    crossButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent arg0) {
       
        River river =  World.getMap().getLastRiver();
        if(river == null)
          river = World.getMap().getNextRiver(); //backup for the first river
       
        if(crossMethods.getText().equals("Take Ferry"))
        {
          try
          {
            river.takeFerry();
            done = true;
          }
          catch(InsufficientFundsException f)
          {
            lblCross.setText("We're too poor for that, pick another way across.");
          }
        }
        else if(crossMethods.getText().equals("Ford")){
          river.ford();
          done = true;
        }
        else{
          river.caulk();
          done = true;
        }
      }
    });
    crossButton.setBounds(209, 256, 231, 34);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.