Commit 381cb11d authored by Jilin Zheng's avatar Jilin Zheng
Browse files

Merge branch 'testing' into 'master'

Testing

See merge request ec327_projects/group3project!16
parents 93d0f052 d186ccba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
    <facet type="android-gradle" name="Android-Gradle">
      <configuration>
        <option name="GRADLE_PROJECT_PATH" value=":app" />
        <option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" value="7.4.2" />
        <option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" />
        <option name="LAST_KNOWN_AGP_VERSION" value="7.4.2" />
      </configuration>
    </facet>
+0 −2
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@
    <content url="file://$MODULE_DIR$/../../../app/build/generated/aidl_source_output_dir/debug/out" />
    <content url="file://$MODULE_DIR$/../../../app/build/generated/ap_generated_sources/debug/out">
      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/ap_generated_sources/debug/out" isTestSource="false" generated="true" />
      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/ap_generated_sources/debug/out" isTestSource="false" generated="true" />
    </content>
    <content url="file://$MODULE_DIR$/../../../app/build/generated/renderscript_source_output_dir/debug/out" />
    <content url="file://$MODULE_DIR$/../../../app/build/generated/res/resValues/debug">
@@ -29,7 +28,6 @@
    <content url="file://$MODULE_DIR$/../../../app/build/generated/res/rs/debug" />
    <content url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/debug">
      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
    </content>
    <content url="file://$MODULE_DIR$/../../../app/src/debug" />
    <content url="file://$MODULE_DIR$/../../../app/src/main">
