mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
fix plinko payout maybe? also added logger in case its still bugged to print ball position (#31)
* Update cleanup delay settings for PlinkoCommand, use plinko delay instead of limbo Update cleanup delay settings for PlinkoCommand, use plinko delay instead of limbo * wait for chat message id update wait for chat message id update * update plinko to fix shit update plinko to fix shit * add underline to final blackjack message add underline to final blackjack message to make it easier to read which game is which when many games are happening at once * plinko fix frfr this time plinko fix frfr this time * settings fix as requested settings fix as requested * plinko payout fix? not exactly sure why its not correct this should maybe fix it? * Add logger for max win in PlinkoCommand Added logging for maximum win condition in Plinko game.
This commit is contained in:
@@ -35,11 +35,11 @@ public class PlinkoCommand : ICommand
|
||||
private static readonly Dictionary<int, decimal> PlinkoPayoutBoard = new()
|
||||
{
|
||||
{0, 25},
|
||||
{1, 2_5},
|
||||
{2, 0_25},
|
||||
{3, 0_1},
|
||||
{4, 0_25},
|
||||
{5, 2_5},
|
||||
{1, (decimal)2.5},
|
||||
{2, (decimal)0.25},
|
||||
{3, (decimal)0.1},
|
||||
{4, (decimal)0.25},
|
||||
{5, (decimal)2.5},
|
||||
{6, 25},
|
||||
|
||||
};
|
||||
@@ -112,6 +112,7 @@ public class PlinkoCommand : ICommand
|
||||
throw new Exception("game broke while waiting for chat message id");
|
||||
}
|
||||
breakCounter = 0;
|
||||
var logger = LogManager.GetCurrentClassLogger();
|
||||
while (ballsNotInPlay.Count > 0 || ballsInPlay.Count > 0)
|
||||
{
|
||||
breakCounter++;
|
||||
@@ -127,7 +128,7 @@ public class PlinkoCommand : ICommand
|
||||
{
|
||||
currentPayout = wager * PlinkoPayoutBoard[ballsInPlay[0].POSITION.col];
|
||||
payout += currentPayout;
|
||||
ballsInPlay.RemoveAt(0);
|
||||
if (currentPayout == wager * 25) logger.Info($"Plinko: Max win on plinko, ball position: ({ballsInPlay[0].POSITION.row}, {ballsInPlay[0].POSITION.col})");
|
||||
if (currentPayout > wager)
|
||||
{
|
||||
await botInstance.SendChatMessageAsync(
|
||||
@@ -228,9 +229,11 @@ public class PlinkoCommand : ICommand
|
||||
{
|
||||
case >= 0.5:
|
||||
if (!evenrow && Math.Abs(POSITION.col) > POSITION.row / 2) POSITION.col--;
|
||||
else if (evenrow) POSITION.col--;
|
||||
break;
|
||||
case < 0.5:
|
||||
if (!evenrow && POSITION.col > POSITION.row / 2) POSITION.col++;
|
||||
else if (evenrow) POSITION.col++;
|
||||
break;
|
||||
default:
|
||||
throw new Exception("generated an incorrect number");
|
||||
|
||||
Reference in New Issue
Block a user