Android Open Source - spacegunner Level Presenter Impl






From Project

Back to project page spacegunner.

License

The source code is released under:

MIT License

If you think the Android project spacegunner 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 com.example.spacegunner.level;
/*from  w ww.  j  a  v  a 2s.c o  m*/
import com.example.spacegunner.ioservice.PlayerHighscore;

public class LevelPresenterImpl implements LevelPresenter {

  private LevelView view;
  private LevelModel model;

  public LevelPresenterImpl(LevelView view, int level, int points) {
    super();
    this.view = view;
    this.model = new LevelModelImpl(level, points);
    this.view.displayLevelAndPoints(level, points);
  }

  @Override
  public void continueGameButtonClicked() {
    this.view.startGameView(model.getLevel(), model.getPoints());
  }

  @Override
  public void quitGameButtonClicked() {
    final int currentPoints = this.model.getPoints();
    this.view.startGameResultView(currentPoints);
  }

  @Override
  public void backButtonPressed() {
    this.view.startMainView();
  }

}




Java Source Code List

com.example.spacegunner.constants.Constants.java
com.example.spacegunner.game.GameModelImpl.java
com.example.spacegunner.game.GameModel.java
com.example.spacegunner.game.GamePresenterImpl.java
com.example.spacegunner.game.GamePresenter.java
com.example.spacegunner.game.GameViewImpl.java
com.example.spacegunner.game.GameView.java
com.example.spacegunner.gameresult.GameResultModelImpl.java
com.example.spacegunner.gameresult.GameResultModel.java
com.example.spacegunner.gameresult.GameResultPresenterImpl.java
com.example.spacegunner.gameresult.GameResultPresenter.java
com.example.spacegunner.gameresult.GameResultViewImpl.java
com.example.spacegunner.gameresult.GameResultView.java
com.example.spacegunner.ioservice.IOService.java
com.example.spacegunner.ioservice.PlayerHighscore.java
com.example.spacegunner.level.LevelModelImpl.java
com.example.spacegunner.level.LevelModel.java
com.example.spacegunner.level.LevelPresenterImpl.java
com.example.spacegunner.level.LevelPresenter.java
com.example.spacegunner.level.LevelViewImpl.java
com.example.spacegunner.level.LevelView.java
com.example.spacegunner.main.MainPresenterImpl.java
com.example.spacegunner.main.MainPresenter.java
com.example.spacegunner.main.MainViewImpl.java
com.example.spacegunner.main.MainView.java