Skip to content

Commit

Permalink
Code explanations
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenduk committed Apr 2, 2017
1 parent 0eeb5b0 commit 60a59b1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
import rx.Observable;

public class Presenter<E> extends RxPresenter<E> {
/*
* fixes RxPresenter view is null bug
* > call viewIfExists() instead of view()
*/
public Observable<E> viewIfExists() {
return view().filter(view -> view != null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
import kotlin.Pair;

public interface GameView {
/*
* shows Game Board with fields of appropriate size
*/
void showGameBoard(Board gameBoard, int gameSize);

/*
Expand All @@ -27,5 +30,8 @@ public interface GameView {
*/
void highlightWrongFields(List<Pair<Integer, Integer>> pairs);

/*
* updates TextView percent_counter with corresponding data
*/
void updatePercentStatus(int percent);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package net.zdendukmonarezio.takuzu.presentation.main;

interface MainView {
/*
* updates TextView score with appropriate data
*/
public void updateScore();
}

0 comments on commit 60a59b1

Please sign in to comment.