Haskell bot for a board game

Haskell bot for a board game
0.0 0

#1

hi everyone! i am working on a project in haskell and java. we created a game interface in java for the board game called Laska: http://pjb.com.au/laska/play_laska.html

now we are trying to create a bot in haskell, so players can play against a bot or bots against each other. the bot receives a FEN string from java as an input which contains the board state, next player and if there was a move then also the last move. the form of the string is the one like on the playlaska page: initial state of the board is “b,b,b,b/b,b,b/b,b,b,b/,/w,w,w,w/w,w,w/w,w,w,w w” where b stands for black, w for white; “,” indicates next column and “/” next row. The bot has to parse the string and then generate a list of all possible moves and choose one (listMoves and getMove).

Im trying to parse the string at first into all the different data types and then parse each of them separately in order to create an internal representation of the board and assign coordinates to each figure in order to calculate all possible moves. i started creating the data structures and the functions but i think my approach is not correct as im unable to test each function individually and right now clueless how to continue the implementation. could anyone give me an advice or tips on the functions / errors and maybe vague idea on how to continue from here?

code: http://lpaste.net/352402