Can Two Rooks Attack Each Other on a Chessboard

View profile for Oscar Castillo-Felisola

Physicist | Data Scientist | Data Engineer | Researcher

Rook Attack Given two strings for the location of two rooks on a chess board, determine if they can attack each other. A standard chessboard is 8x8, with columns labeled A through H (left to right) and rows labeled 1 through 8 (bottom to top). Rooks can move as many squares as they want in a horizontal or vertical direction. So if they are on the same row or column, they can attack each other. freeCodeCamp #DailyCodingChallenge #python #javascript

I would ask if str_rook1(i)=str_rook2(i), for i=1,2

Like
Reply

To view or add a comment, sign in

Explore content categories