mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
@@ -87,8 +87,8 @@ public class KasinoMines
|
|||||||
{
|
{
|
||||||
await ResetMessage(msg);
|
await ResetMessage(msg);
|
||||||
}
|
}
|
||||||
int frames = mineLocation.c;
|
|
||||||
if (Size - mineLocation.c > frames) frames = Size - mineLocation.c;
|
int frames = 16;
|
||||||
string str;
|
string str;
|
||||||
bool revealedSpace;
|
bool revealedSpace;
|
||||||
int yellowWave = 1;
|
int yellowWave = 1;
|
||||||
@@ -309,8 +309,27 @@ public class KasinoMines
|
|||||||
{
|
{
|
||||||
payout *= ((size2 - i) / (gems-i));
|
payout *= ((size2 - i) / (gems-i));
|
||||||
}
|
}
|
||||||
|
//edit the message with the board to show all the mine locations if you won 💣💎⬜
|
||||||
|
string str = "";
|
||||||
|
for (int r = 0; r < game.Size; r++)
|
||||||
|
{
|
||||||
|
for (int c = 0; c < game.Size; c++)
|
||||||
|
{
|
||||||
|
bool revealedSpace = false;
|
||||||
|
foreach (var bet in game.BetsPlaced)
|
||||||
|
{
|
||||||
|
if (bet.r == r && bet.c == c) revealedSpace = true;
|
||||||
|
}
|
||||||
|
if (game.MinesBoard[r][ c] == 'M') str += "💣";
|
||||||
|
else if (revealedSpace) str += "💎";
|
||||||
|
else str += "⬜";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await _kfChatBot.KfClient.EditMessageAsync(game.LastMessageId, str);
|
||||||
var net = payout - game.Wager;
|
var net = payout - game.Wager;
|
||||||
var newBalance = await Money.NewWagerAsync(game.Creator.Id, game.Wager, net, WagerGame.Mines);
|
var newBalance = await Money.NewWagerAsync(game.Creator.Id, game.Wager, net, WagerGame.Mines);
|
||||||
|
|
||||||
await _kfChatBot.SendChatMessageAsync(
|
await _kfChatBot.SendChatMessageAsync(
|
||||||
$"{game.Creator.User.FormatUsername()}, you won {await payout.FormatKasinoCurrencyAsync()} from your {await game.Wager.FormatKasinoCurrencyAsync()} bet on mines, collecting {game.BetsPlaced.Count} gems while avoiding {game.Mines} mines. Net: {await net.FormatKasinoCurrencyAsync()}. Balance: {await newBalance.FormatKasinoCurrencyAsync()}", true, autoDeleteAfter: TimeSpan.FromSeconds(15));
|
$"{game.Creator.User.FormatUsername()}, you won {await payout.FormatKasinoCurrencyAsync()} from your {await game.Wager.FormatKasinoCurrencyAsync()} bet on mines, collecting {game.BetsPlaced.Count} gems while avoiding {game.Mines} mines. Net: {await net.FormatKasinoCurrencyAsync()}. Balance: {await newBalance.FormatKasinoCurrencyAsync()}", true, autoDeleteAfter: TimeSpan.FromSeconds(15));
|
||||||
await Task.Delay(TimeSpan.FromSeconds(15));
|
await Task.Delay(TimeSpan.FromSeconds(15));
|
||||||
|
|||||||
Reference in New Issue
Block a user