Android Open Source - androidtbsgame Game Control






From Project

Back to project page androidtbsgame.

License

The source code is released under:

MIT License

If you think the Android project androidtbsgame listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package de.mmssb.androidtbsgame.andengine;
//w w  w  .  j  a  v a  2  s .  c o  m
import de.mmssb.androidtbsgame.andengine.entities.board.Board;

/**
 * @author Manu
 * 
 */
public class GameControl {
  private Model model;
  private int playerCount;

  /**
   * Creates an instance of {@link GameControl}
   * 
   * @param model
   *            {@link Model} - reference
   * @param playerCount
   */
  public GameControl(Model model, int playerCount) {
    this.model = model;
    float cellSideLength = model.getMainActivity().getSmoothCamera()
        .getWidth()
        * Board.DEFAULT_CELL_BOUNDS_FACTOR;
    model.getSceneManager()
        .getGameScene()
        .setBoard(
            new Board(model, model.getCellControl().getColumns(),
                model.getCellControl().getRows(),
                cellSideLength, cellSideLength));
  }

  public int getPlayerCount() {
    return playerCount;
  }

  public void setPlayerCount(int playerCount) {
    this.playerCount = playerCount;
  }
}




Java Source Code List

de.mmssb.androidtbsgame.andengine.BoardMap.java
de.mmssb.androidtbsgame.andengine.GameControl.java
de.mmssb.androidtbsgame.andengine.MainActivity.java
de.mmssb.androidtbsgame.andengine.Model.java
de.mmssb.androidtbsgame.andengine.entities.board.Board.java
de.mmssb.androidtbsgame.andengine.entities.board.Cell.java
de.mmssb.androidtbsgame.andengine.entities.board.Mark.java
de.mmssb.androidtbsgame.andengine.hud.ImageButtonSprite.java
de.mmssb.androidtbsgame.andengine.hud.ModelHUD.java
de.mmssb.androidtbsgame.andengine.managers.CellControl.java
de.mmssb.androidtbsgame.andengine.managers.Manager.java
de.mmssb.androidtbsgame.andengine.managers.ResourceManager.java
de.mmssb.androidtbsgame.andengine.managers.SceneManager.java
de.mmssb.androidtbsgame.andengine.managers.SharedPreferencesManager.java
de.mmssb.androidtbsgame.andengine.scenes.GameScene.java
de.mmssb.androidtbsgame.andengine.scenes.ModelScene.java
de.mmssb.androidtbsgame.andengine.units.AnimationProperties.java