Permalink
Browse files

menufix2

  • Loading branch information...
2 parents fa377f2 + ca03960 commit 17c768e31d6f829149bbe275879261f4dd7cc018 @dua-dua dua-dua committed Mar 12, 2012
@@ -1,13 +0,0 @@
-package no.ntnu.tdt4240;
-
-import android.app.Activity;
-import android.os.Bundle;
-
-public class AboutActivity extends Activity {
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.about);
- }
-}
@@ -1,30 +0,0 @@
-package no.ntnu.tdt4240;
-
-import android.graphics.Canvas;
-
-public class Blank extends Cell{
-
-
- private boolean isClicked;
- private Canvas image;
- private int mines;
- private int gold;
-
- Blank(Canvas image, int mines, int gold) {
- super(image);
- this.gold=gold;
- this.mines=mines;
- }
-
- @Override
- public void onClick() {
- if(isClicked=false){
- isClicked=true;
- //this.Image="";
- //gi turen til motstander
- }
- }
-
-
-
-}
@@ -1,17 +0,0 @@
-package no.ntnu.tdt4240;
-
-import android.graphics.Canvas;
-
-public abstract class Cell {
-
- private Canvas image;
- private boolean isClicked;
-
- Cell(Canvas image){
- this.image= image;
- isClicked=false;
- }
- public abstract void onClick();
-
-
-}
@@ -1,29 +0,0 @@
-package no.ntnu.tdt4240;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.view.Window;
-import android.view.WindowManager;
-
-public class GameActivity extends Activity {
-
-
- GameBoard Board;
-
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
-
- // hide title
- requestWindowFeature(Window.FEATURE_NO_TITLE);
-
- // Hide notification bar
- getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
-
- setContentView(R.layout.game);
-
- }
-
-}
@@ -1,20 +0,0 @@
-package no.ntnu.tdt4240;
-
-public class GameBoard {
-
- private Cell[][] gameBoard;
-
- GameBoard(int mines, int gold, int height, int width){
-
- this.gameBoard= new Cell[height][width];
-
-
- }
- private GameBoard CreateBoard(int gold, int mines){
- return null;
-
-
- }
-
-
-}
@@ -1,25 +0,0 @@
-package no.ntnu.tdt4240;
-
-import android.graphics.Canvas;
-
-public class Gold extends Cell{
-
-
- private boolean isClicked;
- private Canvas icon;
-
- Gold(Canvas image) {
- super(image);
- }
-
- @Override
- public void onClick() {
- if(isClicked=false){
- //update score
- //this.Image="";
- isClicked=true;
- }
- }
-
-
-}
@@ -1,55 +0,0 @@
-package no.ntnu.tdt4240;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.os.Bundle;
-import android.view.View;
-import android.view.Window;
-import android.view.WindowManager;
-
-public class MainMenuActivity extends Activity implements android.view.View.OnClickListener {
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- // Hide title
- requestWindowFeature(Window.FEATURE_NO_TITLE);
- // Hide notification bar
- getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
- setContentView(R.layout.main);
-
- // Click-handlers for buttons
- View newgameButton = findViewById(R.id.new_button);
- newgameButton.setOnClickListener(this);
- View settingsButton = findViewById(R.id.settings_button);
- settingsButton.setOnClickListener(this);
- View instructionsButton = findViewById(R.id.instructions_button);
- instructionsButton.setOnClickListener(this);
- View aboutButton = findViewById(R.id.about_button);
- aboutButton.setOnClickListener(this);
- View exitButton = findViewById(R.id.exit_button);
- exitButton.setOnClickListener(this);
-
- }
-
- public void onClick(View v) {
- switch (v.getId()) {
- case R.id.new_button:
- startActivity(new Intent(this, GameActivity.class));
- break;
- case R.id.settings_button:
- //startActivity(new Intent(this, SettingsActivity.class));
- break;
- case R.id.instructions_button:
- //startActivity(new Intent(this, InstructionActivity.class));
- break;
- case R.id.about_button:
- startActivity(new Intent(this, AboutActivity.class));
- break;
- case R.id.exit_button:
-
-
- }
- }
-
-}
@@ -1,26 +0,0 @@
-package no.ntnu.tdt4240;
-
-import android.graphics.Canvas;
-
-public class Mine extends Cell{
-
-
- private boolean isClicked;
- private Canvas icon;
-
- Mine(Canvas image) {
- super(image);
- }
-
- @Override
- public void onClick() {
- if(isClicked=false){
- isClicked=true;
- //this.Image="";
- //gi turen til motstander
- //update score
- }
- }
-
-
-}
@@ -1,22 +0,0 @@
-package no.ntnu.tdt4240;
-
-import android.os.Bundle;
-import android.preference.PreferenceActivity;
-import android.view.Window;
-import android.view.WindowManager;
-
-public class PreferencesActivity extends PreferenceActivity {
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- addPreferencesFromResource(R.xml.settings);
-
-// // Hide title
-// requestWindowFeature(Window.FEATURE_NO_TITLE);
-// // Hide notification bar
-// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
-
- }
-
-}
@@ -1,5 +0,0 @@
-package no.ntnu.tdt4240;
-
-public class TestClass {
-
-}

0 comments on commit 17c768e

Please sign in to comment.