Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
find differences
#4
here is my idea, but please tell me the correct code Smile



str s="r1bqkb1r/pppp1ppp/2n2n2/4p3/4P3/3P4/PPPN1PPP/R1BQKBNR w KQkq -"


get t[0]="r1bqkb1r"
t|1]="pppp1ppp"
t[2]="2n2n2"
---
t[7]="R1BQKBNR"



then i want to create an array called d with d[0] --- d[7] lists such that:

for i 0 7

,k=0 #k will be the position of min characters in t[i]

,for j 0 t[i].len

,,if t[i][j] is a number (like 1 or 2) then k=k+length(t[i][j]) -1

,,else if t[i][j] is a min character (like r,b,q ..) then put k in the list d[i]

,k=k+1







something like this should work, what do you think about it?


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)