Android Open Source - BoggleGame User Interface






From Project

Back to project page BoggleGame.

License

The source code is released under:

MIT License

If you think the Android project BoggleGame 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.wordboggle;
/*w  w  w  . j ava  2s . c  om*/
import java.util.Random;


public class UserInterface {

  String [] alphabet= {"a","b","c","d","e","f",
            "g","h","i","j","k","l",
            "m","n","o","p","q","r",
            "s","t","u","v","w","x","y","z"};
  String [][] boggleBoard;
  Random randomGenerator;
  
  public UserInterface(){
    boggleBoard = new String[4][4];
    randomGenerator = new Random();
  }
  
  public void setBoard(){
    for(int i = 0; i < 4; ++i){
      for(int j = 0; j < 4; ++j){
        boggleBoard[i][j] = randomLetter();
      }
    }
  }
  
  public String getLetter(int x, int y){
    return boggleBoard[x][y];
  }
  
  private String randomLetter(){
    int randomInt = randomGenerator.nextInt(25);
    return alphabet[randomInt];
  }
  
  
}




Java Source Code List

com.example.wordboggle.BTManager.java
com.example.wordboggle.BasicModaActivity.java
com.example.wordboggle.BoggleBoard.java
com.example.wordboggle.Dictionary.java
com.example.wordboggle.DisplayDevices.java
com.example.wordboggle.GameActivity.java
com.example.wordboggle.GameManager.java
com.example.wordboggle.GridPoint.java
com.example.wordboggle.HelpActivity.java
com.example.wordboggle.MainActivity.java
com.example.wordboggle.NewGameActivity.java
com.example.wordboggle.PlayActivity.java
com.example.wordboggle.ScoreActivity.java
com.example.wordboggle.SquareLayout.java
com.example.wordboggle.SquareTextView.java
com.example.wordboggle.TwoPlayerGameActivity.java
com.example.wordboggle.TwoPlayerResults.java
com.example.wordboggle.UserInterface.java