Test branch

Some corner cases are still uncovered I think (like King shouldn't move to attacked position), but it should work in general.