Learner, Hacker, Idiot
What's the mathmatical answer? In PHP code I'd probably deal with the chess board as a 2 dimensional array. Are you looking for something more clever than that? I'm curious. You could also handle it as a one dimensional array in which, perhaps, the keys of the array are the formal positions on the board:$chessBoard["r1"] = "r";$chessBoard["kn1"] = "kn";$chessBoard["b1"] = "b";$chessBoard["k1"] = "k";but then movement isn't as straight forward.
Thanks lawrence krubner for your comments. Actually, I'll be expecting just two keywords: Matrix and two dimensional array; that's all. I don't expect any brilliant answer:-)
Post a Comment