Examples of Game


Examples of freecell.model.Game

        addComponents();
        attachListeners();
    }

    public static void main(String[] args) throws IOException {
        new GraphicalApplication(new Game());
    }
View Full Code Here

Examples of game.Game

   * @param destination  The base to where the agents are going
   * @param player  The player owning the agents
   */
  public void addGroupAgent(int nbAgents, Base source, Base destination, Player player) {
   
    Game game = Game.getInstance();
 
    try {
      GroupAgent groupAgent = new GroupAgent(nbAgents, source, destination, player);
      AppliWindow.getInstance().getLabelAgent().add(groupAgent);
      game.getAgentManager().addAgent(groupAgent);
    } catch (IOException e) {
      System.out.println("failed "+e);
      e.printStackTrace();
    }
   
View Full Code Here

Examples of games.pickupbot.Game

        new MainDatabaseManager();

        this.extensionObject.clearGames();

        for (String gameType : this.games) {
            Game game = Game.tryParse(gameType);

            this.extensionObject.addGame(game);
        }

        extensionObject.setExtensionMessenger(this.messenger);
View Full Code Here

Examples of general.Game

   * Initialises game.
   */
  private void initGame() {
    board = new Board();
    move = new Move(board);
    game = new Game();
    createPlayers();
  }
View Full Code Here

Examples of jbrickbreaker.model.Game

                JOptionPane.QUESTION_MESSAGE);
        //limit to 33 characters otherwise it's ugly
        if(s == null)
            s = ""; //$NON-NLS-1$
        Player p = new Player(s.substring(0, s.length() < 33 ? s.length() : 33));
        Game g = new Game(p, brickBreaker);
        brickBreaker.newGame(g);
    }
View Full Code Here

Examples of logic.Game

  /**
   * @param args
   */
  public static void main(String[] args)
  {
    Game b = new Game();
  }
View Full Code Here

Examples of mage.game.Game

  private GameFactory() {}

  public Game createGame(String gameType, MultiplayerAttackOption attackOption, RangeOfInfluence range) {

    Game game;
    Constructor<Game> con;
    try {
      con = games.get(gameType).getConstructor(new Class[]{MultiplayerAttackOption.class, RangeOfInfluence.class});
      game = con.newInstance(new Object[] {attackOption, range});
    } catch (Exception ex) {
      logger.log(Level.SEVERE, null, ex);
      return null;
    }
    logger.info("Game created: " + game.getId().toString());

    return game;
  }
View Full Code Here

Examples of mdesl.test.Game

import org.lwjgl.opengl.Display;

public class ShaderLesson3 extends SimpleGame {

  public static void main(String[] args) throws LWJGLException {
    Game game = new ShaderLesson3();
    game.setDisplayMode(320, 240, false);
    game.start();
  }
View Full Code Here

Examples of megamek.common.Game

        String sCheck = p.getProperty("MMSVersion");
        if (sCheck == null) {
            throw new Exception("Not a valid MMS file.  No MMSVersion.");
        }

        Game g = new Game();

        // build the board
        g.board = createBoard(p);

        // build the faction players
        Player[] players = createPlayers(p);
        for (int x = 0; x < players.length; x++) {
            g.addPlayer(x, players[x]);
        }

        // build the entities
        int nIndex = 0;
        for (int x = 0; x < players.length; x++) {
            Entity[] entities = buildFactionEntities(p, players[x]);
            for (int y = 0; y < entities.length; y++) {
                entities[y].setOwner(players[x]);
                entities[y].setId(nIndex++);
                g.addEntity(entities[y].getId(), entities[y]);
            }
        }
        // game's ready
        g.getOptions().initialize();
        String optionFile = p.getProperty("GameOptionsFile");
        if (optionFile == null) {
            g.getOptions().loadOptions();
        } else {
            g.getOptions().loadOptions(
                    new File(m_scenFile.getParentFile(), optionFile));
        }

        // set wind
        g.getPlanetaryConditions().determineWind();

        // Set up the teams (for initiative)
        g.setupTeams();

        g.setPhase(IGame.Phase.PHASE_STARTING_SCENARIO);

        g.setupRoundDeployment();

        // Read the external game id from the scenario file
        g.setExternalGameId(parseExternalGameId(p));
       
        g.setVictoryContext(new HashMap<String, Object>());
        g.createVictoryConditions();

        return g;
    }
View Full Code Here

Examples of models.data.Game

    player.setId(1);
   
    Mockito.when(UserManager.getCurrentLoggedInUser()).thenReturn(
        player);
   
    Game game = gameManager.createFixedTimeChallengeGame(gameForm);
    Assert.assertTrue(game != null);
//    PowerMockito.verifyStatic();
//    UserManager.getCurrentLoggedInUser();
   
//    Mockito.when(game.getId()).thenReturn(1);
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.