458.
is there any code that I haven't yet golfed?
Code:

Function s($x)
Dim $j,$,$a[2*$x],$p,$_
For $j = 0 to 2*$x
$a[$j] = $j-$x
Next

gosub d
For $ = 1 to $x
For $j = 1 to $
$p=1
gosub d
Next
$=$+($x>$)
For $j = 1 to $
$p=-1
gosub d
Next
Next
If 0= $x MOD 2
$=1
$p=1
gosub n
endif
For $ = 1 to $x
If $x MOD 2
$p=1
gosub n
$=$+($x>$)
endif
If $ < $x
$p=-1
gosub n
endif
If 0= $x MOD 2
$=$+($x>$)
$p=1
gosub n
endif
Next
$s=Split($s,a)
exit
:n
For $j = $ to $x
gosub d
next
return
:d
If $s
$_ = AScan($a,$j*$p)
$a[AScan($a,0)]=$j*$p
$a[$_]=0
$s = $s + a
EndIf
For Each $_ in $a
$s= $s + SubStr("W B",1+($_=)+2*($_>),1)
next
return
EndFunction