lambchop fix maybe (#9)

* fix dice lose print

* dice can now display rigged results

* lambchop

* removed GetRandomNext

* updated lambchop randomness to use GetRandomNumber()

* Change lambchop game timeout to 12 seconds

* lambchop quickfix

* sync

* wheel game

* new newBalance calculation

* wheel quickfix

* experimental lambchop fix. Increased wheel animation time.
This commit is contained in:
CrackmaticSoftware
2025-12-10 21:37:33 +01:00
committed by GitHub
parent 956bfd9b54
commit 061cbaea9e
2 changed files with 28 additions and 15 deletions

View File

@@ -129,13 +129,18 @@ public class LambchopCommand : ICommand
i++; // increase step counter by 1
continue;
}
// boundary check for sheep movement
if (i >= tiles.Count)
{
break; // exit if we've gone past the field
}
// normal "move" state
// let alien follow player
if (i > FIELD_LENGTH / 2 - 1)
{
hazards[i] = ALIEN; // alien follows you in later part of the map
if (hazards[i - 1] == ALIEN)
if (i > 0 && hazards[i - 1] == ALIEN)
{
// update previous hazard tile back to desert
hazards[i - 1] = DESERT_TILE;
@@ -153,8 +158,9 @@ public class LambchopCommand : ICommand
await UpdateGameAsync();
tiles[i] = SKULL; // skull
await UpdateGameAsync();
i++;
continue;
break;
// i++;
//continue;
}
else
{
@@ -166,8 +172,9 @@ public class LambchopCommand : ICommand
await UpdateGameAsync();
tiles[i] = SKULL; // skull
await UpdateGameAsync();
i++;
continue;
break;
//i++;
//continue;
}
}
if (i == (targetTile - 1) && win) // trigger win animation
@@ -182,29 +189,35 @@ public class LambchopCommand : ICommand
await UpdateGameAsync(lambChopFieldEndState);
lambChopFieldEndState += CELEBRATION;
await UpdateGameAsync(lambChopFieldEndState);
i++;
continue;
break;
//i++;
//continue;
}
if (i > FIELD_LENGTH / 2 - 1)
{
// win in the tundra, moneybags
hazards[i] = MONEYBAG; // add moneybag
tiles[deathTile] = RED_TILE; // add deathTile indicator
if (deathTile >= 0 && deathTile < tiles.Count)
{
tiles[deathTile] = RED_TILE; // add deathTile indicator
}
await UpdateGameAsync();
i++;
continue;
break;
//i++;
//continue;
}
else
{
// win in the forrest, medal
hazards[i] = MEDAL; // add medal
if (deathTile != -1)
if (deathTile != -1 && deathTile < tiles.Count)
{
tiles[deathTile] = RED_TILE; // add deathTile indicator
}
await UpdateGameAsync();
i++;
continue;
break;
//i++;
//continue;
}
}
if (Money.GetRandomDouble(gambler) <= 0.15)

View File

@@ -38,8 +38,8 @@ public class WheelCommand : ICommand
private const string HIGH_DIFFICULTY_WHEEL = "⚫⚫⚫⚫⚫⚫⚫⚫⚫⚫⚫⚫⚫⚫⚫⚫⚫⚫⚫🔴";
private const string MIDDLE_WHEEL_FILL = "....................⮝....................";
// game settings
private const int MIN_WHEELSPIN_DELAY = 100;
private const int MAX_WHEELSPIN_DELAY = 600;
private const int MIN_WHEELSPIN_DELAY = 200;
private const int MAX_WHEELSPIN_DELAY = 1000;
private static readonly Dictionary<string, decimal> LOW_DIFF_MULTIS = new()
{
{ "⚫", 0.00m },