<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/multiplayer_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/background_color"
    tools:context=".MultiplayerActivity">

    <LinearLayout
        android:id="@+id/multiplayerInfoPanel"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:padding="@dimen/padding_general"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <TextView
            android:id="@+id/myScoreLabelMulti"
            style="@style/ScoreLabelStyle"
            android:layout_weight="1"
            android:layout_marginEnd="@dimen/margin_between_elements"
            android:text="Mon Score:\n0" />

        <TextView
            android:id="@+id/turnIndicatorMulti"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:gravity="center"
            android:paddingStart="8dp" android:paddingEnd="8dp"
            android:textColor="@color/text_tile_low"
            android:textStyle="bold"
            android:textAppearance="?android:attr/textAppearanceMedium"
            tools:text="À votre tour"/>

        <TextView
            android:id="@+id/opponentScoreLabelMulti"
            style="@style/ScoreLabelStyle"
            android:layout_weight="1"
            android:layout_marginStart="@dimen/margin_between_elements"
            android:text="Adversaire:\n0" />
    </LinearLayout>

    <androidx.cardview.widget.CardView
        android:id="@+id/gameBoardContainerMulti"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="@dimen/padding_general"
        app:cardBackgroundColor="@android:color/transparent"
        app:cardCornerRadius="@dimen/corner_radius"
        app:cardElevation="0dp"
        app:layout_constraintTop_toBottomOf="@id/multiplayerInfoPanel"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintBottom_toTopOf="@+id/multiplayerStatusText">

        <androidx.gridlayout.widget.GridLayout
            android:id="@+id/gameBoardMulti"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/game_board_background"
            android:padding="@dimen/padding_game_board"
            app:columnCount="4"
            app:rowCount="4" />
    </androidx.cardview.widget.CardView>

    <TextView
        android:id="@+id/multiplayerStatusText"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:padding="@dimen/padding_general"
        android:gravity="center"
        android:textAppearance="?android:attr/textAppearanceMedium"
        app:layout_constraintTop_toBottomOf="@id/gameBoardContainerMulti"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        tools:text="En attente d'un adversaire..."/>

    <ProgressBar
        android:id="@+id/loadingIndicatorMulti"
        style="?android:attr/progressBarStyleLarge"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        tools:visibility="visible"/>

</androidx.constraintlayout.widget.ConstraintLayout>