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
1