Skip to content

Commit

Permalink
don't show computer words if not ready
Browse files Browse the repository at this point in the history
  • Loading branch information
aviaryan committed Nov 27, 2016
1 parent 786d425 commit 916681a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/in/aviaryan/hinix/GameBoard.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void makeBoard(int n, int m){
rowCount = n;
colCount = m;
int maxWordLen = Math.max(n, m) + 4;
int triesLimit = Math.max(n, m) < 5 ? 4 : 2;
int triesLimit = Math.max(n, m) < 5 ? 3 : 2;
int i, j;
int dictSize = wordList.size();
// clear the board
Expand Down
11 changes: 7 additions & 4 deletions app/src/main/java/in/aviaryan/hinix/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ public class MainActivity extends AppCompatActivity {
private TextView userScore;
private String LOG_TAG = "log";

private int NUM_ROWS=8;
private int NUM_COLS=8;
private int fontSize=18;
private int NUM_ROWS = 8;
private int NUM_COLS = 8;
private int fontSize = 18;
private int counter=0;
private int computerScore;
private int computerScore = -1;

// Message Handler http://stackoverflow.com/questions/3391272/
private Handler handler_ = new Handler(){
Expand Down Expand Up @@ -327,6 +327,9 @@ private void initBoard(){
}

public void buttonShow(View view) {
if (computerScore == -1) // return if not ready
return;

AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
MainActivity.this);

Expand Down

0 comments on commit 916681a

Please sign in to comment.