4 kyu
Play Tetris : Shape anastomosis
Description:
Play Tetris : Shape anastomosis
About Tetris
Most people know that, so I ignore it, if you don't know, look here.
Task
Give you a "board" and a "block" ,find the shape anastomosis in the board, return its coordinates as a string. Example:
Both board and block are given by 2D Array
■■■■
■□□■ □□
■□□■ □□ ===> "[1,1],[1,2],[2,1],[2,2]"
■■■■
board block its coordinates(if not found,return "")
■■■■■■
■■□□□■ □□□
■■□■■■ □■■ ===> "[1,2],[1,3],[1,4],[2,2]"
■■■■■■
please ignore the ■ in block, it's just to keep shape
The returned string contains only the □'s coordinates
■■●●●■
■●□□□● □□□
■●□●●■ □■■
■■●■■■
Shape anastomosis means that the shape of the outer perimeter
is closed, look at the position of ● above
In addition, the returned coordinates are arranged in order from top to bottom, from left to right. If there are more than one to meet the conditions of the location, also in accordance with the above order.
Classic Games Series
- Play Tetris : Shape anastomosis
- Play FlappyBird : Advance Bravely
- Play BomberMan : Kill All Enemies (Released as soon as possible...)
- Play PacMan : Gourmet Haunt (Released as soon as possible...)
- Play LoodRunner : No Enemy Race (Released as soon as possible...)
Games
Puzzles
Similar Kata:
Stats:
Created | Feb 20, 2016 |
Published | Feb 21, 2016 |
Warriors Trained | 559 |
Total Skips | 60 |
Total Code Submissions | 1181 |
Total Times Completed | 93 |
JavaScript Completions | 93 |
Total Stars | 38 |
% of votes with a positive feedback rating | 97% of 45 |
Total "Very Satisfied" Votes | 42 |
Total "Somewhat Satisfied" Votes | 3 |
Total "Not Satisfied" Votes | 0 |
Total Rank Assessments | 4 |
Average Assessed Rank | 4 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 5 kyu |