Skip to content

Commit 95e851c

Browse files
committed
Release 0.7
- 4 Betting strategies. - Both dice games working. - Main, faucet and TLE modes all working. Signed-off-by: Dejan Ribič <dejan.ribic@gmail.com>
1 parent 8f07e76 commit 95e851c

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# duckdiceBotZ
66

77
duckdiceBotZ is a gambling bot for the website https://duckdice.io written in Zig. It is currently limited to implementing the
8-
Labouchere betting strategy and Fibonacci betting strategy.
8+
Labouchere betting strategy, Fibonacci betting strategy and 1% hunt betting strategy.
99

1010
## Zig version
1111

@@ -18,13 +18,18 @@ For planned features look at [ToDo](ToDo.md) list.
1818
## Features
1919

2020
- Currently only has CLI.
21-
- Implements the Fibonacci betting strategy for automated gambling on duckdice.io.
2221
- Implements the Labouchere betting strategy for automated gambling on duckdice.io.
22+
- Implements the Fibonacci betting strategy for automated gambling on duckdice.io.
23+
- Implements the 1% hunt betting strategy for automated gambling on duckdice.io.
2324
- Easy to configure and deploy.
24-
- Written in Zig for blazingly-fast performance and reliability.
25+
- Written in Zig for blazingly-fast performance.
2526

2627
## Usage
2728

29+
Download one of the pre-built binaries in the Releases section.
30+
31+
Or build from source following instructions below:
32+
2833
1. Clone the repository:
2934
`git clone https://github.com/dribic/duckdiceBotZ.git`
3035
2. Build the bot:

src/betting.zig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,17 @@ pub fn onePercentHunt(
5353
try stdout.print("Are you sure you want to continue? [Y]es/[N]o ", .{});
5454
try stdout.flush();
5555
const cont_str = try net.input(allocator);
56-
if (!std.mem.eql(u8, cont_str, "Y") or !std.mem.eql(u8, cont_str, "y")) {
56+
const check = std.mem.eql(u8, cont_str, "Y") or std.mem.eql(u8, cont_str, "y");
57+
if (!check) {
5758
return;
5859
}
5960
}
6061
try stdout.print("You can lose {d:.8} {s}.\n", .{ total_loss, currency });
6162
try stdout.print("Are you sure you want to continue? [Y]es/[N]o ", .{});
6263
try stdout.flush();
6364
const cont_str = try net.input(allocator);
64-
if (!std.mem.eql(u8, cont_str, "Y") or !std.mem.eql(u8, cont_str, "y")) {
65+
const check = std.mem.eql(u8, cont_str, "Y") or std.mem.eql(u8, cont_str, "y");
66+
if (!check) {
6567
return;
6668
}
6769

src/main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ pub fn main() !void {
181181

182182
var dice_game: bool = true;
183183
if (std.mem.eql(u8, bet_strat, "0") or std.mem.eql(u8, bet_strat, "e") or std.mem.eql(u8, bet_strat, "E")) {
184-
try stdout.writeAll("Have a nice day.😀\nGoodbye.\n");
184+
try stdout.writeAll("Have a nice day.\nGoodbye.\n");
185185
try stdout.flush();
186186
break :master_loop;
187187
}

0 commit comments

Comments
 (0)