Haskell chess checkmate

  Kiến thức lập trình

Write a Haskell program that takes as input a list of lists (example below) and returns whether the white king is in checkmate or not. Return True if the king is in check and False otherwise. Remembering that a string is a list of characters (“abc” = [‘a’,’b’,’c’]), below is an example of input (in this case it is the initial situation of the chess):

[“tcbdrbct”,”pppppppp”,”8″,”8″,”8″,”8″,”PPPPPPPP”,”TCBDRBCT”]

False

I expect help with creating the Haskell code.

New contributor

vvmarquezz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

1

LEAVE A COMMENT