GroovyScriptFacade.java :  » Game » magicwars » mw » server » card » Java Open Source

Java Open Source » Game » magicwars 
magicwars » mw » server » card » GroovyScriptFacade.java
package mw.server.card;

import mw.server.GameManager;
import mw.server.MWStack;
import mw.server.card.ability.factory.SpellCreateTokenFactory;
import mw.server.model.CounterType;
import mw.server.model.MagicWarsModel;
import mw.server.model.MagicWarsModel.CardOrder;
import mw.server.model.MagicWarsModel.GameZone;

public class GroovyScriptFacade {
  public GameManager game;
  public GroovyCardFactory builder;

  private GroovyScriptBindings bindings;

  public Class<MagicWarsModel.Color> Color = MagicWarsModel.Color.class;
  public Class<MagicWarsModel> MagicWarsModelRef = MagicWarsModel.class;
  public Class<CounterType> CounterTypeRef = CounterType.class;
  public Class<GameZone> GameZone = MagicWarsModel.GameZone.class;
  public Class<SpellCreateTokenFactory> tokenFactory = SpellCreateTokenFactory.class;
  public Class<CardOrder> CardOrder = MagicWarsModel.CardOrder.class;
  
  public MWStack getStack() {
    return game.getStack();
  }
  
  public GroovyScriptBindings getBindings() {
    if (bindings == null) { 
      bindings = new GroovyScriptBindingsImpl();
    }
    return bindings;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.