{"action":"closed","issue":{"url":"https://api.github.com/repos/ornicar/scalachess/issues/3","labels_url":"https://api.github.com/repos/ornicar/scalachess/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/ornicar/scalachess/issues/3/comments","events_url":"https://api.github.com/repos/ornicar/scalachess/issues/3/events","html_url":"https://github.com/ornicar/scalachess/issues/3","id":19823890,"number":3,"title":"50 moves rules doesn't include castling","user":{"login":"lichesser","id":5413925,"avatar_url":"https://avatars.githubusercontent.com/u/5413925?v=3","gravatar_id":"","url":"https://api.github.com/users/lichesser","html_url":"https://github.com/lichesser","followers_url":"https://api.github.com/users/lichesser/followers","following_url":"https://api.github.com/users/lichesser/following{/other_user}","gists_url":"https://api.github.com/users/lichesser/gists{/gist_id}","starred_url":"https://api.github.com/users/lichesser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lichesser/subscriptions","organizations_url":"https://api.github.com/users/lichesser/orgs","repos_url":"https://api.github.com/users/lichesser/repos","events_url":"https://api.github.com/users/lichesser/events{/privacy}","received_events_url":"https://api.github.com/users/lichesser/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2013-09-20T15:28:55Z","updated_at":"2016-01-30T10:32:46Z","closed_at":"2016-01-30T10:32:46Z","body":"Looking at [this code][1] in [`Move.scala`][1] (which I think is responsible for keeping a history of moves which possibly fall under the 50 moves rule) I think there is a bug.\r\n\r\nCastling shouldn't reset the history counting (thus preventing the 50 moves rule from getting applied). The [FIDE rules (9.3)][2] for the 50 moves rule only mention \"pawn movement\" and \"capture\".\r\n\r\n----\r\n\r\nAs I don't fully understand the code I'm unsure whether the `promotes` check is included there correctly. Is it needed because at the time of the check `piece is Pawn` isn't true anymore as the pawn was promoted and thus `promotes` is checked to check for a special kind of \"pawn movement\"?\r\n\r\n---\r\n\r\nThis report is also related to the discussion in the [50 moves rule](http://lichess.org/forum/lichess-feedback/50-moves-rule) thread on lichess.org \r\n\r\n[1]: https://github.com/ornicar/scalachess/blob/a8d7e42f13117a8bfb109c4998bf810ea16a7f9d/src/main/scala/Move.scala#L21\r\n[2]: http://www.fide.com/fide/handbook.html?id=124&view=article"}}