-
-
Notifications
You must be signed in to change notification settings - Fork 554
[WIP] queen-attack: use Algebraic Notation for coordinates? #446
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
Conversation
Typically, chess coordinates are expressed in [AN](https://en.wikipedia.org/wiki/Algebraic_notation_(chess)). Wouldn't it add some flavor to this exercise to use that notation? Doing so... - ups the fun factor 🎉 by increasing the depth of the exercise by pulling concepts from the domain of the problem space; - makes the exercise slightly more challenging 💪 ; - with numeric tuples, it's really easy to slip into [primitive obsession](http://wiki.c2.com/?PrimitiveObsession) (passing around arrays of integers, for example) — by using AN, it's easier to make the "argument" to address that code smell 🐽 .
I think that At least, we need to change the indexing system to be (1,1) based, right-up oriented, to match chess, but I'm still uncertain about if using chess notation in a string would be putting to much in a single exercise. If all the exercises involve parsing, we dilute what makes each one of them interesting, so I'm usually against mixing too many things in the same problem. I believe that the problems should be short and focused, this way they don't get tiring and boring. Maybe it is OK in this case, because it is related to chess anyway. I don't know... Taking the opportunity to discuss another thing in the test suite, the
It seems that this was written with OOP in mind. What is being created ❓ |
I am in favour of using chess co-ordinates. Reasoning:
Additional proposal:
|
@rbasso said:
... and @Insti replied:
👍 |
}, | ||
"expected": -1 | ||
}, | ||
{ | ||
"description": "queen must have positive file", | ||
"queen": { | ||
"position": "(2,-2)" | ||
"position": "_3" |
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.
This does not represent a negative file.
I would like us to think about the complexity we're adding to the problem by making this change.
Which, fine, if there's some benefit to it. But I don't see what the benefit is beyond "It makes it more chess like." It certainly gives the students more things to do, but I don't think it makes the problem any better. I don't think verisimilitude should be our goal in these problems. If making the problem more realistic makes the learning experience better, then I'm all for it. But I don't see it here. |
Yeah, well put, @IanWhitney... we don't want difficulty for difficulty's sake; that's just annoying. Having had a chance to go away and come back to the idea, I see how the added requirement would likely just layer on more work, not change the solution fundamentally. That is, practitioners would probably just have to do the work to interpret the AN into integer tuples and then everything would remain the same. Thanks for the discussion! |
(this PR is not intended to be merged, but start a conversation; additional changes edits to the README would be required to make this edit complete)
Typically, chess coordinates are expressed in AN. Wouldn't it add some flavor to this exercise to use that notation?
Doing so...