CLG - Command Line Gambling

CLG - Command Line Gambling

15 devlogs
32h 53m
•  Ship certified
Created by HQ2000

A "normal" CLI tool. ls? mkdir? echo? cat? Sure. But first try your luck and maybe what happens is actually what you want :)

Timeline

Ship 1

0 payouts of shell 0 shells

HQ2000

3 days ago

HQ2000 Covers 15 devlogs

Everything uploaded on GitHub and crates.io!
See the README (Demo or Readme link) on how to install!

Update attachment

Everything works now!
(The video showcases the cat command alongside with the coinflip and the machine)
I'm gonna publish it on crates.io and github and ship!

HQ2000
HQ2000
5h 22m 3 days ago

Um..yeah.
These 5h are mostly coding and refactoring, I will upload to the repo today too.
Again, if there was something to show earlier, I would've shown it. But I don't see the point in cluttering the Explore and Subscriber feed with devlogs like minor code changes, started the gambling machine and a random picture. Really.
So, I'm literally finished, the logic is all in place, but it seems like there are small errors here and there screwing the logic up. Also, I'm gonna play around with the alignment too to make it actually fit.

Update attachment
HQ2000
HQ2000
2h 31m 4 days ago

The coinflip is working now (but the block's border not :rip:). Video attached.
Anyways, the best proof I actually did something is that I already hate ANSI formatting, if you (or the program you're using) do(es) one tiny thing wrong, literally EVERYTHING is screwed up.
So, next, I'm gonna continue with the gambling machine.

HQ2000 HQ2000 4 days ago
everyone loves gambling
Youssef Youssef 4 days ago
yay, gambling

Damn...the images do not play well with the rest of the app

Update attachment

Played around with the awesome tool chafa (youssef recommended it to me) and now got, thanks to itself, pixabay, canva and some time, two nice coin images! (I only need to do the side, but I'm really impressed by the tool (see below).
The art below uses a 16-bit color channel, more is possible but my terminal can't display more...

Update attachment
HQ2000
HQ2000
4h 51m 7 days ago

First game - coinflip - finished!
So, now, after I uploaded the code the the repo, you can actually use this, but it'll only have the cointhrow, no difficulty settings and no partial success option, so all this needs to be done. After 1-2 extra games I could actually imagine a ship!

Update attachment
aal337 aal337 6 days ago
rewrite it in python
HQ2000
HQ2000
1h 42m 8 days ago

Made (and copied hehe) some ASCII art for the coinflip and some automates and the corresponding Rust bindings, also tried some ratatui stuff

Update attachment
HQ2000
HQ2000
1h 19m 8 days ago

added labels for the actual functionality, now I can actually start with the gambling stuff

Update attachment
HQ2000
HQ2000
1h 49m 8 days ago

Finished the commands!
To be fair: Not all of them, but plenty since I deleted the ones that don't really contribute to end experience and are relatively hard to implement.
Again, see the screenshot.
So, what's left to do?
1. Having prettier errors (so no returning them from the main function)
2. Gambling stuff

Update attachment
HQ2000
HQ2000
4h 18m 9 days ago

Damn did it get late today...anyways, I was at least a bit productive, so I only have 6 commands left to do! (See the screenshot below) I won't upload today, since I got many, but no really remarkable things done (so only 4h devlog), hope to finish them tomorrow to start with the gambling stuff.

Update attachment

Further work (and restructuring, of course!) done, mostly put into implementing some of the simpler commands. I don't want to go through every single change, but I uploaded the code to the repo.

Update attachment

I love clap (at least now), but I accidentally switched args and flags so I need to redo it partially.
Anyways, it refreshing to work on this beside my other two projects :)

Update attachment

Working on the commands, starting with clap is not that nice, but thanks to docs.rs, I'm now at least able to do the basics, also, I'm now sticking (at least partially) to the POSIX shell command standard so maybe some ppl even know one or two commands without needing to open the help menu.
Also, I'll start to upload the first bit of code to the repo.

Update attachment

Already getting familiar with the Rust TUI framework ratatui, also have some ideas now which techniques I'm gonna use (not a complete list):
typical machine-like,
throwing a coin,
scratch cards.

Update attachment