mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 12:32:03 -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()
|
private static readonly Dictionary<int, decimal> PlinkoPayoutBoard = new()
|
||||||
{
|
{
|
||||||
{0, 25},
|
{0, 25},
|
||||||
{1, 2_5},
|
{1, (decimal)2.5},
|
||||||
{2, 0_25},
|
{2, (decimal)0.25},
|
||||||
{3, 0_1},
|
{3, (decimal)0.1},
|
||||||
{4, 0_25},
|
{4, (decimal)0.25},
|
||||||
{5, 2_5},
|
{5, (decimal)2.5},
|
||||||
{6, 25},
|
{6, 25},
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -112,6 +112,7 @@ public class PlinkoCommand : ICommand
|
|||||||
throw new Exception("game broke while waiting for chat message id");
|
throw new Exception("game broke while waiting for chat message id");
|
||||||
}
|
}
|
||||||
breakCounter = 0;
|
breakCounter = 0;
|
||||||
|
var logger = LogManager.GetCurrentClassLogger();
|
||||||
while (ballsNotInPlay.Count > 0 || ballsInPlay.Count > 0)
|
while (ballsNotInPlay.Count > 0 || ballsInPlay.Count > 0)
|
||||||
{
|
{
|
||||||
breakCounter++;
|
breakCounter++;
|
||||||
@@ -127,7 +128,7 @@ public class PlinkoCommand : ICommand
|
|||||||
{
|
{
|
||||||
currentPayout = wager * PlinkoPayoutBoard[ballsInPlay[0].POSITION.col];
|
currentPayout = wager * PlinkoPayoutBoard[ballsInPlay[0].POSITION.col];
|
||||||
payout += currentPayout;
|
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)
|
if (currentPayout > wager)
|
||||||
{
|
{
|
||||||
await botInstance.SendChatMessageAsync(
|
await botInstance.SendChatMessageAsync(
|
||||||
@@ -228,9 +229,11 @@ public class PlinkoCommand : ICommand
|
|||||||
{
|
{
|
||||||
case >= 0.5:
|
case >= 0.5:
|
||||||
if (!evenrow && Math.Abs(POSITION.col) > POSITION.row / 2) POSITION.col--;
|
if (!evenrow && Math.Abs(POSITION.col) > POSITION.row / 2) POSITION.col--;
|
||||||
|
else if (evenrow) POSITION.col--;
|
||||||
break;
|
break;
|
||||||
case < 0.5:
|
case < 0.5:
|
||||||
if (!evenrow && POSITION.col > POSITION.row / 2) POSITION.col++;
|
if (!evenrow && POSITION.col > POSITION.row / 2) POSITION.col++;
|
||||||
|
else if (evenrow) POSITION.col++;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Exception("generated an incorrect number");
|
throw new Exception("generated an incorrect number");
|
||||||
|
|||||||
Reference in New Issue
Block a user