Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Chor Chithya-Multiplayer App

Chor Chithya is a real-time multiplayer party game inspired by the traditional Indian game Chor–Police. The app allows multiple players to join a room, get random roles, and play interactively with friends.

---

## Features

- Multiplayer room creation & joining.

- Random role assignment.

- Real-time gameplay updates.

- Simple and interactive UI.

- Play with friends online.

---

## Tech Stack

- Language: Java

- UI Design: XML

- Database: Firebase Realtime Database (used for real-time multiplayer synchronization)

- IDE: Android Studio

- Build System: Gradle

---

## Project Structure

```bash
ChorChithyaMultiplayerApp/
├── app/
│ ├── release/
│ └── src/
│ ├── androidTest/
│ └── main/
│ ├── java/
│ │ └── com/
│ │ └── agpitcodeclub/
│ │ └── chorchithyamultiplayer/
│ │ ├── MainActivity.java
│ │ ├── DashboardActivity.java
│ │ ├── RoomActivity.java
│ │ └── GameActivity.java
│ └── res/
│ ├── layout/
│ │ ├── activity_main.xml
│ │ ├── activity_dashboard.xml
│ │ ├── activity_room.xml
│ │ └── activity_game.xml
│ ├── drawable/
│ └── mipmap-*/
└── build.gradle
```

---

## Download the App

🔗 [**Click here to download the latest APK**](https://play.google.com/store/apps/details?id=com.agpitcodeclub.chorchithyamultiplayer)

---
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ protected void onCreate(Bundle savedInstanceState) {
database = FirebaseDatabase.getInstance();

playerList = new ArrayList<>();
adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, playerList);
adapter = new ArrayAdapter<String>(this, R.layout.item_player, R.id.tvPlayerName, playerList);
listViewPlayers.setAdapter(adapter);


// 3. Get Data Safely
Bundle extras = getIntent().getExtras();
if (extras != null) {
Expand Down
33 changes: 20 additions & 13 deletions app/src/main/res/layout/activity_dashboard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,41 @@
android:orientation="vertical"
android:padding="20dp"
android:gravity="center_horizontal"
android:background="#FFEB3B"> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="🏆 FINAL RESULTS 🏆"
android:textSize="28sp"
android:textStyle="bold"
android:textColor="#3E2723"
android:layout_marginBottom="20dp"
android:gravity="center"/>
android:background="#FFEB3B">

<!-- Main Title -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="🏆 FINAL RESULTS 🏆"
android:textSize="28sp"
android:textStyle="bold"
android:textColor="#212121"
android:layout_marginBottom="20dp"
android:gravity="center"/>

<!-- Score List -->
<ListView
android:id="@+id/listViewScores"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginBottom="10dp"
android:background="#FFF9C4"
android:divider="#BDBDBD"
android:dividerHeight="1dp"
android:divider="#FBC02D"
android:dividerHeight="2dp"
android:padding="10dp"/>

<!-- Back Button -->
<Button
android:id="@+id/btnBackToMenu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="52dp"
android:text="Back to Main Menu"
android:textSize="18sp"
android:textStyle="bold"
android:backgroundTint="#FF5722"
android:textColor="#FFFFFF"
android:layout_marginTop="20dp"/>

</LinearLayout>
</LinearLayout>
8 changes: 5 additions & 3 deletions app/src/main/res/layout/activity_game.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
android:text="Your Name"
android:textSize="22sp"
android:textStyle="bold"
android:textColor="@color/text_primary"
android:textColor="#212121"
android:layout_marginBottom="20dp"/>

<androidx.cardview.widget.CardView
Expand Down Expand Up @@ -88,7 +88,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Keep this secret!"
android:textColor="@color/text_secondary"
android:textColor="#382621"
android:textSize="18sp"
android:textStyle="italic"/>

Expand All @@ -107,7 +107,9 @@
android:text="Tap the Chor:"
android:textStyle="bold"
android:textSize="18sp"
android:textColor="#F44336"/> <ListView
android:textColor="#F44336"/>

<ListView
android:id="@+id/listViewSuspects"
android:layout_width="match_parent"
android:layout_height="150dp"/>
Expand Down
12 changes: 7 additions & 5 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@
android:orientation="vertical"
android:gravity="center"
android:padding="24dp"
android:background="#FFEB3B"> <TextView
android:background="#FFEB3B">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Chor Chithya"
android:textSize="32sp"
android:textStyle="bold"
android:textColor="#3E2723"
android:textColor="#212121"
android:layout_marginBottom="8dp"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Multiplayer"
android:textSize="18sp"
android:textColor="#5D4037"
android:textColor="#382621"
android:layout_marginBottom="40dp"/>

<EditText
Expand All @@ -38,7 +40,7 @@
android:layout_height="60dp"
android:text="Create New Room"
android:backgroundTint="#FF5722"
android:textColor="#FFFFFF"
android:textColor="#382621"
android:layout_marginBottom="10dp"/>

<Button
Expand All @@ -47,6 +49,6 @@
android:layout_height="60dp"
android:text="Join Existing Room"
android:backgroundTint="#4CAF50"
android:textColor="#FFFFFF"/>
android:textColor="#382621"/>

</LinearLayout>
33 changes: 23 additions & 10 deletions app/src/main/res/layout/activity_room.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
android:text="Room Code: ..."
android:textSize="24sp"
android:textStyle="bold"
android:textColor="#3E2723"
android:textColor="#212121"
android:layout_marginBottom="10dp"/>

<TextView
Expand All @@ -24,41 +24,54 @@
android:text="Waiting for players..."
android:textSize="18sp"
android:textStyle="bold"
android:textColor="#382621"
android:layout_marginBottom="20dp"/>

<ListView
android:id="@+id/listViewPlayers"
<!-- Player List Container -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#FFF9C4"
android:layout_marginBottom="20dp"/>
android:padding="10dp"
android:layout_marginBottom="20dp">

<ListView
android:id="@+id/listViewPlayers"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:dividerHeight="8dp"
android:background="@android:color/transparent"/>
</LinearLayout>

<Button
android:id="@+id/btnShare"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="50dp"
android:text="Invite via WhatsApp"
android:textStyle="bold"
android:backgroundTint="#25D366"
android:textColor="#FFFFFF"/>
android:textColor="#382621"/>

<Button
android:id="@+id/btnReady"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="52dp"
android:text="I AM READY"
android:textStyle="bold"
android:backgroundTint="#FF9800"
android:textColor="#FFFFFF"
android:textColor="#382621"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:visibility="visible"/>

<Button
android:id="@+id/btnStartGame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="52dp"
android:text="Start Game"
android:textStyle="bold"
android:backgroundTint="#FF5722"
android:textColor="#FFFFFF"
android:textColor="#382621"
android:visibility="gone"/>
</LinearLayout>
17 changes: 17 additions & 0 deletions app/src/main/res/layout/item_player.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp"
android:orientation="vertical">

<!-- Player Name (MAIN TEXT) -->
<TextView
android:id="@+id/tvPlayerName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:textStyle="bold"
android:textColor="#212121"/>

</LinearLayout>