DOBRO / binbo

Chess representation written in Erlang using Bitboards, ready for use on game servers
Apache License 2.0
124 stars 12 forks source link

Add move() function taking integers 0-63 #3

Closed JMS55 closed 4 years ago

DOBRO commented 4 years ago

Describe please

JMS55 commented 4 years ago

all_legal_moves() can provide moves as integers, but move() requires you to convert to a string like "e1:a2". It would be great to be able to use move() with integers as well, like move(server_pid, from, to).

DOBRO commented 4 years ago

Added fun binbo:index_move/3,4

Examples: binbo:index_move(Pid, From, To)

binbo:index_move(Pid, From, To, 'q') binbo:index_move(Pid, From, To, 'r') binbo:index_move(Pid, From, To, 'b') binbo:index_move(Pid, From, To, 'n')

JMS55 commented 4 years ago

Thanks, works great! Feel free to close this now.