andrewschultz / miscellany Goto Github PK
View Code? Open in Web Editor NEWMiscellaneous stuff (utils for several repositories, learning new languages)
Miscellaneous stuff (utils for several repositories, learning new languages)
The example is in Slicker City, as the miscellaneous part of the table of explanations is really overloaded with books and so totals are counted twice.
additional line to start:
vertical, verbose
redact.pl -g pc,sc -pd
-cf will still force a command, but now we have in the file
(-c )-g pc (command) to detect this...
This comments out the rule below, builds, and then uncomments it. It's currently necessary for A Roiling Original, to test glulxe without the windows freezing it up.
[comment out the rule below]
when (etc)
Specify a file name as well?
Simple data e.g.
Autumn leaves
-1,-1,1,4,7,43,23,etc
List them with ~
-a signifies copy them over.
Note if minor files are not copied over.
They've been used for 3d/4d as well as pc/sc. Plus issue #38 makes no sense without this.
If you have
JH-10H-KH-QH and empty, then you can chain.
func (0)
func (1)
magic numbers are bad
Pull that to a main function.
Leave a marker in there which does nothing other than to say, go back to here
Useful for 426x moves etc.
To add to icl.txt,
default=c:\games\inform
for nonstandard path,
force threediopolis=c:\other\3dop.inform\source
$=threediopolis.inform\Source would allow
force threediopolis=c:\other\$
Sending it to other\threediopolis.inform\source
lists.otl and Trizbort for Alec
This shows -9c if there is nothing else. So we need to fix that & account for something at the top.
sub build
Arguments:
e.g. separate option commands from project commands.
In the second case I wasn't creating the beta.
or at the very least organize the old scripts
search through for notes*.otl
e.g. x of y's to x+1 of y's.
Need to detect not just last card but the highest in the string.
Are there any wins with "ones?"
I'd need a special 720s flag to make sure we don't print the results. And of course check for 6 draws left etc
Also helpful perl code
use Algorithm::Permute;
my @array = 'a'..'d';
Algorithm::Permute::permute {
print "next permutation: (@array)\n";
} @array;
Every test could have a line
TEST RESULTS:test name, subtest name,x failed,y passed,z acceptable
if (x == 0) { print "td bgcolor=green"; } elsif (x <= z) { print "td bgcolor=yellow"; } else { print "td bgcolor=red"; }
This will tell us if we leave anything on an empty square.
It should be used after X(124) or W(124) or whatever. We will try each goodShuffle until there is none. We will only work with the current suit, as well.
It should be tacked on to the end of autoShuffleExt.
sub goodShuffle (row-1, row-2, currentSuit)
{
if (row 1 or row 2 doesn't have the right suit on the bottom) no
if (either row is empty) no
if (2 rows empty) yes
if (row-2 has 2 or fewer chains below row-1), safe # note we must also check if it is meaningful e.g. 10H vs 8h 5h 4h 2h 1h with 1 empty row is safe, but it is not meaningful. But with 2 empty rows, it is safe and meaningful.
# also KH QH AH to 7H 4H 3H is safe, because we can go backwards. So this is tricky.
# in addition having * KH QH AH and JH 9H 7H 6H is safe from 1st to 2nd, then 2nd to first, if there is an empty row
}
while (safeShuffle) { proceed with it, also maybe run ones(-1) }
This can be used to sort things out after X123. If there is an empty
e.g. if you get ones after, then undo, then type garbage
Solution is to have procCmd return 1 or 0 based on if something meaningful happened. Also it requires a lot of tweaking.
e.g. if
7 Hearts/5
6 hearts/3
potential it is circular
Easiest way to check this is to go to the end of the opening streak and see if different. Not perfect but...
Allows for me to check various scenarios.
There will be an external file called altest.txt. If it is not there, TEST bails.
Error message if I type an invalid TEST
CASE=endgame
L=13,12,11,10,9,8,7,6,5,4,3,2,1
L=17,16,15,14,13,26,25,24,23,22,21,20,19,18
L=39,38,37,36,35,34,33,32,31,30,29,28,27
L=52,51,50,49,48,47,46,45,44,43,42,41,40
Track which "to say" constructions have been used, as well as if there are duplicates.
punc+.pl, like punc for ARO but
table=[name]
Maybe for each argument, have something
caps,title,sentence,none,any|period,none
Then we can look in general for errors.
#2 may be * but this is N.
We need more arrays for this
@FromOutSide[30]
@under[6][3]
At the beginning, we define them.
We also have to allow for a save file that contains this. This could be done by allowing
D=(30 #'s)
U=(col 1)
...
U=(col 6)
w/l, streak, all time, %age
This is a script that will copy everything over to \games\inform\prt. It will look at the directory to see what should be copied, and what should be named.
Goals are to learn about python hashes and so forth.
If there is an argument we will force the from directory. If not it will rely on the current directory.
If 4 columns have 13 in order $array[x][0] > 0 && %13 = 0
and the next 12 go to 0
Then say won game and play again.
This breaks a command into letters and numbers. That will allow more precise parsing.
$letters = $cmd; $letters =~ s/[^a-z]//gi;
$numbers = $cmd; $numbers =~ s/[^0-9]//gi;
$garbage = $cmd; $garbage =~ s/[^0-9a-z]//gi; if ($garbage) { print "Excess characters\n"; }
Obviously we need to check for commands that should contain garbage, like save etc. But this allows for more directed error messages.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.