Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
you are absolutely correct, using a pattern as static variable is about 3-4 times faster.
closed. not an issue; description clarifies board size.
closed. not an issue.
i thought that the adapted description would make things clear enough so it would't be a bother.
However, if most people think it would be much better to have a standard size board, this can be changed.
Also, feel to edit the tests if you like.
The number of pieces (like, having possibly more than 2 knights) i would leave though as this could possibly happen by promotion anyhow.
updated the description to make this more clear.
im sorry that was not meant to be annoying at all but i thought that the principle of knight moves and finding forks had nothing to do with the standard size of the board or the standard piece setup.
thanks for the edits!
I can edit the description but cant save edits to the tests anymore. neither by republishing nor by unpublish save then republish. gave up on that.
it should always be uppercase. description adapted.
EDIT: editor stopped working. no more changes possible. any ideas?
cant > Well, ok, there is something unnatural to your current class
I removed the constructor to simplify and reduce the description. Explaining how the solver has to code a class and what the constructor does only detracts. Also, the position and player turn are both input data and therefore to my mind should go into the method. This leaves the solver free to use an instance variable for the board, or pass the board (possibly changed with piece moves) to helper functions.
done.
done.
done.
Thank you for your comments!
I'm still unhappy with the formatting of the failure messages, but I don’t know how to fix that.
only when in the first string.
in the replacement string, it refers (together with the following number) to the group caught by the parentheses in the first string: $1 -> first group, $2 -> second group... see g.g. http://users.cs.cf.ac.uk/Dave.Marshall/Internet/NEWS/regexp.html