<?xml version="1.0" encoding="utf-8"?>

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="Qwirkle.Pages.Rules"
             xmlns:controls="clr-namespace:Qwirkle.Views"
             Title="Rules">
    <ScrollView>
        <VerticalStackLayout>
            <Grid Style="{StaticResource GridMain}">
                <controls:GoBack></controls:GoBack>
                <Label Text="Qwirkle Rules"
                       Style="{StaticResource Title}"
 />
            </Grid>
            
            <Label
                Text="Game Composition"
                Style="{StaticResource RulesSubTitle}"/>
            
            <Label
                Text="The game is composed of 3 sets of 36 tiles, each set containing 6 tiles of each of the 6 colors and 6 shapes."
                Style="{StaticResource RulesContent}"/>

            <Label
                Text="Who Starts ?"
                Style="{StaticResource RulesSubTitle}" />

            <Label
                Text="In order to determine who starts, the algorithm checks which player has the most tiles with the same shape or color."
                Style="{StaticResource RulesContent}" />
            <Label
                Text="Then, the first player can place his tiles wherever he wants on the board."
                Style="{StaticResource RulesContent}" />

            <Label
                Text="Progress of the game"
                Style="{StaticResource RulesSubTitle}" />

            <Label
                Text="Each player can then place as many tiles as they want on the board, as long as they respect these 3 rules:"
                Style="{StaticResource RulesContent}" />
            <Label
                Text="1. The tiles must be placed in a straight line/column."
                Style="{StaticResource RulesContent}" />
            <Label
                Text="2. On a line assigned to a certain color/shape, the tiles must have the same color/shape."
                Style="{StaticResource RulesContent}" />
            <Label
                Text="3. For a line assigned to a certain color/shape, if a tile of a specific shape/color has already been placed, they can't place it again."
                Style="{StaticResource RulesContent}" />
            <Label
                Text="Example: If a player has already placed a blue square on a line assigned to the color blue, they can't place another blue square on the same line."
                Style="{StaticResource RulesSubContent}" />
            
            <Label
                Text="Swapping your tiles"
                Style="{StaticResource RulesSubTitle2}" />

            <Label
                Text="If a player can't place any tiles on the board, they can swap between 1 and 6 of their tiles with the remaining ones in the bag."
                Style="{StaticResource RulesContent}" />
            <Label
                Text="Swapping can be only done if the player didn't place any tile on this turn."
                Style="{StaticResource RulesContent}" />
            <Label
                Text="This action makes the player skip their turn."
                Style="{StaticResource RulesContent}" />
            
            <Label
                Text="End of the game"
                Style="{StaticResource RulesSubTitle}" />
            <Label
                Text="The game stops either right after a player has placed their last tile or when no player can place any more tiles."
                Style="{StaticResource RulesContent}" />
            
            
            
        </VerticalStackLayout>
    </ScrollView>
</ContentPage>