.


:




:

































 

 

 

 





 

, , :

84,0-106,7 ;

, .

 

 

 

() :

Android 1 ,

512 ,

800x1280

2 .

 

 

 

Krec Android 4.1 .

 

()

 

 

Krec 9+.

 

 

 

Krec -. , Krec.apk , , . .

 

 

 

3.2.1 -

 

( 1).

1 -

 

, -. . 9 . , , . ( ) , . 2 .

 

 

2

 

 

Krec () .

Krec Android.

 

 

 

() Krec:
1. - , () .

2. - , () .

3. - , , () .

 

 

krec.java

 

 

packagecom.android.project;

 

importandroid.app.Activity;

importandroid.app.Dialog;

importandroid.os.Bundle;

importandroid.view.Menu;

importandroid.view.MenuItem;

importandroid.view.View;

importandroid.view.View.OnClickListener;

importandroid.widget.ImageButton;

importandroid.widget.ImageView;

public class Krec extends Activity {

 

/** */

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.welcome);

 

finalImageViewiv_new_game = (ImageView) findViewById(R.id.new_game);

 

iv_new_game.setOnClickListener(welcome_listener);

}

 

publicbooleanarr_isFull () {

for (inti = 0; i< 3; i++)

for (int j = 0; j < 3; j++)

if (arr[i][j] == 0)

return false;

return true;

}

 

 

// _

public void new_game(CharSequenceplayer_name) {

 

setContentView (skin_layout);

 

finalImageButton b3 = (ImageButton) findViewById(R.id.b3);

finalImageButton b2 = (ImageButton) findViewById(R.id.b2);

finalImageButton b1 = (ImageButton) findViewById(R.id.b1);

 

finalImageButton b6 = (ImageButton) findViewById(R.id.b6);

finalImageButton b5 = (ImageButton) findViewById(R.id.b5);

finalImageButton b4 = (ImageButton) findViewById(R.id.b4);

 

finalImageButton b9 = (ImageButton) findViewById(R.id.b9);

finalImageButton b8 = (ImageButton) findViewById(R.id.b8);

finalImageButton b7 = (ImageButton) findViewById(R.id.b7);

 

// OnClickListeners.

b1.setOnClickListener(button_listener);

b2.setOnClickListener(button_listener);

b3.setOnClickListener(button_listener);

b4.setOnClickListener(button_listener);

b5.setOnClickListener(button_listener);

b6.setOnClickListener(button_listener);

b7.setOnClickListener(button_listener);

b8.setOnClickListener(button_listener);

b9.setOnClickListener(button_listener);

 

// .

b1.setClickable(true);

b2.setClickable(true);

b3.setClickable(true);

b4.setClickable(true);

b5.setClickable(true);

b6.setClickable(true);

b7.setClickable(true);

b8.setClickable(true);

b9.setClickable(true);

 

 

publicbooleancomp_gameblock () {

 

inti, k = 0;

for (i = 0; i< 8; i++)

if ((analysis_arr[i][0] == 0) && (analysis_arr[i][1] == 0)) {

flag = true;

break;

}

 

if (flag == true) {

 

if (i<1) {

//

for (int j = 0; j <1; j++)

if (arr[i][j] == 0) {

comp_play(i, j);

return true;

}

}

else if (i< 6) {

for (int j = 0; j <1; j++)

if (arr[j][i - 1] == 0) {

comp_play(j, (i - 1));

return true;

}

}

else if (i == 6) {

for (int j = 0; j <1; j++) {

if (arr[j][k] == 0) {

comp_play(j, k);

return true;

}

k++;

}

}

else if (i == 7) {

 

for (int j = 0; j <1; j++) {

if (arr[j][k] == 0) {

comp_play(j, k);

return true;

}

k--;

}

}

}

 

 

Layout start

 

 

<?xml version="1.0" encoding="utf-8"?>

<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"

android:orientation="vertical"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:soundEffectsEnabled="true">

<Button android:id="@+id/startbutton"

android:layout_width="300dip"

android:layout_height="60dip"

android:layout_marginTop="170dip"

android:layout_marginLeft="170dip"

android:layout_marginRight="170dip"

android:text="Start!" />

</LinearLayout>

 

 


1) 19.101-77 .

2) 19.103-77 .

3) 19.104-78* .

4) 19.105-78* .

5) 19.106-78* . ,

6) 19.505-79* . .

7) 19.604-78* . ,





:


: 2016-09-06; !; : 467 |


:

:

- , - .
==> ...

1468 - | 1388 -


© 2015-2024 lektsii.org - -

: 0.019 .