rem: function findFromKing(pos, toSAN, toCoords, color) { var to = toCoords var froms = new Array( new Array(to[0], to[1]+1), new Array(to[0], to[1]-1), new Array(to[0]+1, to[1]), new Array(to[0]-1, to[1]),  new Array(to[0]+1, to[1]+1), new Array(to[0]+1, to[1]-1), new Array(to[0]-1, to[1]+1), new Array(to[0]-1, to[1]-1) )  var tmp for(var i=0;i<froms.length;i++) { try { tmp = pos[froms[i][0]][froms[i][1]] if (tmp.piece == 'king' && tmp.color == color) return froms[i] } catch (e) {} } throw('No king move found') } 
add: function findFromKing(board, pos, color) { var x = board.wKingX, y = board.wKingY if ("black" == color) x = board.bKingX, y = board.bKingY return new Array(x,y) } 
context: 	function findFromKing(pos, toSAN, toCoords, color) {		var to = toCoords		var froms = new Array(									new Array(to[0], to[1]+1),									new Array(to[0], to[1]-1),									new Array(to[0]+1, to[1]),									new Array(to[0]-1, to[1]),									new Array(to[0]+1, to[1]+1),									new Array(to[0]+1, to[1]-1),									new Array(to[0]-1, to[1]+1),									new Array(to[0]-1, to[1]-1) 								)		var tmp		for(var i=0;i<froms.length;i++) {			try {				tmp = pos[froms[i][0]][froms[i][1]]				if (tmp.piece == 'king' && tmp.color == color)					return froms[i]			}			catch (e) {}		}		throw('No king move found')}
meta: 5532	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5532/8dc82f970441289f8c19dae01ddbeadc156f15d6/converter.js/buggy/src/converter.js