6 kyu
Covered pawns
181 of 305mdandre
Description:
Given a list of white pawns on a chessboard (any number of them, meaning from 0 to 64 and with the possibility to be positioned everywhere), determine how many of them have their backs covered by another. Pawns attacking upwards since we have only white ones.
Please remember that a pawn attack(and defend as well) only the 2 square on the sides in front of him. https://en.wikipedia.org/wiki/Pawn_(chess)#/media/File:Pawn_(chess)_movements.gif
This is how the chess board coordinates are defined:
A | B | C | D | E | F | G | H | |
8 | ♜ | ♞ | ♝ | ♛ | ♚ | ♝ | ♞ | ♜ |
7 | ♟ | ♟ | ♟ | ♟ | ♟ | ♟ | ♟ | ♟ |
6 | ||||||||
5 | ||||||||
4 | ||||||||
3 | ||||||||
2 | ♙ | ♙ | ♙ | ♙ | ♙ | ♙ | ♙ | ♙ |
1 | ♖ | ♘ | ♗ | ♕ | ♔ | ♗ | ♘ | ♖ |
Fundamentals
Similar Kata:
Stats:
Created | Jul 29, 2017 |
Published | Jul 29, 2017 |
Warriors Trained | 906 |
Total Skips | 11 |
Total Code Submissions | 2130 |
Total Times Completed | 305 |
Python Completions | 181 |
JavaScript Completions | 111 |
Ruby Completions | 30 |
Total Stars | 14 |
% of votes with a positive feedback rating | 88% of 85 |
Total "Very Satisfied" Votes | 66 |
Total "Somewhat Satisfied" Votes | 17 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 6 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |