Skip to content

Commit f72c4a4

Browse files
committed
fix bugs
1 parent 336c424 commit f72c4a4

25 files changed

+458
-236
lines changed

PROTOCOL.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This uses dart's [Socket](https://api.dart.dev/stable/3.3.0/dart-io/Socket-class
4242
`programCard` : `int8` - there are 5 `programCard`s, each one represents a program card slot in order from first register phase to last:
4343
- `0b1000_0001`: there is a program card there
4444
- `0b1000_0000`: there is not a program card there
45-
- anything else: there is a face-up program card there. The program cards are listed in order in [this file](program_cards.txt).
45+
- anything else: there is a face-up program card there. The program cards are listed in order in [this file](roborally_server/program_cards.txt).
4646

4747
`optionCardCount` : `int8` - How many option cards this robot has. This number cannot be above 26, as there are only 26 option cards.<br>
4848
`optionCards` : `int8` x `optionCardCount` - For each option card, the index of the option card. These option cards are listed in order in [this file](roborally_client/option_cards.txt). This number cannot be above 25.<br>

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ This is a game (based on [this board game](https://en.wikipedia.org/wiki/RoboRal
77
1 tablet/laptop/desktop (the "server device")<br>
88

99
## Before the game
10-
Create a file called `servers.cfg` with each line following this format:
10+
Create a file called `servers.cfg` in `roborally_client` with each line following this format:
1111
```
1212
<server ip> <server name>
1313
```
1414
Server IP is the IP of the server device.<br>
1515
Server Name is what you want to call this server device.<br>
16+
When running the client, each line will be a server device you can connect to.
1617
<br>
1718
Install [Flutter](https://docs.flutter.dev/get-started) on a computer.
1819
In the `roborally_client` folder,

roborally_client/.metadata

+15-15
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "d05eaf4a98f215b768a54bb055c1a867d3d1daf1"
7+
revision: "fe598e7d6f22e176499ede063572aafd9a9ef2b9"
88
channel: "main"
99

1010
project_type: app
@@ -13,26 +13,26 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: d05eaf4a98f215b768a54bb055c1a867d3d1daf1
17-
base_revision: d05eaf4a98f215b768a54bb055c1a867d3d1daf1
16+
create_revision: fe598e7d6f22e176499ede063572aafd9a9ef2b9
17+
base_revision: fe598e7d6f22e176499ede063572aafd9a9ef2b9
1818
- platform: android
19-
create_revision: d05eaf4a98f215b768a54bb055c1a867d3d1daf1
20-
base_revision: d05eaf4a98f215b768a54bb055c1a867d3d1daf1
19+
create_revision: fe598e7d6f22e176499ede063572aafd9a9ef2b9
20+
base_revision: fe598e7d6f22e176499ede063572aafd9a9ef2b9
2121
- platform: ios
22-
create_revision: d05eaf4a98f215b768a54bb055c1a867d3d1daf1
23-
base_revision: d05eaf4a98f215b768a54bb055c1a867d3d1daf1
22+
create_revision: fe598e7d6f22e176499ede063572aafd9a9ef2b9
23+
base_revision: fe598e7d6f22e176499ede063572aafd9a9ef2b9
2424
- platform: linux
25-
create_revision: d05eaf4a98f215b768a54bb055c1a867d3d1daf1
26-
base_revision: d05eaf4a98f215b768a54bb055c1a867d3d1daf1
25+
create_revision: fe598e7d6f22e176499ede063572aafd9a9ef2b9
26+
base_revision: fe598e7d6f22e176499ede063572aafd9a9ef2b9
2727
- platform: macos
28-
create_revision: d05eaf4a98f215b768a54bb055c1a867d3d1daf1
29-
base_revision: d05eaf4a98f215b768a54bb055c1a867d3d1daf1
28+
create_revision: fe598e7d6f22e176499ede063572aafd9a9ef2b9
29+
base_revision: fe598e7d6f22e176499ede063572aafd9a9ef2b9
3030
- platform: web
31-
create_revision: d05eaf4a98f215b768a54bb055c1a867d3d1daf1
32-
base_revision: d05eaf4a98f215b768a54bb055c1a867d3d1daf1
31+
create_revision: fe598e7d6f22e176499ede063572aafd9a9ef2b9
32+
base_revision: fe598e7d6f22e176499ede063572aafd9a9ef2b9
3333
- platform: windows
34-
create_revision: d05eaf4a98f215b768a54bb055c1a867d3d1daf1
35-
base_revision: d05eaf4a98f215b768a54bb055c1a867d3d1daf1
34+
create_revision: fe598e7d6f22e176499ede063572aafd9a9ef2b9
35+
base_revision: fe598e7d6f22e176499ede063572aafd9a9ef2b9
3636

3737
# User provided section
3838

roborally_client/android/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
10-
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
# See https://flutter.dev/to/reference-keystore
1112
key.properties
1213
**/*.keystore
1314
**/*.jks

roborally_client/android/app/build.gradle

-58
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
plugins {
2+
id("com.android.application")
3+
id("kotlin-android")
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id("dev.flutter.flutter-gradle-plugin")
6+
}
7+
8+
android {
9+
namespace = "com.example.roborally_client"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
12+
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_11
15+
targetCompatibility = JavaVersion.VERSION_11
16+
}
17+
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_11.toString()
20+
}
21+
22+
defaultConfig {
23+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24+
applicationId = "com.example.roborally_client"
25+
// You can update the following values to match your application needs.
26+
// For more information, see: https://flutter.dev/to/review-gradle-config.
27+
minSdk = flutter.minSdkVersion
28+
targetSdk = flutter.targetSdkVersion
29+
versionCode = flutter.versionCode
30+
versionName = flutter.versionName
31+
}
32+
33+
buildTypes {
34+
release {
35+
// TODO: Add your own signing config for the release build.
36+
// Signing with the debug keys for now, so `flutter run --release` works.
37+
signingConfig = signingConfigs.getByName("debug")
38+
}
39+
}
40+
}
41+
42+
flutter {
43+
source = "../.."
44+
}

roborally_client/android/app/src/main/AndroidManifest.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
android:name=".MainActivity"
88
android:exported="true"
99
android:launchMode="singleTop"
10+
android:taskAffinity=""
1011
android:theme="@style/LaunchTheme"
1112
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1213
android:hardwareAccelerated="true"
@@ -31,7 +32,7 @@
3132
android:value="2" />
3233
</application>
3334
<!-- Required to query activities that can process text, see:
34-
https://developer.android.com/training/package-visibility?hl=en and
35+
https://developer.android.com/training/package-visibility and
3536
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
3637
3738
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->

roborally_client/android/app/src/main/kotlin/com/example/roborally_client/MainActivity.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ package com.example.roborally_client
22

33
import io.flutter.embedding.android.FlutterActivity
44

5-
class MainActivity: FlutterActivity()
5+
class MainActivity : FlutterActivity()

roborally_client/android/build.gradle

-18
This file was deleted.
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
allprojects {
2+
repositories {
3+
google()
4+
mavenCentral()
5+
}
6+
}
7+
8+
val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
9+
rootProject.layout.buildDirectory.value(newBuildDir)
10+
11+
subprojects {
12+
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
13+
project.layout.buildDirectory.value(newSubprojectBuildDir)
14+
}
15+
subprojects {
16+
project.evaluationDependsOn(":app")
17+
}
18+
19+
tasks.register<Delete>("clean") {
20+
delete(rootProject.layout.buildDirectory)
21+
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
1+
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true

roborally_client/android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip

roborally_client/android/settings.gradle

-25
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
pluginManagement {
2+
val flutterSdkPath = run {
3+
val properties = java.util.Properties()
4+
file("local.properties").inputStream().use { properties.load(it) }
5+
val flutterSdkPath = properties.getProperty("flutter.sdk")
6+
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
7+
flutterSdkPath
8+
}
9+
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11+
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
17+
}
18+
19+
plugins {
20+
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
21+
id("com.android.application") version "8.7.0" apply false
22+
id("org.jetbrains.kotlin.android") version "1.8.22" apply false
23+
}
24+
25+
include(":app")

0 commit comments

Comments
 (0)