Examples of Game


Examples of Model.Game

* Classe Main centrale
*/
public class Main {
  static public void main(String args[]) {
    Controller controller = new Controller(true);
    Game game = Game.getInstance();
    GUI gui = GUI.getInstance();

    /* Boucle de jeu */
    while (!game.isFinished()) {
      game.step();
      gui.update();
    }
    JFrame fin;
    fin = new JFrame();
    fin.setResizable(false);
    fin.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    fin.pack();
    fin.setFocusable(true);
    fin.setVisible(true);
    fin.setBounds(100, 100, 200, 100);
   

    JButton b = new JButton("OK");
    b.setBounds(new Rectangle(100,100));
    b.addMouseListener(new MouseAdapter() {
     
      @Override
      public void mousePressed(MouseEvent arg0) {
        System.exit(0);
      }
    });
    if(game.win()){
      fin.setTitle("Partie Gagnée");
      fin.add(b);
    }
    else{
      fin.setTitle("Partie Perdue");
View Full Code Here

Examples of Project1.Game.Game

        if (JOptionPane.NO_OPTION == Confirmation) {
          Options.Size = newSize;
        }
        else if (JOptionPane.YES_OPTION == Confirmation) {
          Options.Size = newSize;
          new Game();
        }
      }
    }
    else {
      int Confirmation = JOptionPane.showConfirmDialog(this, "Start a new game?", "Options Confirmation", JOptionPane.YES_NO_OPTION);
     
      if (JOptionPane.YES_OPTION == Confirmation) {
        new Game();
      }
    }
  }
View Full Code Here

Examples of Tetris.Game

        // Update options that require a reset
        difficulty = Difficulty.valueOf((String)difficultySelect.getSelectedItem());
        multipleLives = multipleLivesCheck.isSelected();
      }
      if (check.restart) {
        new Game();
      }
      if (check.close) {
        this.dispose();
      }
    }
View Full Code Here

Examples of _main.Game

  public Bankrablo_utkozik_a_keresztezodesben(){
    Logger.get().addOrdinaryMessage("_____________________________A bankrablo utkozik a keresztezodesben_____________________________");
    Logger.get().addOrdinaryMessage("[[[ELOFELTETELEK LETREHOZASA]]]");
    GameTimer.setNotifyEnabled(false);
    cross = new StopCross();
    game = new Game();
   
    cross.addVehicleToCross(new OrdinaryCar());
    Logger.get().addOrdinaryMessage("[[[ELOFELTETELEK LETREHOZASA VEGE]]]");
   
    cross.collisionDetect();
View Full Code Here

Examples of belotetime.application.game.Game

public class TestGame
{
  @Test
  public void test()
  {
    Game game = new Game();
    assertTrue(game.getPacket().getCards().size() == 32);
   
    for(Card c : game.getPacket().getCards())
    {
      System.out.println(c.getImg());
    }
  }
View Full Code Here

Examples of cero.games.Game

  public Game getNewGame(String gameName) {
    GamePlugin gp = gamePlugins.get(gameName);
    if (gp == null)
      return null;

    Game game = gp.newGameInstance();
    // adds the interface to the game, so that they become aware of it
    for (UserInterface ui : uiInstances)
      game.addGameListener(ui);

    return game;
  }
View Full Code Here

Examples of ch.bfh.jass.game.Game

    }

    @Test
    public void testDifferentHands() throws PlayerAlreadyInGameException, PlaceTakenException, PlaceDoesNotExistException, YouMustNotException {
        Collection<Card> handCards = new ArrayList<Card>();
        Game jass = new Game(this.player1);
        jass.addPlayer(this.player2, 1);
        jass.addPlayer(this.player3, 2);
        jass.addPlayer(this.player4, 3);

        jass.start(this.player1);

        for (IPlayer player : jass.getPlayers()) {
            handCards.addAll(player.getHandCards());
        }

        Assert.assertEquals(36, handCards.size());
        for (Card checkCard : handCards) {
View Full Code Here

Examples of civquest.core.Game

      for (int y = 0; y < visibilityLevels[0].length; y++) {
        visibilityLevels[x][y] = INVISIBLE;
      }     
    }

    Game game = Game.getGame();
    MapObjectReader moReader = game.getMapObjectReader();
    CityReader cityReader = game.getCityReader();
    NationReader nationReader = game.getNationReader();

    Iterator<Long> unitIterator = nationReader.getAllUnits(nation.getID());
    while (unitIterator.hasNext()) {
      Long currUnitID = unitIterator.next();
      Coordinate currUnitPosition = moReader.getMapObjectPosition(currUnitID);
View Full Code Here

Examples of civquest.core.Game

  }

  public void actionPerformed(FunctionActionEvent e) {
    try {
      Game.constructGame(registry);
      Game game = Game.getGame();
      game.loadUnitRulesets();

      constructMap();
      addSomePlayersAndNations();

      GUIBuilder.buildGameGUI(civQuest);
View Full Code Here

Examples of civquest.core.Game

  }

  // Just for adding a sample map as long as this can't be done in a proper way
  private void constructMap() throws ConfigurationException {
    Game game = Game.getGame();
    MapGenerator mg = new MapGenerator(game.getRegistry());
    mg.generate();   
  }
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.