diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..c61477a --- /dev/null +++ b/README.md @@ -0,0 +1,80 @@ +# gothic 1 remake lockpicking helper tool +alternative title: +> big titty gothicc gf + +To whoever came up with the change to old lockpicking system for the remake: +you're a psycho +I love it, 10/10 +you're the best there ever was, keep up the good work + +Unfortunately my ADHD craves for instant gratification so I came up with this shitty solver. + +## assumptions +1. the interlocking of each block doesn't change +2. the correct pin slot is always the middle one +## Usage +*tests are provided in example.py* + +### 1. prepare input +you'll need to define: +- how many blocks there are (`numOfBlocks`) +- how many pin slots per block there are (`numOfPinslots`) +- for each block: + - which pin slot the pin sits in (`initialPositions`) + - which block(s) move and in which direction during sliding (`edges`) + +bit of explanation for `edges`: +- when you move the block left or right, other block can move as well (interlocked) +- on top of that, they can move WITH or OPPOSITE TO the selected block +- write down the block numbers that are interlocked + - if the block moves OPPOSITE TO selected block, then prefix it's number with minus sign `-` (negative integer) + +### parse input +##### option A - use built-in parser +run the gothpick.py program and type-in your prepared input +``` +python3 gothpick.py +``` +type in the input when prompted + +##### option B - import the library +import the library and type in your input outside the gothpick.py +``` +import gothpick + +IterateStepsManually = False +numOfBlocks = 5 +numOfPins = 7 +initialPositions = { +0:6, +1:3, +2:2, +3:1, +4:7 +} + +edges = { +0:[(1,0),(1,3)], +1:[(1,1),(1,4)], +2:[(1,2),(-1,4)], +3:[(1,3),(-1,4),(-1,2),(1,1)], +4:[(1,4)] +} + +gothpick.PrintInput(initialPositions,edges) +solvedpath = gothpick.lockpick(numOfBlocks,numOfPins,initialPositions,edges) +gothpick.TranslateResults(solvedpath,IterateStepsManually) +``` + +### use the solution +whether you +- were asked (option A) +- passed an argument (option B, `IterateStepsManually`) +you had to decide if you want **step-by-step** or **complete instructions** + +**step-by-step** +one step at a time, press any key to display next step +(i prefer this one) +**complete instructions** +prints all instructions at once +useful if you want to send the solution to a girl and impress her i guess
\ No newline at end of file |