+31 −22
Original line number Diff line number Diff line
@@ -9,15 +9,10 @@
    <option name="autoReloadType" value="NONE" />
  </component>
  <component name="ChangeListManager">
    <list default="true" id="8333e8ef-d99f-4734-9d8f-4661acd87ba6" name="Changes" comment="initial setup of all screens (activities)">
      <change beforePath="$PROJECT_DIR$/.gradle/7.5/executionHistory/executionHistory.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/7.5/executionHistory/executionHistory.lock" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/.gradle/7.5/fileHashes/fileHashes.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/7.5/fileHashes/fileHashes.bin" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/.gradle/7.5/fileHashes/fileHashes.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/7.5/fileHashes/fileHashes.lock" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/.gradle/buildOutputCleanup/buildOutputCleanup.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/buildOutputCleanup/buildOutputCleanup.lock" afterDir="false" />
    <list default="true" id="8333e8ef-d99f-4734-9d8f-4661acd87ba6" name="Changes" comment="link MainActivity to EnterNameScreen">
      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/app/src/main/AndroidManifest.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/AndroidManifest.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/app/src/main/res/values/themes.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values/themes.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/local.properties" beforeDir="false" afterPath="$PROJECT_DIR$/local.properties" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/app/src/main/java/com/example/aritetrisburg/MainActivity.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/com/example/aritetrisburg/MainActivity.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/app/src/main/java/com/example/aritetrisburg/Tetramino.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/com/example/aritetrisburg/Tetramino.java" afterDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -96,25 +91,28 @@
    <option name="hideEmptyMiddlePackages" value="true" />
    <option name="showLibraryContents" value="true" />
  </component>
  <component name="PropertiesComponent">{
  &quot;keyToString&quot;: {
    &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
    &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
    &quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;,
    &quot;android-custom-viewC:/Users/peng_/AppData/Local/Android/Sdk/sources/android-33/android/widget/Button.java_SELECTED&quot;: &quot;Button&quot;,
    &quot;cidr.known.project.marker&quot;: &quot;true&quot;,
    &quot;last_directory_selection&quot;: &quot;C:/Users/Jilin/Desktop/group3project/app/src/main/res/drawable&quot;,
    &quot;last_opened_file_path&quot;: &quot;C:/Users/peng_/AndroidStudioProjects/PlayboyBunny&quot;,
    &quot;settings.editor.selected.configurable&quot;: &quot;vcs.Git&quot;
  <component name="PropertiesComponent"><![CDATA[{
  "keyToString": {
    "RunOnceActivity.OpenProjectViewOnStart": "true",
    "RunOnceActivity.ShowReadmeOnStart": "true",
    "RunOnceActivity.cidr.known.project.marker": "true",
    "android-custom-viewC:/Users/peng_/AppData/Local/Android/Sdk/sources/android-33/android/widget/Button.java_SELECTED": "Button",
    "cidr.known.project.marker": "true",
    "last_directory_selection": "C:/Users/Jilin/Desktop/group3project/app/src/main/res/drawable",
    "last_opened_file_path": "C:/Users/Jilin/Desktop/group3project/app/src/main/java/com/example/aritetrisburg",
    "settings.editor.selected.configurable": "vcs.Git"
  }
}</component>
}]]></component>
  <component name="RecentsManager">
    <key name="CreateClassDialog.RecentsKey">
      <recent name="com.example.aritetrisburg" />
    </key>
    <key name="CopyFile.RECENT_KEYS">
      <recent name="C:\Users\Jilin\Desktop\group3project\app\src\main\java\com\example\aritetrisburg" />
      <recent name="C:\Users\Jilin\Desktop\group3project\app\src\main\res\layout" />
      <recent name="C:\Users\Jilin\Desktop\group3project\app\src\main\res\values" />
      <recent name="C:\Users\Jilin\Desktop\group3project\app\src\main\res" />
      <recent name="C:\Users\Jilin\Desktop\group3project\app\src\main\res\drawable" />
      <recent name="C:\Users\Jilin\Desktop\group3project\app\src\main\res\font" />
    </key>
    <key name="android.template.-851266308">
      <recent name="com.example.aritetrisburg" />
@@ -122,6 +120,9 @@
    <key name="android.template.1438731553">
      <recent name="com.example.aritetrisburg" />
    </key>
    <key name="CopyClassDialog.RECENTS_KEY">
      <recent name="com.example.aritetrisburg" />
    </key>
  </component>
  <component name="RunManager">
    <configuration name="app" type="AndroidRunConfigurationType" factoryName="Android App">
@@ -206,7 +207,14 @@
      <option name="project" value="LOCAL" />
      <updated>1682278774054</updated>
    </task>
    <option name="localTasksCounter" value="3" />
    <task id="LOCAL-00003" summary="link MainActivity to EnterNameScreen">
      <created>1682643987484</created>
      <option name="number" value="00003" />
      <option name="presentableId" value="LOCAL-00003" />
      <option name="project" value="LOCAL" />
      <updated>1682643987484</updated>
    </task>
    <option name="localTasksCounter" value="4" />
    <servers />
  </component>
  <component name="Vcs.Log.Tabs.Properties">
@@ -224,6 +232,7 @@
    <MESSAGE value="upload empty project" />
    <MESSAGE value="update issue 6 branch" />
    <MESSAGE value="initial setup of all screens (activities)" />
    <option name="LAST_COMMIT_MESSAGE" value="initial setup of all screens (activities)" />
    <MESSAGE value="link MainActivity to EnterNameScreen" />
    <option name="LAST_COMMIT_MESSAGE" value="link MainActivity to EnterNameScreen" />
  </component>
</project>
 No newline at end of file
+19 −1
Original line number Diff line number Diff line
@@ -11,9 +11,26 @@
        android:supportsRtl="true"
        android:theme="@style/Theme.AriTetrisburg"
        tools:targetApi="31">

        <activity
            android:name=".BasicBlock"
            android:exported="false" />
        <activity
            android:name=".Coordinate"
            android:exported="false" />
        <activity
            android:name=".DrawView"
            android:exported="false" />
        <activity
            android:name=".GameOverScreen"
            android:name=".GameState"
            android:exported="false" />
        <activity
            android:name=".MainActivity"
            android:exported="false" />
        <activity
            android:name=".Tetramino"
            android:exported="false" />

        <activity
            android:name=".ScoreLeaderboardScreen"
            android:exported="false" />
@@ -39,6 +56,7 @@
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>

</manifest>
 No newline at end of file
+52 −0
Original line number Diff line number Diff line
package com.example.aritetrisburg;

enum BasicBlockState {
    ON_EMPTY,
    ON_TETRAMINO
}

class BasicBlock {
    int colour;
    int tetraId;
    Coordinate coordinate;
    BasicBlockState state;

    BasicBlock(int row, int column) {
        this.colour = -1;
        this.tetraId = -1;
        this.coordinate = new Coordinate(row, column);
        this.state = BasicBlockState.ON_EMPTY;
    }

    BasicBlock(int colour, int tetraId, Coordinate coordinate, BasicBlockState state) {
        this.colour = colour;
        this.tetraId = tetraId;
        this.coordinate = coordinate;
        this.state = state;

    }

    BasicBlock copy() {

        return new BasicBlock(colour, tetraId, coordinate, state);
    }

    void set(BasicBlock B) {
        this.colour = B.colour;
        this.tetraId = B.tetraId;
        this.coordinate.y = B.coordinate.y;
        this.coordinate.x = B.coordinate.x;
        this.state = B.state;

    }

    void setEmptyBlock(Coordinate coordinate) {
        this.colour = -1;
        this.tetraId = -1;
        this.coordinate.x = coordinate.x;
        this.coordinate.y = coordinate.y;
        this.state = BasicBlockState.ON_EMPTY;

    }
}
Loading