Examples of GameState


Examples of com.epicsagaonline.bukkit.ChallengeMaps.objects.GameState

    if (!mapName.equals(worldName))
    {
      Map map = Current.Maps.get(mapName.toLowerCase());
      if (map != null)
      {
        GameState gs = Current.GameStates.get(event.getPlayer().getName());
        if (gs == null || !gs.getMap().getMapName().equalsIgnoreCase(mapName))
        {
          gs = GameStateData.Load(map, event.getPlayer(), false);
          if (gs != null)
          {

            if (gs.canRespawn())
            {
              World world = Current.LoadWorld(gs, event.getPlayer());
              if (gs.getMap().getResetInventory())
              {
                gs.toggleInventory();
              }

              event.getPlayer().teleport(world.getSpawnLocation());
              event.getPlayer().sendMessage(gs.getMap().getEntranceText());

              gs.setInChallenge(true);

            }
            else
            {
              gs.PendingRemoval = true;
View Full Code Here

Examples of com.epicsagaonline.bukkit.ChallengeMaps.objects.GameState

      String toWorldName = event.getTo().getWorld().getName();
      if (!fromWorldName.equalsIgnoreCase(toWorldName))
      {
        if (Current.GameWorlds.contains(fromWorldName))
        {
          GameState gs = Current.GameStates.get(event.getPlayer().getName());
          if (gs != null)
          {
            gs.PendingRemoval = true;
          }
        }
View Full Code Here

Examples of com.hobbitsadventure.model.GameState

//    audioFactory.playBackgroundMusic("ff4fores");
//  }
 
  private void initModel() {
    try {
      this.gameState = new GameState();
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

Examples of cs227b.teamIago.util.GameState

      exps[i] = new Predicate("true", new Expression[] {e});
    }
    // add to theory and extract the GameState
    Theory t = new Theory(true, false);
    t.setState(new ExpList(exps));
    GameState gs = t.getState();
    return gs;
  }
View Full Code Here

Examples of cs227b.teamIago.util.GameState

    moves = new ExpList();
  }
 
  public GameState getState() {
    if (memoTrans && storeTrans)
      return new GameState(trans,provenTrans,disprovenTrans);
    else return new GameState(trans);
  }
View Full Code Here

Examples of cs227b.teamIago.util.GameState

    int offset;
    String axiomFile, stateFile, movesFile;
    GameSimulator myGGP;
    boolean wantDebugPrintouts;
    ExpList movesList, roles, legalMoves, goalValues;
    GameState nextState;

    wantDebugPrintouts = false;
    offset = 0;
    if (args.length % 3 == 1)
    {
      wantDebugPrintouts = true;
      offset = 1;
    }

    if (args.length >= 3) maxIndex = args.length / 3;
    else {
      System.err.println("Expected arguments: [debug] axiom file, state file, move file");
      System.exit(-1);
      return;
    }


    for (int testfile = 1; testfile <=  maxIndex ; testfile++)
    {

        boolean useOptimization = true;
    myGGP = new GameSimulator(wantDebugPrintouts, useOptimization);

    System.out.println("**************** Game " + testfile + " *****************");

    if (args.length > 3*testfile - 1 + offset)
    {
      axiomFile = args[3*(testfile-1) + 0 + offset];
      stateFile = args[3*(testfile-1) + 1 + offset];
      movesFile = args[3*(testfile-1) + 2 + offset];
    }
    else return;

    myGGP.ParseFileIntoTheory(axiomFile);
    myGGP.ParseFileIntoTheory(stateFile);

    movesList = Parser.parseFile(movesFile);


    // Get all the available roles
    roles = myGGP.GetRoles();

    if (roles == null) {
        System.out.println("No playable roles found: aborting.");
      System.exit(-1);
    }

    int i;
    for (i = 0; i < roles.size(); i++)
    {

      Expression player = roles.get(i);

      System.out.println("Player " + player.toString());
      legalMoves =  myGGP.GetLegalMoves(player);
      if (legalMoves == null)
        System.out.println("No legal moves found.");
      else
        System.out.println("Legal moves: " + legalMoves.toString());

      goalValues = myGGP.GetGoalValues(player);
      if (goalValues == null)
        System.out.println("No goal values found.");
      else
        System.out.println("Goal values: " +
        goalValues.toString());
    }

    if (myGGP.IsTerminal()) {
      System.out.println("Game is in terminal state.");
      System.out.println("(Not calculating next state.)");
    }
    else
    {
      System.out.println("Game is in non-terminal state.");

      GameState oldState;
      oldState = myGGP.GetGameState();
      myGGP.SimulateStep(movesList);

      nextState = myGGP.GetGameState();
      if (nextState == null)
View Full Code Here

Examples of fr.umlv.escapeir.state.GameState

          switch (EscapeIR.currentState) {
          case QUIT:
            return;
          case GAME:
            if (newState)
              this.states.put(StateID.GAME, new GameState(context));
            break;
          case WIN:
            if (newState)
              this.states.put(StateID.WIN, new WinState(context));
          case LOOSE:
View Full Code Here

Examples of imi.character.statemachine.GameState

    @Override
    public void notifyAnimationMessage(AnimationMessageType message, int stateID) {
        super.notifyAnimationMessage(message, stateID);

        GameState cur = getCurrentState();

        AvatarAnimationEvent.EventType type = null;
        String animationName = null;

        if (cur instanceof IdleState && currentAnimationName != null)
      {
            // transition out of the current state
            type = AvatarAnimationEvent.EventType.STOPPED;
            animationName = currentAnimationName;
            currentAnimationName = null;
            }
  else if (cur instanceof CycleActionState)
      {
            switch (message)
    {
                case TransitionComplete:
                    type = AvatarAnimationEvent.EventType.STARTED;
                    animationName = cur.getAnimationName();
                    currentAnimationName = animationName;
                    break;
                case PlayOnceComplete:
                    type = AvatarAnimationEvent.EventType.STOPPED;
                    animationName = cur.getAnimationName();
                    currentAnimationName = null;
                    break;
                }
            }
  else if (cur instanceof TurnState)
View Full Code Here

Examples of imi.character.statemachine.GameState

//                setCurrentState((ActionState) gameStates.get(CycleActionState.class));
//                break;
               
            case Idle:
                // force idle by interrupting the current animation
                GameState state = getCurrentState();
                if (state instanceof ActionState) {
                    state.notifyAnimationMessage(AnimationMessageType.PlayOnceComplete);
                }
                break;
        }
    }
View Full Code Here

Examples of it.timehero.example.slick.timehero.states.GameState

   */
  public void initStatesList(GameContainer container) {
    //TODO: attivare qui gli stati per riavere i menu!
    addState(new MenuState());
    addState(new HeroCreationState());
    addState(new GameState());
    addState(new MenuPauseState());
  }
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.