Package game

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

Related Classes of game.River

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.