-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow slides that are not orthogonal or diagonals #66
Conversation
@Idonotus There's more complex stuff with this. Because there can be an organized line (2,0) that begins on square (0,0), and an organized line also (2,0) that begins on square (1,0). They both are (2,0), yet they are completely different and do not intersect. Because of this, the keys of the organized lines also need to specify their starting x or y intercept. In mine and ScorpioneOrzione conversation from a while ago (scroll up to read it all), we came to the conclusion that keys would need to include the nearest (x,y) coordinate they start on after crossing, for example, the x axis. So basically, [dx,dy,x,y]. You may be able to use these, but Scorpione made these two desmos graphs that can, if I remember, take the coordinates of any piece, and auto calculate the nearest point that organized line intersects after the x/y axis! https://www.desmos.com/calculator/d0uf1sqipn |
src/client/scripts/game/misc/math.js
Outdated
if (!gradient) gradient = line[0]/line[1] | ||
if (!isAproxEqual(line[0]/line[1], gradient)) return false; | ||
for (const line of lines) { | ||
console.log(line) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not needed anymore at this point, but is comparing the c
value of the lines enough to tell if they are colinear? If c's are equal => colinear.
…me funcs to organizedlines.js
hopefull for the last time
i did comment the func
…hanging the shapre of legal move highlights (whether it's a square or a dot!)
…ess.org into pr/Idonotus/66
Should implement #11
Pieces can slide along lines that aren't diagonal. This implements fairy riders like the knightrider. All slides use organized lines to implement slides quickly
TODO:
Clean up