Skip to content

Commit 1fab0c8

Browse files
committed
online chess finished with voice
1 parent 6168d64 commit 1fab0c8

33 files changed

Lines changed: 1096 additions & 144 deletions

.idea/deploymentTargetSelector.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/kotlinc.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/other.xml

Lines changed: 100 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
alias(libs.plugins.android.application)
3+
alias(libs.plugins.kotlin.android)
34
}
45

56
android {
@@ -11,7 +12,7 @@ android {
1112
minSdk = 31
1213
targetSdk = 34
1314
versionCode = 1
14-
versionName = "0.3.3"
15+
versionName = "0.4.0"
1516

1617
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
1718
}
@@ -26,8 +27,8 @@ android {
2627
}
2728
}
2829
compileOptions {
29-
sourceCompatibility = JavaVersion.VERSION_1_8
30-
targetCompatibility = JavaVersion.VERSION_1_8
30+
sourceCompatibility = JavaVersion.VERSION_17
31+
targetCompatibility = JavaVersion.VERSION_17
3132
}
3233
buildFeatures {
3334
viewBinding = true

app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,9 @@
4242
<activity
4343
android:name=".ui.list.DigitalLogic.RCA_Activity"
4444
android:exported="false" />
45-
<activity
46-
android:name=".ui.list.DarkReaderActivity"
47-
android:exported="false" />
4845
<activity
4946
android:name=".ui.list.LouderActivity"
5047
android:exported="false" />
51-
<activity
52-
android:name=".ui.list.snack.SnackStreetActivity"
53-
android:exported="false" />
5448
<activity
5549
android:name=".ui.list.wall.WallActivity"
5650
android:exported="false" />
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package xyz.shurlin.demo2.data;
2+
3+
import java.time.LocalDateTime;
4+
5+
public class ChessHistoryItem {
6+
public String user1;
7+
public String user2;
8+
public String state;
9+
public String time;
10+
11+
public ChessHistoryItem(String user1, String user2, String state, String time) {
12+
this.user1 = user1;
13+
this.user2 = user2;
14+
this.time = time;
15+
this.state = state;
16+
}
17+
}

app/src/main/java/xyz/shurlin/demo2/data/network/chess/ChessStateDto.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
public class ChessStateDto {
55
public String type = "CHESS_STATE";
66
public Long gameId;
7+
public String playerRed;
8+
public String playerBlack;
79
public String[][] board; // [9][10]
810
public int lastMoveIndex; // -1 表示无步
911
public String turn; // "red" or "black"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package xyz.shurlin.demo2.data.network.chess;
2+
3+
public class GameEnd {
4+
public String type;
5+
public Long gameId;
6+
public String winner;
7+
8+
public GameEnd(Long gameId, String winner) {
9+
this.type = "GAME_END";
10+
this.gameId = gameId;
11+
this.winner = winner;
12+
}
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package xyz.shurlin.demo2.data.network.chess;
2+
3+
public class GameGiveUp {
4+
public String type;
5+
public Long gameId;
6+
public String loser;
7+
8+
public GameGiveUp(Long gameId, String loser) {
9+
this.type = "GAME_GIVE_UP";
10+
this.gameId = gameId;
11+
this.loser = loser;
12+
}
13+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package xyz.shurlin.demo2.data.network.chess;
2+
3+
public class GameRestart {
4+
public String type;
5+
public Long gameId;
6+
7+
public GameRestart(Long gameId) {
8+
this.type = "GAME_RESTART";
9+
this.gameId = gameId;
10+
}
11+
}

0 commit comments

Comments
 (0)