AboutDialog.java :  » Game » androidsgameoflife » at » bartinger » gameoflive » otherstuff » Android Open Source

Android Open Source » Game » androidsgameoflife 
androidsgameoflife » at » bartinger » gameoflive » otherstuff » AboutDialog.java
package at.bartinger.gameoflive.otherstuff;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

public class AboutDialog extends AlertDialog{

  public AboutDialog(Context context) {
    super(context);
    setTitle("Conway's Game of Life");
    setMessage("The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician  John Horton Conway in 1970.\n" +
        "The game is a zero-player game, meaning that its evolution is determined by its initial state.\n\n" +
        "Rules:\n" +
        "1. Any live cell with fewer than two live neighbours dies, as if caused by underpopulation. \n" +
        "2. Any live cell with more than three live neighbours dies, as if by overcrowding.\n" +
        "3. Any live cell with two or three live neighbours lives on to the next generation.\n" +
        "4. Any dead cell with exactly three live neighbours becomes a live cell.\n");
    setButton("OK", new OnClickListener() {
    
      
      @Override
      public void onClick(DialogInterface dialog, int which) {
        dismiss();
        
      }
    });
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.