mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-15 02:22:43 -04:00
small plinko (#117)
* Update multi-tracker display format in PlanesCommand * small plinko small plinko * Add Kasino Plinko Size setting
This commit is contained in:
@@ -184,8 +184,9 @@ public class PlinkoCommand : ICommand
|
||||
ballsNotInPlay.Add(new PlinkoBall());
|
||||
}
|
||||
//game starts here
|
||||
var size = (await SettingsProvider.GetValueAsync(BuiltIn.Keys.KasinoPlinkoSize)).ToType<int>();
|
||||
int breakCounter = 0;
|
||||
var plinkoMessageID = await botInstance.SendChatMessageAsync(PlinkoBoardDisplay(ballsInPlay), true, autoDeleteAfter: cleanupDelay);
|
||||
var plinkoMessageID = await botInstance.SendChatMessageAsync($"[size={size}]" + PlinkoBoardDisplay(ballsInPlay), true, autoDeleteAfter: cleanupDelay);
|
||||
while (plinkoMessageID.ChatMessageUuid == null && breakCounter < 1000) {
|
||||
await Task.Delay(100, ctx);
|
||||
breakCounter++;
|
||||
@@ -207,7 +208,7 @@ public class PlinkoCommand : ICommand
|
||||
ballsInPlay.Add(ballsNotInPlay[0]);
|
||||
ballsNotInPlay.RemoveAt(0);
|
||||
}
|
||||
PlinkoMessage = PlinkoBoardDisplay(ballsInPlay) + "[br]" + lastPayoutMessage;
|
||||
PlinkoMessage = $"[size={size}]" + PlinkoBoardDisplay(ballsInPlay) + "[/size][br]" + lastPayoutMessage;
|
||||
await botInstance.KfClient.EditMessageAsync(plinkoMessageID.ChatMessageUuid!, PlinkoMessage);
|
||||
if (ballsInPlay[0].POSITION.row == DIFFICULTY - 1) //once your ball has reached the bottom calculate the payout
|
||||
{
|
||||
@@ -293,7 +294,7 @@ public class PlinkoCommand : ICommand
|
||||
board += "[br]";
|
||||
}
|
||||
|
||||
return board;
|
||||
return board.GridToTable();
|
||||
}
|
||||
public class PlinkoBall
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user