Retired
Calculate chess move number (retired)
Description:
In two-player sequential games like chess, a ply is one turn taken by one of the players. However, in standard chess terminology, one move consists of a turn by each player; therefore a ply in chess is a half-move.
So, ply 0 is the first move of white, ply 1 the first move of black.
Write a function that takes a ply number and returns the move number.
For example:
calculateMove(0) returns 1
calculateMove(1) returns 1
calculateMove(2) returns 2
calculateMove(3) returns 2
calculateMove(100) returns 51
Algorithms
Numbers
Data Types
Mathematics
Logic
Arithmetic
Similar Kata:
Stats:
Created | Sep 15, 2020 |
Warriors Trained | 21 |
Total Skips | 1 |
Total Code Submissions | 18 |
Total Times Completed | 9 |
JavaScript Completions | 9 |
Total Stars | 1 |
% of votes with a positive feedback rating | 0% of 5 |
Total "Very Satisfied" Votes | 0 |
Total "Somewhat Satisfied" Votes | 0 |
Total "Not Satisfied" Votes | 5 |
Total Rank Assessments | 5 |
Average Assessed Rank | 8 kyu |
Highest Assessed Rank | 8 kyu |
Lowest Assessed Rank | 8 kyu |