Code Monkey home page Code Monkey logo

fourbyfourian-quarryin's People

Contributors

andrewschultz avatar

Watchers

 avatar  avatar

fourbyfourian-quarryin's Issues

local variables fp/sp can be moved to global definition

I defined fp and sp locally in the code a lot. This could be changed to make things simpler.

to decide which piece is fp: decide on first-piece of quest-dir;
to decide which piece is sp: decide on first-piece of quest-dir;

I think we could also check (if location is not puzzly, decide on 4x4 king)

Allow for actual discovered check, or possible discovered check

We already have double-checks that don't work. It's flagged. But what about

  1. bishop at a1, knight at c4/d3, enemy king at e5? (Placed) (gives almost a discovered/double check)
  2. bishop at a1, knight replaced from b2 to c4/d3, enemy king at e5? (Placed) (gives an actual double check)

Redo directions for new path through game

The 3 later directions are now secondary. No more tertiary.

A secondary direction can be stalemated. It must be stalemated before it is solved.

Update the score as well.

Help command (H)

H = walkthrough comes with the game.

"Go to relevant section for an in-game hint." in Ministry of Unity

default hint for the first 4 zones = can't mate with just [bishop or knight]

Warning/spoiler before first time hinting in a zone.

Find test case to make sure code fix works

Changes from

2a747c6

decide on (absval of (xval of r1 - xval of r2)) + (absval of (yval of r1 - yval of r2))

to decide whether enemy-self-check:
	if color of p2 is white, no;
	let xdelt be absval of ((xval of location of k4) - (xval of location of p2));
	let ydelt be absval of ((yval of location of k4) - (yval of location of p2));

definition: a piece (called p) is double-adjacent:
	if basic-dist of p and k4 is 1 and basic-dist of p and k12 is 1:
		yes;
	no;

this is the two-bishops-formation rule:
	if diag-dist of yellow bishop and purple bishop is 3 and basic-dist of yellow bishop and purple bishop is 3:

this is the hard-bishop-stalemate rule:
	if location of player is cornery:
		if hard-mode is true:
			say "It should have worked. It [if west is stalemated or south is stalemated]already did off in [q of west] and [q of southwest], but maybe you need a new approach here[else]might work somewhere else, because things feel basically right[end if].";
			say "[line break]For whatever reason, the [ck] doesn't feel comfortable backed in that way, at least not without an ally next to them. He chickens out with a maddeningly plausible excuse.[paragraph break]There's got to be a way to trap him away from the corner--then, surely, [cq] will be better off ruled by someone much braver, a non-corner-fearing (but still center-seizing) leader like ... your very own king! Or, perhaps, a regent such as yourself.";
			if basic-dist of p1 and player is 1 and basic-dist of p1 and k12 is 1:
				say "[line break]The formation had to be right, though. It just HAD to. But the positioning -- not so much. Yet.";

when play begins:
(look at basic-dist before and after for each puzzly room pair, then note where it could go wrong)

(place k / n / place k) testing

The disambiguation rules have been really thorny. It'd be nice to straighten things out fully. But this is a case I missed.

Perhaps I could have something with "if the match list length is 2 and number of reserved pieces in match list is 1..."

Or, does the player mean 4x4 king when # of reserved pieces is 2: it is very unlikely.

reject knight directions as a joke

Would it be worth defining them as actual directions? Put them in the common file?

You're not quite at the age where you berate kids these days for rushing all over the place.

Besides, there's GT.

Put in Table of Amusements as well.

edge case: (K)icking your friendly piece may result in an involuntary check

test case:

a1.place k.c3.place b.e5.place b.kick fb

if noun is first-piece and quest-dir is primary and quest-dir is not stalemated:
let old-loc be location of first-piece;
move first-piece to off-site
let a be whether or not piece attacks twelvebytwelvian king;
move first-piece to old-loc
if a is true, say "You realize you may be committing an important discretion.

requires tricky core changes: PLACE swapping two pieces is nontrivial

We still need to do all the checks.

The pseudocode is something like this.

null-piece is a piece.

  1. replaced-piece is a global. replaced-piece-loc is a global
  2. moved-piece is a global. moved-piece-loc is a global.
  3. their locations are off-site by default.

if replaced-piece and moved-piece, then

  1. switch replaced-piece and moved-piece locations
  2. check for anything suspicious

if moved-piece

  1. switch moved-piece locations
  2. check for anything suspicious

During any failure, have a reset-after-check
if replaced-piece is not null-piece, move replaced-piece to replaced-piece-loc
if moved-piece is not null-piece, move moved-piece to moved-piece-loc

This has a lot of tricky test cases but it's worthwhile. Meanwhile a stopgap ...

possible feature request: easy vs. hard?

  1. We would have to track easy-solved vs hard-solved
  2. we would allow hard to drop down to easy but not vice versa
  3. we would ask at the start about hard vs easy. (H/E). People who haven't played chess before may prefer easy, which is not intended to be trivial

This would create all kinds of branches, but it would be quite testable. I would also need a command

HARD (force hard)
EASY (force easy)

So Zarf's regex test would work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.