Skip to content

Commit

Permalink
Merge pull request #79 from Ian-Inizias/TarotCards
Browse files Browse the repository at this point in the history
TarotCard.cs + Playoffs final
  • Loading branch information
Ian-Liceranzu authored Feb 27, 2024
2 parents fda7b91 + 8fb238b commit 269ad7f
Show file tree
Hide file tree
Showing 34 changed files with 435 additions and 60 deletions.
77 changes: 74 additions & 3 deletions BasketLeague2.App/BasketLeague2.App.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>1.0.0</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.4.2" />
<PackageReference Include="Blazorise.Charts" Version="1.4.2" />
<PackageReference Include="Blazorise.DataGrid" Version="1.4.2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.4.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.1" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -65,6 +66,76 @@
<Content Update="wwwroot\icon-192.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_00_Fool.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_01_Magician.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_02_High_Priestess.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_03_Empress.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_04_Emperor.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_05_Hierophant.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_06_TheLovers.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_07_Chariot.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_08_Strength.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_09_Hermit.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_10_Wheel_of_Fortune.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_11_Justice.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_12_Hanged_Man.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_13_Death.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_14_Temperance.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_15_Devil.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_16_Tower.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_17_Star.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_18_Moon.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_19_Sun.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_20_Judgement.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\assets\images\tarotCards\RWS_Tarot_21_World.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<Folder Include="wwwroot\assets\images\tarotCards\" />
</ItemGroup>

</Project>
43 changes: 43 additions & 0 deletions BasketLeague2.App/Pages/Fortune/MinorWheelOfFortune.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
@page "/Fortune/MinorWheelOfFortune"
@using BasketLeague2.Utils.Models
@using BasketLeague2.Utils.Utils

<PageTitle>Wheel of Fortune</PageTitle>

<Button Color="Color.Info" Clicked="RollTheWheel">Roll the Wheel of Fortune</Button>

<Table Striped>
<TableHeader ThemeContrast="ThemeContrast.Light">
<TableRow>
<TableHeaderCell>TIRO DOBLE</TableHeaderCell>
<TableHeaderCell>TIRO TRIPLE</TableHeaderCell>
<TableHeaderCell>FÍSICO</TableHeaderCell>
<TableHeaderCell>PLAYMAKING</TableHeaderCell>
<TableHeaderCell>REBOTE</TableHeaderCell>
<TableHeaderCell>DEFENSA</TableHeaderCell>
</TableRow>
</TableHeader>
<TableBody>
<TableRow>
<TableRowCell>@_player.InsideScoring</TableRowCell>
<TableRowCell>@_player.OutsideScoring</TableRowCell>
<TableRowCell>@_player.Athleticism</TableRowCell>
<TableRowCell>@_player.Playmaking</TableRowCell>
<TableRowCell>@_player.Rebounding</TableRowCell>
<TableRowCell>@_player.Defending</TableRowCell>
</TableRow>
</TableBody>
</Table>

@code {

private Player _player = new();

private void RollTheWheel()
{
_player = new Player();

_player.PlayerRoulette();
}

}
67 changes: 67 additions & 0 deletions BasketLeague2.App/Pages/Fortune/WheelOfFortune.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
@page "/Fortune/WheelOfFortune"
@using BasketLeague2.Utils.Models
@using Newtonsoft.Json

<PageTitle>Wheel of Fortune</PageTitle>

<Button Color="Color.Info" Clicked="RollTheWheel">Roll the Wheel of Fortune</Button>

@if (_tarotCard is not null)
{
<Row VerticalGutter="16">
<Column ColumnSize="ColumnSize.Is4.Is4.WithOffset">
<Card>
<Row HorizontalGutter="16">
<Column ColumnSize="ColumnSize.Is6">
<CardImage Source="@($"assets/images/tarotCards/RWS_Tarot_{_tarotCard.Number}.jpg")" Alt="Tarot card" Class="card-image-full"/>
</Column>
<Column ColumnSize="ColumnSize.Is6">
<CardBody>
<CardTitle TextAlignment="TextAlignment.Center" TextTransform="TextTransform.Uppercase" TextWeight="TextWeight.Bold" Size="5">@_tarotCard.Name</CardTitle>
<Divider/>
<CardText>@_tarotCard.Description</CardText>
<Divider/>
<CardText Italic="true">@_tarotCard.Detailed</CardText>
</CardBody>
</Column>
</Row>
</Card>
</Column>
</Row>
}

<h3> Tarot cards </h3>

<Row HorizontalGutter="32" VerticalGutter="16">
@foreach (var card in TarotCard.MajorArcana)
{
<Column ColumnSize="ColumnSize.Is2">
<Card>
<CardImage Source="@($"assets/images/tarotCards/RWS_Tarot_{card.Number}.jpg")" Alt="Tarot card" Class="card-image-full"/>
<CardBody>
<CardTitle TextAlignment="TextAlignment.Center" TextTransform="TextTransform.Uppercase" TextWeight="TextWeight.Bold" Size="5">@card.Name</CardTitle>
<CardText Italic="true">@card.Description</CardText>
</CardBody>
</Card>
</Column>
}
</Row>

