Stackabrix, a simple terminal game
cross-posted from: lemmy.world/post/23017061
gitlab.com/christosangel/stackโฆstackabrix is a simple terminal game, written in Bash, where the user, against the clock and with the least moves possible, must sort the blocks according to their color, and stack them in the respective stack.
During the game, the user can move left and right, pick blocks and drop them in other stacks.
The aim is to sort the blocks, and stack them in the respectively named stacks, fast as possible, and with the least moves possible.
The play's score is the sum of the time achieved in seconds and of the moves made.
If the score is among the 10 best scores achived, it makes it in the Top Ten Highscores.
Any feedback is welcome.
You can also use BULK INSERT for csvs or just INSERT INTO and some text editing depending on the specifics.
This is more for one-off stuff like analyzing some 10,000 row spreadsheet you've been handed that you could probably do with formulas in excel, but it's easier to use sql, but not worth building a proper process for.
Thank you Luigi for freeing me from the chains of capitalism
Oh wait, his CEO killing changed nothing. Okay back to work I guess.
FAA Documents Realesed in 2020 Give Unprecedented Look Into Colorado Drone Swarm Mystery
Newly Released FAA Documents Give Unprecedented Look Into Colorado Drone Swarm Mystery
Hundreds of pages of documents provide consistent detailed descriptions of the drones and conclude the military wasn't behind the operation.Brett Tingley and The War Zone staff (The War Zone)
Netanyahuโs trial: corruption, war crimes, and an Israel in crisis
Netanyahuโs trial: corruption, war crimes, and an Israel in crisis
Benjamin Netanyahuโs corruption trial unfolds against a backdrop of bribery and fraud allegations, international war crimes charges, domestic scandals, and mounting global condemnation โ all while he continues to fuel devastating wars with no end in โฆthecradle.co
A new Proton Experimental change makes modding easier!
On new Proton Experimental, most mods can now just be extracted/copied next to the game .exe, without requiring any extra steps like setting WINEDLLOVERRIDES. This change will also be in future stable Proton releases.
- Pierre-Loup Griffais, a developer at Valve
Lemme tell you something, DO NOT learn BASIC as your first language. As a hobbyist, I avoided C/C++ for 25 years because I just didn't get pointers and memory manipulation, and messed around with other languages like JS and PHP instead (also BASIC's GOTO and GOSUB kinda ruined me as a programmer for a few years). But once it finally clicked a couple years ago, I now want to write EVERYTHING in C/C++.
I think plain C at least should be everybody's first language. It literally reprograms your brain to think exactly like how a computer internally functions. I never got that with other languages, because they were so far removed from the actual machine.
Edit: also, after learning some of it, it's pretty neat when you do stuff like look at parts of the Linux kernel source code and think "wow, I know what's actually happening here now!".
With martial law defeated, now is a decisive moment for change in South Korea
With martial law defeated, now is a decisive moment for change in South Korea : Peoples Dispatch
Following Yoon's failed attempt to impose martial law, the situation continues to unfold as each passing moment shakes the foundation of the current social order and further opens the horizon of possibility.Steven Lee (Peoples Dispatch)
South Korea president defends martial law decree and vows to โfight to the endโ
South Korea president defends martial law decree and vows to โfight to the endโ
Yoon Suk Yeol disputes insurrection charges and calls martial law decreee an โact of governanceโ amid reports of a second attempt by police to raid his officeGuardian staff reporter (The Guardian)
Norway campaigns to cut energy links to Europe as power prices soar
Norway campaigns to cut energy links to Europe as power prices soar
Countryโs energy minister describes โshit situationโ as domestic prices hit highest level since 2009Richard Milne (Financial Times)
Dessalines likes this.
like this
At Current Rate, It Would Take 7 Years to Evacuate All Children in Need of Medical Care in Gaza, UN Reports
UN: It Would Take 7 Years to Evacuate Dying Gaza Children at Current Rate
Israel is trapping children suffering from cancer, head trauma, amputations, burns and starvation in Gaza.Sharon Zhang (Truthout)
like this
This is about one per day by the way. Even when approved for release, the exit can still be denied last-second for "undisclosed security reasons".
Death AmeriKKKa, Death to piSSrael
Labour allowed dozens of arms exports to Israel after weapons sanctions
Labour allowed dozens of arms exports to Israel after weapons sanctions
UK trade department approved 34 military export licences to Israel in the two months since David Lammy announced a partial arms embargo, new data shows.JOHN McEVOY (Declassified Media ltd)
Proton 9.0-4 released
Release Proton 9.0-4 ยท ValveSoftware/Proton
Now playable: APB Reloaded Conqueror's Blade Cube Hero Odyssey Disgaea 4 Complete+ Hard Chip Demo ScarQuest Sniper Elite: Nazi Zombie Army 2 (AMD GPUs only) Test Drive Unlimited Solar Crown Total ...GitHub
like this
stephen
in reply to christos • • •The โMAGENTAโ bricks are not magentaโฆ
The colors must be based on the color theme for the terminal?
christos
in reply to stephen • • •As things are at the moment, yes.
I was thinking of passing the color variables in the config file, through
install.sh, but then, people would (rightfully) complain about colors not matching their terminal color theme.I might do just that in the near future, leaving the terminal theme values as default.
If you wish to change color values, they are hardcoded in the
load_colorsfunction ofstackabrix.sh, and sufficiently marked with comments, to know which is which.A useful help for such a change would be talyian.github.io/ansicolors/.
Let me know if you need any help with these changes.
QuazarOmega
in reply to christos • • •Now I can replay towers of Hanoi trauma in my favourite color scheme ๐
(Actually dig this BTW)
christos
in reply to QuazarOmega • • •