endturn function is written.
Merge remote-tracking branch 'origin/master'