@code {

private TarotCard? _tarotCard;

void RollTheWheel()
{
Random rng = new();

var num = rng.Next(0, 22);

Console.WriteLine(num);

_tarotCard = TarotCard.MajorArcana.First(t => t.Number == num);

Console.WriteLine(JsonConvert.SerializeObject(_tarotCard));
}

}
2 changes: 2 additions & 0 deletions BasketLeague2.App/Pages/Players/PlayerStats.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
@inject HttpClient Http

@using BasketLeague2.Utils.Models
@using BasketLeague2.Utils.Utils
@using Newtonsoft.Json
@using Badge = BasketLeague2.Utils.Models.Badge

<Breadcrumb>
Expand Down
12 changes: 11 additions & 1 deletion BasketLeague2.App/Pages/Rules/Rules.razor
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<p>Todos los jugadores constan de un nombre, apellidos y motes, tanto aleatorizados como personalizados por presidentes.</p>
<p>Un jugador solo puede estar en un equipo a la vez.</p>
<p>Los datos informativos de un jugador podrán modificarse mediante un acuerdo con la directiva y siempre antes de ser elegidos en el draft.</p>
<p>Las estadísticas de cada jugador <strong class="text-danger">no se podrán modificar modificar</strong>.</p>
<p>Las estadísticas de cada jugador solo pueden ser modificadas por la rueda de la fortuna.</p>

<h3 id="superestrellas" class="h3">Superestrellas</h3>

Expand All @@ -108,6 +108,16 @@
<p>Todos los equipos deben estar compuestos por plantillas de 5 jugadores.</p>
<p>Un equipo debe estar compuesto por 1 jugador super estrella, 1 jugador malardo y 3 jugadores medios.</p>

<h2 id="rueda de la fortuna">Rueda de la fortuna</h2>

<p>Después de un draft y antes de comenzar la siguiente temporada todos los equipos pueden realizar una tirada de la rueda de la fortuna.</p>
<p>No se pueden evitar dos ruedas de la fortuna seguidas, es decir, si un año no realizas la tirada, el siguiente estarás obligado.</p>
<p>La rueda de la fortuna decidirá una bonificación o penalización para el equipo en cuestión basada en los arcanos mayores del tarot.</p>
<p>En caso de que el resultado solo afecte a un jugador, siempre será a la super estrella del equipo.</p>
<p>Es posible acumular multiples efectos de arcanos mayores sobre la misma carta, teniendo prioridad el último incorporado en caso de ser relevante para algo.</p>

<p>Todos los jugadores que permanezcan desde la temporada anterior también deberán realizar una tirada a la rueda de la fortuna menor, que indicará un cambio menor en sus estadísticas.</p>

<h2 id="sanciones" class="h2">Sanciones</h2>

<p>Hay varios tipos de sanciones en función a la gravedad de la falta cometida.</p>
Expand Down
16 changes: 15 additions & 1 deletion BasketLeague2.App/Shared/NavMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,20 @@
<span class="oi oi-book" aria-hidden="true"></span> Rules
</NavLink>
</div>

<div class="nav-item px-3">
<NavLink class="nav-link" @onclick="() => _expandSubNavFortune = !_expandSubNavFortune">
<span class="oi oi-compass" aria-hidden="true"></span> Fortune's Compass
</NavLink>
@if (_expandSubNavFortune)
{
<NavLink class="nav-link" href="fortune/WheelOfFortune">
Wheel Of Fortune
</NavLink>
<NavLink class="nav-link" href="fortune/MinorWheelOfFortune">
Minor Wheel Of Fortune
</NavLink>
}
</div>
</nav>
</div>

Expand All @@ -110,6 +123,7 @@
private bool _expandSubNavLeaderboard;
private bool _expandSubNavTimetables;
private bool _expandSubNavDraft;
private bool _expandSubNavFortune;

private string? NavMenuCssClass => _collapseNavMenu ? "collapse" : null;

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 16 additions & 10 deletions BasketLeague2.App/wwwroot/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@ a, .btn-link {
border-color: #1861ac;
}

.card-image-full{
height: 100%;
width: 100%;
object-fit: contain;
}

.content {
padding-top: 1.1rem;
}

.horizontal-gradient {
color: white;
background-image: linear-gradient(90deg, rgba(0,48,73,1) 0%, rgba(102,155,188,1) 100% );
background-image: linear-gradient(90deg, rgba(0, 48, 73, 1) 0%, rgba(102, 155, 188, 1) 100%);
}

.valid.modified:not([type=checkbox]) {
Expand All @@ -51,19 +57,19 @@ a, .btn-link {
z-index: 1000;
}

#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}
#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}

.blazor-error-boundary {
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA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1.8rem, #b32121;
padding: 1rem 1rem 1rem 3.7rem;
color: white;
}

.blazor-error-boundary::after {
content: "An error has occurred."
}
.blazor-error-boundary::after {
content: "An error has occurred."
}
6 changes: 6 additions & 0 deletions BasketLeague2.App/wwwroot/data/badges/TeamsBadges.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,11 @@
"Name": "S2 WINNER",
"Description": "Ganador de la S2 de la FBA.",
"Color": "warning"
},
{
"Id": 5,
"Name": "S3 WINTER WINNER",
"Description": "Ganador de la S3 de la FBA.",
"Color": "info"
}
]
Loading

0 comments on commit 269ad7f

Please # to comment.