diff --git a/app/src/main/java/edu/hzuapps/androidworks/homeworks/net1314080903138/Net1314080903138ChessBoard.java b/app/src/main/java/edu/hzuapps/androidworks/homeworks/net1314080903138/Net1314080903138ChessBoard.java new file mode 100644 index 00000000..167c10e9 --- /dev/null +++ b/app/src/main/java/edu/hzuapps/androidworks/homeworks/net1314080903138/Net1314080903138ChessBoard.java @@ -0,0 +1,446 @@ +package edu.hzuapps.androidworks.homeworks.net1314080903138; + + +import android.app.AlertDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.util.AttributeSet; +import android.view.Gravity; +import android.view.MotionEvent; +import android.view.View; +import android.widget.GridLayout; +import android.widget.Toast; + + +/** + * Created by Administrator on 2016/4/26. + */ +public class Net1314080903138ChessBoard extends GridLayout { + public Net1314080903138ChessBoard(Context context) { + super(context); + initChessBoard(); + } + + public Net1314080903138ChessBoard(Context context, AttributeSet attrs) { + super(context, attrs); + initChessBoard(); + + } + + public Net1314080903138ChessBoard(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + initChessBoard(); + + } + + private void initChessBoard(){ + + //设置边界 + for(int y=0; y<10; y++){ + for(int x=0; x<10; x++){ + if(x==0||x==9||y==0||y==9){ + cardsMap[x][y] = new Net1314080903138Card(getContext()); + cardsMap[x][y].setNum(3); + } + } + } + + setOnTouchListener(new View.OnTouchListener() { + int x; + int y; + + @Override + public boolean onTouch(View v, MotionEvent event) { + if (event.getAction() == MotionEvent.ACTION_DOWN) { + + //getSituation(); + + //相对于父组件的坐标 + x = (int) event.getX(); + y = (int) event.getY(); + + //在竖屏是,width 比 height 短; 在横屏的时候, height 比 width 短。 + int length = Math.min(getWidth(), getHeight()) / 8; + + //row 和 colu 的值在任何时候应该都小于9 + int row = (int) Math.floor(y / length) + 1; + int colu = (int) Math.floor(x / length) + 1; + + if (row < 9 && colu < 9) { + int[] temp = isValid(colu, row, current_color); + + + if (temp != null) { +// //************************** Test Information *************************************** +// System.out.println("Position: (" + colu + ", " + row + ") is valid!!"); +// for (int i = 0; i < 10; i++) { +// for (int j = 0; j < 10; j++) { +// System.out.print(temp[i * 10 + j] + ""); +// } +// System.out.println(); +// } +// //************************** Test Information *************************************** + + + + getSituation(); + blackCount = 0; + whiteCount = 0; + + Net1314080903138Game.getGame().setRetractCount(0); + Net1314080903138Game.getGame().setNotfirstStep(true); + + for (int y = 1; y <= 8; y++) { + for (int x = 1; x <= 8; x++) { + //对棋盘进行刷新 + cardsMap[x][y].setNum(temp[10 * y + x]); + + switch (temp[10 * y + x]) { + case 1: + blackCount++; + break; + case 2: + whiteCount++; + break; + default: + break; + } + } + } + + emptyCount = 64 - blackCount - whiteCount; + Net1314080903138Game.getGame().setTvBlackCount(blackCount); + Net1314080903138Game.getGame().setTvWhiteCount(whiteCount); + + load(); + current_color = 3 - current_color; + Net1314080903138Game.getGame().setIvCurrentTurn(current_color); + hint(); + + if (pass(current_color)) { + //Toast.makeText(getContext(), "No valid empty position", Toast.LENGTH_SHORT).show(); + AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); + builder.setMessage("No valid empty position." + "\n" + "Please pass to the rival!"); + builder.setView(Net1314080903138Game.getGame().getLlDialog(5)); + builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + passTimes++; + current_color = 3 - current_color; + hint(); + Net1314080903138Game.getGame().setIvCurrentTurn(current_color); + dialog.dismiss(); + } + }); + +// builder.setNegativeButton("No", new DialogInterface.OnClickListener() { +// @Override +// public void onClick(DialogInterface dialog, int which) { +// dialog.dismiss(); +// } +// }); + builder.create().show(); + +// passTimes++; +// current_color = 3 - current_color; +// hint(); + + + } else { + passTimes = 0; + } + + if (emptyCount == 0 || passTimes > 1) { + int winer; + + if (blackCount > whiteCount) { + winer = 1; + } else if (blackCount < whiteCount) { + winer = 2; + } else { + winer = 0; + } + AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); + builder.setMessage("The game is over. " + "\n" + "Do you want to start a new game?"); + builder.setView(Net1314080903138Game.getGame().getLlDialog(winer)); + builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + startNewGame(); + dialog.dismiss(); + } + }); + + builder.setNegativeButton("No", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + } + }); + builder.create().show(); + } + + } else { + Toast.makeText(getContext(), "This position is invalid!", Toast.LENGTH_SHORT).show(); + } + } + + //cardsMap[colu][row].setNum(1); +// System.out.println((colu + "") + "---" + (row + "")); + } + return true; + } + }); + } + + public void startNewGame(){ + //初始化棋盘 + for(int y=1; y<=8; y++){ + for(int x=1; x<=8; x++){ + cardsMap[x][y].setNum(0); + } + } + + cardsMap[4][4].setNum(2); + cardsMap[5][5].setNum(2); + cardsMap[4][5].setNum(1); + cardsMap[5][4].setNum(1); + blackCount = 2; + whiteCount = 2; + + //清除比分等记录 + Net1314080903138Game.getGame().clearRecord(); + + //黑子先走 + current_color = 1; + + //重新载入棋盘的情况 + load(); + getSituation(); + + hint(); + Net1314080903138Game.getGame().setNotfirstStep(false); + + } + + public void retract(){ + for(int y=1; y<=8; y++){ + for(int x=1; x<=8; x++){ + cardsMap[x][y].setNum(preSituation[10*y+x]); + } + } + + emptyCount = 64 - blackCount - whiteCount; + Net1314080903138Game.getGame().setTvBlackCount(blackCount); + Net1314080903138Game.getGame().setTvWhiteCount(whiteCount); + + load(); + //current_color = 3-current_color; + current_color = preCurrentcolor; + passTimes=0; + Net1314080903138Game.getGame().setIvCurrentTurn(current_color); + + if(hint_on_off){ + for(int y=1; y<=8; y++){ + for(int x=1; x<=8; x++){ + if((isValid(x,y,current_color) != null)){ + cardsMap[x][y].setHint(); + } + } + } + } + + } + + private void getSituation(){ + for(int y=0; y<100; y++){ + preSituation[y] = situation[y]; + } + + preBlackCount = blackCount; + preWhiteCount = whiteCount; + preCurrentcolor = current_color; + } + + @Override + protected void onSizeChanged(int w, int h, int oldw, int oldh) { + Net1314080903138Card net1314080903138Card; + super.onSizeChanged(w, h, oldw, oldh); + int width = this.getWidth(); + int height = this.getHeight(); + int cardWidth = (Math.min(width, height)-4)/8; + + for(int y=1; y<=8; y++){ + for(int x=1; x<=8; x++){ + //card = new Card(getContext(),x,y); + net1314080903138Card = new Net1314080903138Card(getContext()); + GridLayout.Spec rowSpec = GridLayout.spec(y-1); + GridLayout.Spec ColumnSpec = GridLayout.spec(x-1); + GridLayout.LayoutParams params = new GridLayout.LayoutParams(rowSpec, ColumnSpec); + params.width = cardWidth; + params.height = cardWidth; + params.setGravity(Gravity.TOP); + addView(net1314080903138Card, params); + + cardsMap[x][y] = net1314080903138Card; + } + } + + cardsMap[4][4].setNum(2); + cardsMap[5][5].setNum(2); + cardsMap[4][5].setNum(1); + cardsMap[5][4].setNum(1); + blackCount = 2; + Net1314080903138Game.getGame().setTvBlackCount(blackCount); + whiteCount = 2; + Net1314080903138Game.getGame().setTvWhiteCount(whiteCount); + emptyCount = 64 - blackCount - whiteCount; + + +// //************************** Test Information *************************************** +// System.out.println("************onSizechange: cardsMap************"); +// for(int y=0; y<10; y++){ +// for(int x=0; x<10; x++){ +// System.out.print(cardsMap[x][y].getNum()+" "); +// } +// System.out.println(); +// } +// //************************** Test Information *************************************** + + load(); + + } + + + private void load(){ + for(int y=0; y<10; y++){ + for(int x=0; x<10; x++){ + situation[y*10+x] = cardsMap[x][y].getNum(); + } + } + } + + //此轮是否没有可以下的位置了? 如果没有就轮到对手下 + private boolean pass(int current_color){ + if(emptyCount == 0){ + return false; + } + + boolean canPass = true; + + for(int y=1; y<=8; y++){ + for(int x=1; x<=8; x++){ + if((isValid(x,y,current_color) != null)){ + + canPass = false; + return canPass; + } + } + } + return canPass; + } + + private void hint(){ + if(hint_on_off){ + for(int y=1; y<=8; y++){ + for(int x=1; x<=8; x++){ + if((isValid(x,y,current_color) != null)){ + cardsMap[x][y].setHint(); + } + } + } + } + } + + private int[] isValid(int x, int y, int current_color){ + //load(); + boolean canKill = false; + + int[] tempSituation = situation.clone(); + +// //************************** Test Information *************************************** +// System.out.println("$$$$$$$$$$$$$$$$$$ isValid: tempSituation, the copy of situation $$$$$$$$$$$$$$$$$$$$$$"); +// for(int i=0; i<10; i++){ +// for(int j=0; j<10; j++){ +// System.out.print(tempSituation[i*10+j]+" "); +// } +// System.out.println(); +// } +// //************************** Test Information *************************************** + + //如果(x,y)不为空则不需要判断 + if(tempSituation[y*10+x]!=0) return null; + + //搜索(x,y)的八个方向,找可以吃的子 + for(int i=0; i<8; i++){ + int p =y*10+x+directions[i]; + + //如果在一个方向找到颜色不一样的子则往这个方向继续搜索 + if(tempSituation[p]==3-current_color){ + while(tempSituation[p]!=0 && tempSituation[p]!=3){ + p += directions[i]; + + //再找到一个同色的子就满足吃子的条件了 + if(tempSituation[p]==current_color){ + canKill=true; + + //将中间夹着的对手的子翻转 + while ((p = p-directions[i]) != 10*y+x){ + tempSituation[p] = current_color; + } + tempSituation[p] = current_color; + break; + } + + } + } + else{ + continue; + } + + } + + if(canKill){ + return tempSituation; + } + else{ + return null; + } + } + + public void hint_switch(){ + hint_on_off = !hint_on_off; + for(int y=1; y<=8; y++){ + for(int x=1; x<=8; x++){ + if((isValid(x,y,current_color) != null)){ + if(hint_on_off){ + cardsMap[x][y].setHint(); + } + else { + cardsMap[x][y].moveHInt(); + } + + + } + } + } + } + + private int[] directions = {-11,-10,-9,-1,1,9,10,11}; + private int[] situation = new int[100]; + private int[] preSituation = new int[100]; + private int emptyCount = 0; + private int preEmptyCount = 0; + private int blackCount = 0; + private int preBlackCount = 0; + private int whiteCount = 0; + private int preWhiteCount = 0; + private boolean hint_on_off = false; + + private Net1314080903138Card[][] cardsMap = new Net1314080903138Card[10][10]; + private int current_color=1; + private int passTimes = 0; + private int preCurrentcolor=1; + + +} diff --git a/app/src/main/java/edu/hzuapps/androidworks/homeworks/net1314080903138/Net1314080903138Game.java b/app/src/main/java/edu/hzuapps/androidworks/homeworks/net1314080903138/Net1314080903138Game.java new file mode 100644 index 00000000..9ee3354f --- /dev/null +++ b/app/src/main/java/edu/hzuapps/androidworks/homeworks/net1314080903138/Net1314080903138Game.java @@ -0,0 +1,189 @@ +package edu.hzuapps.androidworks.homeworks.net1314080903138; + +import android.app.Activity; +import android.app.AlertDialog; +import android.content.DialogInterface; +import android.os.SystemClock; +import android.os.Bundle; +import android.view.View; +import android.widget.Chronometer; +import android.widget.ImageButton; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; +import android.widget.Toast; + +public class Net1314080903138Game extends Activity { + + public Net1314080903138Game() { + Game = this; + } + + private ImageButton buttonNewGame; + private Net1314080903138ChessBoard Net1314080903138ChessBoard; + private TextView tvBlackCount; + private TextView tvWhiteCount; + private ImageView ivCurrentTurn; + private Chronometer chTime; + private ImageButton buttonRetract; + private ImageButton buttonHint; + + public LinearLayout getLlDialog(int i) { + LinearLayout llDialog = null; + switch (i){ + case 0: + llDialog = (LinearLayout) getLayoutInflater().inflate(R.layout.net1314080903138draw,null); + break; + case 1: + llDialog = (LinearLayout) getLayoutInflater().inflate(R.layout.net1314080903138black_win,null); + break; + case 2: + llDialog = (LinearLayout) getLayoutInflater().inflate(R.layout.net1314080903138white_win,null); + break; + case 3: + llDialog = (LinearLayout) getLayoutInflater().inflate(R.layout.net1314080903138retract,null); + break; + case 4: + llDialog = (LinearLayout) getLayoutInflater().inflate(R.layout.net1314080903138new_game_layout,null); + break; + case 5: + llDialog = (LinearLayout) getLayoutInflater().inflate(R.layout.net1314080903138pass,null); + break; + default: + break; + } + return llDialog; + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.net1314080903138activity_game); + + Net1314080903138ChessBoard = (Net1314080903138ChessBoard) findViewById(R.id.ChessBoard); + buttonNewGame = (ImageButton) findViewById(R.id.new_game); + tvBlackCount = (TextView) findViewById(R.id.black_count); + tvWhiteCount = (TextView) findViewById(R.id.white_count); + ivCurrentTurn = (ImageView) findViewById(R.id.current_turn); + chTime = (Chronometer) findViewById(R.id.cosumed_time); + buttonRetract = (ImageButton) findViewById(R.id.retract); + buttonHint = (ImageButton) findViewById(R.id.ButtonHint); + + toast = Toast.makeText(this, "Only one move can be retracted!", Toast.LENGTH_SHORT); + toast2 = Toast.makeText(this,"Please put the first move!",Toast.LENGTH_SHORT); + + chTime.setFormat("Timing: %s"); + chTime.setBase(SystemClock.elapsedRealtime()); + chTime.start(); + + buttonHint.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Net1314080903138ChessBoard.hint_switch(); + } + }); + + buttonNewGame.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + setNotfirstStep(false); + LinearLayout ll = getLlDialog(4); + + AlertDialog.Builder builder = new AlertDialog.Builder(Net1314080903138Game.this); + builder.setMessage("Are you sure to start a new game?"); + builder.setView(ll); + builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + Net1314080903138ChessBoard.startNewGame(); + } + }); + + builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + dialog.dismiss(); + } + }); + builder.create().show(); + } + }); + + buttonRetract.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if(!notfirstStep){ + toast2.show(); + return; + } + retractCount++; + + if(retractCount>=2){ + toast.show(); + } + else { + LinearLayout ll = getLlDialog(3); + + AlertDialog.Builder builder = new AlertDialog.Builder(Net1314080903138Game.this); + builder.setMessage("Are you sure to retract?"); + builder.setView(ll); + builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + Net1314080903138ChessBoard.retract(); + dialog.dismiss(); + } + }); + + builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + retractCount--; + dialog.dismiss(); + } + }); + builder.create().show(); + } + + } + }); + } + + public void clearRecord(){ + tvBlackCount.setText("2"); + tvWhiteCount.setText("2"); + ivCurrentTurn.setImageResource(R.drawable.net13140803138black_chess); + chTime.setBase(SystemClock.elapsedRealtime()); + chTime.start(); + } + + public void setIvCurrentTurn(int n){ + ivCurrentTurn.setImageResource(chessColor[n]); + } + + public void setTvBlackCount(int n){ + tvBlackCount.setText(n+""); + } + + public void setTvWhiteCount(int n){ + tvWhiteCount.setText(n+""); + } + + private static int[] chessColor = new int[] {0,R.drawable.net13140803138black_chess,R.drawable.net13140803138white_chess}; + private static Net1314080903138Game Game; + + public void setRetractCount(int retractCount) { + this.retractCount = retractCount; + } + + private int retractCount=0; + + public void setNotfirstStep(boolean b){ notfirstStep = b;} + private Toast toast,toast2; + private boolean notfirstStep=false; + + public static Net1314080903138Game getGame() { + return Game; + } +} diff --git a/app/src/main/java/edu/hzuapps/androidworks/homeworks/net1314080903138/Net1314080903138Sound.java b/app/src/main/java/edu/hzuapps/androidworks/homeworks/net1314080903138/Net1314080903138Sound.java new file mode 100644 index 00000000..8809c190 --- /dev/null +++ b/app/src/main/java/edu/hzuapps/androidworks/homeworks/net1314080903138/Net1314080903138Sound.java @@ -0,0 +1,57 @@ +package edu.hzuapps.androidworks.homeworks.net1314080903138; + +/** + * Created by Administrator on 2016/4/26. + */ +import android.app.Service; +import android.content.Intent; +import android.media.MediaPlayer; +import android.os.IBinder; + +public class Net1314080903138Sound extends Service { + private MediaPlayer mp; + + + @Override + public void onCreate() { + super.onCreate(); + mp = MediaPlayer.create(this, R.raw.net1314080903138dididi); + mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { + @Override + public void onCompletion(MediaPlayer mp) { + mp.start(); + mp.setLooping(true); + } + }); + + } + + @Override + public void onDestroy() { + super.onDestroy(); + mp.release(); + stopSelf(); + } + + @Override + public int onStartCommand(Intent intent, int flags, int startId) { + //boolean playing = intent.getBooleanExtra("playing", false); + //if (playing) { + if(!mp.isPlaying()){ + mp.start(); + } + return START_STICKY; +// //} else { +// mp.pause(); +// } + //return super.onStartCommand(intent, flags, startId); + } + + + + @Override + public IBinder onBind(Intent intent) { + return null; + } + +} \ No newline at end of file diff --git a/app/src/main/res/drawable/net13140803138a.png b/app/src/main/res/drawable/net13140803138a.png new file mode 100644 index 00000000..cd9b3ac4 Binary files /dev/null and b/app/src/main/res/drawable/net13140803138a.png differ diff --git a/app/src/main/res/drawable/net13140803138b.png b/app/src/main/res/drawable/net13140803138b.png new file mode 100644 index 00000000..a7eb903c Binary files /dev/null and b/app/src/main/res/drawable/net13140803138b.png differ diff --git a/app/src/main/res/drawable/net13140803138background.jpg b/app/src/main/res/drawable/net13140803138background.jpg new file mode 100644 index 00000000..8b37e2da Binary files /dev/null and b/app/src/main/res/drawable/net13140803138background.jpg differ diff --git a/app/src/main/res/drawable/net13140803138background2.png b/app/src/main/res/drawable/net13140803138background2.png new file mode 100644 index 00000000..23097b87 Binary files /dev/null and b/app/src/main/res/drawable/net13140803138background2.png differ diff --git a/app/src/main/res/drawable/net13140803138bar.png b/app/src/main/res/drawable/net13140803138bar.png new file mode 100644 index 00000000..369cc13e Binary files /dev/null and b/app/src/main/res/drawable/net13140803138bar.png differ diff --git a/app/src/main/res/drawable/net13140803138c.png b/app/src/main/res/drawable/net13140803138c.png new file mode 100644 index 00000000..7d16c4f2 Binary files /dev/null and b/app/src/main/res/drawable/net13140803138c.png differ diff --git a/app/src/main/res/drawable/net13140803138daojian.png b/app/src/main/res/drawable/net13140803138daojian.png new file mode 100644 index 00000000..8f1e622b Binary files /dev/null and b/app/src/main/res/drawable/net13140803138daojian.png differ diff --git a/app/src/main/res/drawable/net13140803138dialogbackground.png b/app/src/main/res/drawable/net13140803138dialogbackground.png new file mode 100644 index 00000000..69e9a502 Binary files /dev/null and b/app/src/main/res/drawable/net13140803138dialogbackground.png differ diff --git a/app/src/main/res/drawable/net13140803138hint.png b/app/src/main/res/drawable/net13140803138hint.png new file mode 100644 index 00000000..b503e757 Binary files /dev/null and b/app/src/main/res/drawable/net13140803138hint.png differ diff --git a/app/src/main/res/drawable/net13140803138icon.png b/app/src/main/res/drawable/net13140803138icon.png new file mode 100644 index 00000000..166e3d68 Binary files /dev/null and b/app/src/main/res/drawable/net13140803138icon.png differ diff --git a/app/src/main/res/drawable/net13140803138left.png b/app/src/main/res/drawable/net13140803138left.png new file mode 100644 index 00000000..1f718c13 Binary files /dev/null and b/app/src/main/res/drawable/net13140803138left.png differ diff --git a/app/src/main/res/drawable/net13140803138name.png b/app/src/main/res/drawable/net13140803138name.png new file mode 100644 index 00000000..9fef8314 Binary files /dev/null and b/app/src/main/res/drawable/net13140803138name.png differ diff --git a/app/src/main/res/drawable/net13140803138newgame.png b/app/src/main/res/drawable/net13140803138newgame.png new file mode 100644 index 00000000..f9a5389c Binary files /dev/null and b/app/src/main/res/drawable/net13140803138newgame.png differ diff --git a/app/src/main/res/drawable/net13140803138pass.png b/app/src/main/res/drawable/net13140803138pass.png new file mode 100644 index 00000000..f562670e Binary files /dev/null and b/app/src/main/res/drawable/net13140803138pass.png differ diff --git a/app/src/main/res/drawable/net13140803138q.png b/app/src/main/res/drawable/net13140803138q.png new file mode 100644 index 00000000..20a02953 Binary files /dev/null and b/app/src/main/res/drawable/net13140803138q.png differ diff --git a/app/src/main/res/drawable/net13140803138retract.png b/app/src/main/res/drawable/net13140803138retract.png new file mode 100644 index 00000000..cf66976f Binary files /dev/null and b/app/src/main/res/drawable/net13140803138retract.png differ diff --git a/app/src/main/res/drawable/net13140803138start.png b/app/src/main/res/drawable/net13140803138start.png new file mode 100644 index 00000000..9a440254 Binary files /dev/null and b/app/src/main/res/drawable/net13140803138start.png differ diff --git a/app/src/main/res/drawable/net13140803138top.png b/app/src/main/res/drawable/net13140803138top.png new file mode 100644 index 00000000..7911c990 Binary files /dev/null and b/app/src/main/res/drawable/net13140803138top.png differ diff --git a/app/src/main/res/drawable/net13140803138topboard.png b/app/src/main/res/drawable/net13140803138topboard.png new file mode 100644 index 00000000..f5f5bf74 Binary files /dev/null and b/app/src/main/res/drawable/net13140803138topboard.png differ diff --git a/app/src/main/res/drawable/net13140803138vs2.png b/app/src/main/res/drawable/net13140803138vs2.png new file mode 100644 index 00000000..964af303 Binary files /dev/null and b/app/src/main/res/drawable/net13140803138vs2.png differ diff --git a/app/src/main/res/drawable/net13140803138white_chess_t.png b/app/src/main/res/drawable/net13140803138white_chess_t.png new file mode 100644 index 00000000..aa87723a Binary files /dev/null and b/app/src/main/res/drawable/net13140803138white_chess_t.png differ diff --git a/app/src/main/res/drawable/net13140803138win.png b/app/src/main/res/drawable/net13140803138win.png new file mode 100644 index 00000000..b66d94cd Binary files /dev/null and b/app/src/main/res/drawable/net13140803138win.png differ diff --git a/app/src/main/res/raw/net1314080903138dididi.mp3 b/app/src/main/res/raw/net1314080903138dididi.mp3 new file mode 100644 index 00000000..05be80d8 Binary files /dev/null and b/app/src/main/res/raw/net1314080903138dididi.mp3 differ diff --git a/app/src/main/res/values-w820dp/net1314080903138styles.xml b/app/src/main/res/values-w820dp/net1314080903138styles.xml new file mode 100644 index 00000000..65d0c39d --- /dev/null +++ b/app/src/main/res/values-w820dp/net1314080903138styles.xml @@ -0,0 +1,8 @@ +> + + diff --git a/app/src/main/res/values/net13140803138dimens.xml b/app/src/main/res/values/net13140803138dimens.xml new file mode 100644 index 00000000..eb323271 --- /dev/null +++ b/app/src/main/res/values/net13140803138dimens.xml @@ -0,0 +1,8 @@ + + + 16dp + 16dp + 16dp + 40dp + 5dp + diff --git a/app/src/main/res/values/net1314080903138colors.xml b/app/src/main/res/values/net1314080903138colors.xml new file mode 100644 index 00000000..bd3445e5 --- /dev/null +++ b/app/src/main/res/values/net1314080903138colors.xml @@ -0,0 +1,6 @@ + + + #CCCC66 + #000000 + #FF4081 + diff --git a/app/src/main/res/values/net1314080903138strings.xml b/app/src/main/res/values/net1314080903138strings.xml new file mode 100644 index 00000000..a37c83aa --- /dev/null +++ b/app/src/main/res/values/net1314080903138strings.xml @@ -0,0 +1,9 @@ + + yjf黑白棋 + WHITE : + X + Retract + Hint Switch + New Game + Game + diff --git a/app/src/main/res/values/net1314080903138styles.xml b/app/src/main/res/values/net1314080903138styles.xml new file mode 100644 index 00000000..44f664f2 --- /dev/null +++ b/app/src/main/res/values/net1314080903138styles.xml @@ -0,0 +1,17 @@ + + + + + +