Package cero.games

Examples of cero.games.Game


  public static Look getCommand() {
    return instance;
  }

  public boolean executer(String parametres) {
    Game game = CommandLineLauncher.getGame();
    if (game == null || parametres.trim() == "")
      return false;
    game.addActionListener(this);

    Collection<Zone> collection = new ArrayList<Zone>();

    if (parametres.equals("listz")) {
      collection.addAll(game.getZones());
      collection
          .addAll(CommandLineLauncher.getCurrentPlayer().getZones());
      print(collection);
    } else {
      Zone zone = CommandLineLauncher.getGame().getZones()
View Full Code Here


   * @param e
   *            the GameEvent to listen to
   */
  public void gameStart(GameEvent e){
   
    Game g = e.getGame();
    Player p = g.getPlayers().get(0);
    DeckLayoutBase deckLayoutBase = new DeckLayoutBase();
    this.setDeckLayout(deckLayoutBase);
   
    if (g instanceof UnoGame) {
      UnoGame game = (UnoGame)g;
     
      // create graphical zones need for Uno game
      GraphicsZone Talon = new GraphicsZoneColor(game.getZones().get("Talon"));
      GraphicsZone Hand = new GraphicsZoneBase(p.getZones().get("Hand"));
      Hand.setZoneLayout(new ZoneLayoutOverLapH());
      HashMap<Player,GraphicsZone> gZoneIAMap = new HashMap<Player,GraphicsZone>();
      int i = 0;
      for(Player z : g.getPlayers()){
        if(z != p){
         
          gZoneIAMap.put(z,new GraphicsZoneNumber(z.getZones().get("Hand")));
          deckLayoutBase.addZone(gZoneIAMap.get(z),new Constraint(Constraint.NORTH,i));
          i++;
        }
      }
     
      // lay down graphical zones
      deckLayoutBase.addZone(Talon,new Constraint(Constraint.CENTER,0));
      deckLayoutBase.addZone(Hand,new Constraint(Constraint.SOUTH,0));
     
      // add graphical zone to Devint Uno deck
      this.add(Talon);
      this.add(Hand);;
      for(Player z : g.getPlayers()){
        if(z != p){
         
          this.add(gZoneIAMap.get(z));
        }
      }
View Full Code Here

TOP

Related Classes of cero.games.Game

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.