Skip to main content
6 of 8
deleted 2 characters in body
asibahi
  • 411
  • 2
  • 9

#F#, 241 237 225 216 214 211 bytes

let G(c:string)=for k=1 to 380 do printf(if k%20=0 then"\n"elif"ABCDEFGHJKLKMNOPQRST".IndexOf c.[0]=k%20&&19-k/20=int(c.Substring 1)then"o"elif(k%20=4||k%20=10||k%20=16)&&(k/20=3||k/20=9||k/20=15)then"*"else".") 

Usage: G "F5"

Tricky one this one ... I wonder if it can be made shorter.

Edit: fixed a bug, added numbers some places removed numbers in others, somehow ended up with the same count. Might try shuffling numbers around later Done.

Edit2: saved more bytes by spelling out one of the conditionals, counter intuitively.

Edit3: Fixed another bug: should work now for pieces on the last rank and managed to save two bytes while I am at it, somehow.

Try it online

asibahi
  • 411
  • 2
  • 9