|
|
|
@ -26,11 +26,13 @@ public partial class PageBoard : ContentPage
|
|
|
|
|
|
|
|
|
|
private void ResultMultiplication(object? sender, DiceRolledEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Multiplication.IsVisible = true;
|
|
|
|
|
Multiplication.Text = $"Mult {e.Dice1Value*e.Dice2Value}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ResultSubstraction(object? sender, DiceRolledEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Substraction.IsVisible = true;
|
|
|
|
|
if (MyStub.ThePartie.Dice1.IsLower(MyStub.ThePartie.Dice2))
|
|
|
|
|
Substraction.Text = $"Sub {e.Dice2Value - e.Dice1Value}";
|
|
|
|
|
else Substraction.Text = $"Sub {e.Dice1Value - e.Dice2Value}";
|
|
|
|
@ -38,6 +40,7 @@ public partial class PageBoard : ContentPage
|
|
|
|
|
|
|
|
|
|
private void ResultHigher(object? sender, DiceRolledEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Higher.IsVisible = true;
|
|
|
|
|
if (MyStub.ThePartie.Dice1.IsLower(MyStub.ThePartie.Dice2))
|
|
|
|
|
Higher.Text = $"Higher {e.Dice2Value}";
|
|
|
|
|
else Higher.Text = $"Higher {e.Dice1Value}";
|
|
|
|
@ -45,6 +48,7 @@ public partial class PageBoard : ContentPage
|
|
|
|
|
|
|
|
|
|
private void ResultLower(object? sender, DiceRolledEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Lower.IsVisible = true;
|
|
|
|
|
if(MyStub.ThePartie.Dice1.IsLower(MyStub.ThePartie.Dice2))
|
|
|
|
|
Lower.Text = $"Lower {e.Dice1Value}";
|
|
|
|
|
else Lower.Text = $"Lower {e.Dice2Value}";
|
|
|
|
@ -52,6 +56,7 @@ public partial class PageBoard : ContentPage
|
|
|
|
|
|
|
|
|
|
private void ResultAddition(object? sender, DiceRolledEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Addition.IsVisible = true;
|
|
|
|
|
Addition.Text = $"Add {e.Dice1Value+e.Dice2Value}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -79,6 +84,27 @@ public partial class PageBoard : ContentPage
|
|
|
|
|
private void HigherClicked(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
MyStub.ThePartie.MarkOperationAsChecked(Operation.HIGHER);
|
|
|
|
|
Higher.IsVisible = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void LowerClicked(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
MyStub.ThePartie.MarkOperationAsChecked(Operation.LOWER);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void AdditionClicked(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
MyStub.ThePartie.MarkOperationAsChecked(Operation.ADDITION);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void SubstractionClicked(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
MyStub.ThePartie.MarkOperationAsChecked(Operation.SUBTRACTION);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void MultiplicationClicked(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
MyStub.ThePartie.MarkOperationAsChecked(Operation.MULTIPLICATION);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Button_Clicked(object sender, EventArgs e)
|
|
|
|
|