Android Open Source - Tic-Tac-Toe Difficulty Select






From Project

Back to project page Tic-Tac-Toe.

License

The source code is released under:

MIT License

If you think the Android project Tic-Tac-Toe 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.comp1008.AmmanVedi.TicTacToe;
/* w  w w .  ja v  a  2  s  . c o m*/
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;

public class DifficultySelect extends Activity {

  @Override
  protected void onCreate(Bundle savedInstanceState) 
  {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_difficulty_select);
  }

  @Override
  public boolean onCreateOptionsMenu(Menu menu) 
  {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.activity_difficulty_select, menu);
    return true;
  }
  
  public void startEasy(View v)
  {
    
    AIDrawView dv = new AIDrawView(this, 1);
    this.setContentView(dv);
    dv.requestFocus();
    
  }
  
  public void startMedium(View v)
  {
    AIDrawView dv = new AIDrawView(this, 2);
    this.setContentView(dv);
    dv.requestFocus();
  }
  
  public void startHard(View v)
  {
    AIDrawView dv = new AIDrawView(this, 3);
    this.setContentView(dv);
    dv.requestFocus();
  }
  
  public void showHighScores(View v)
  {
    Intent intentHS = new Intent(this, HighScores.class);
    startActivity(intentHS);
  }

}




Java Source Code List

com.comp1008.AmmanVedi.TicTacToe.AIDrawView.java
com.comp1008.AmmanVedi.TicTacToe.AIPlayer.java
com.comp1008.AmmanVedi.TicTacToe.DifficultySelect.java
com.comp1008.AmmanVedi.TicTacToe.DrawView.java
com.comp1008.AmmanVedi.TicTacToe.GameState.java
com.comp1008.AmmanVedi.TicTacToe.HighScores.java
com.comp1008.AmmanVedi.TicTacToe.SplashScreen.java
com.comp1008.AmmanVedi.TicTacToe.TicTacToeActivity.java
com.comp1008.AmmanVedi.TicTacToe.Tuple.java