Timeline for Checking if a Chess space has been attacked
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 17, 2015 at 0:43 | history | edited | TheCoffeeCup | CC BY-SA 3.0 |
added 52 characters in body
|
Dec 17, 2015 at 0:41 | comment | added | TheCoffeeCup | @ajax333221 Good point, will edit my answer. | |
Dec 17, 2015 at 0:40 | comment | added | ajax333221 |
not really, when I separate }else if(piece_direction%2){ and the if inside, its like a little trap to end the chain, if it continues I guarantee piece_direction%2 is false
|
|
Dec 17, 2015 at 0:38 | comment | added | TheCoffeeCup |
@ajax333221 With the exception of the missing 6 , and the missing ( , the rest of the code does exactly what your original code does, from what I can see.
|
|
Dec 17, 2015 at 0:36 | history | edited | TheCoffeeCup | CC BY-SA 3.0 |
added 2 characters in body
|
Dec 17, 2015 at 0:33 | comment | added | ajax333221 |
you are missing a 6 here (piece_abs_val == && i == 0) and I think there are some extra ) or missing/missplaced ( , also the (piece_abs_val == 3) (which is the bishop) is meant to only be true if piece_direction % 2 is false, but I understand your point/design, thanks.
|
|
Dec 17, 2015 at 0:20 | history | answered | TheCoffeeCup | CC BY-SA 3.0 |