careercup上的一道amazon面试题# JobHunting - 待字闺中
l*3
1 楼
int board[8][8] each value in the matrix represents a character. 1-9 number
represents all whites and 11-19 represents all blacks.
Given a pawn at (x,y) print all possible moves. Assume whites are index 0
and blacks are at index 7.
请教这个题怎么做啊, 不了解国际象棋的规则. 这里1-9代表白色什么意思啊, 白方有
16个6种棋子, 不知道这个大小是9的取值范围怎么理解. 还有移动卒需要考虑后果吗,
比如卒子被吃掉之类的. 看的稀里糊涂的.
represents all whites and 11-19 represents all blacks.
Given a pawn at (x,y) print all possible moves. Assume whites are index 0
and blacks are at index 7.
请教这个题怎么做啊, 不了解国际象棋的规则. 这里1-9代表白色什么意思啊, 白方有
16个6种棋子, 不知道这个大小是9的取值范围怎么理解. 还有移动卒需要考虑后果吗,
比如卒子被吃掉之类的. 看的稀里糊涂的.