guyver2 / battlechess

Chess with Battleship modification. You can only see around your pieces.
3 stars 4 forks source link

I believe move is allowed when it's not your turn #28

Open quimnuss opened 3 years ago

quimnuss commented 3 years ago

I think it only checks that the chosen piece matches the color of the turn, but not that the player sending it is the right color.

quimnuss commented 3 years ago

Thing is I was sending moves with the wrong token in the exon tests and it didn't complain

guyver2 commented 3 years ago

it works as expected, sending moves when it's not your turn returns an error. @quimnuss how exactly does this issue happens for you?

quimnuss commented 3 years ago

I think the issue happens when the white sends a valid black move on black's turn. I have to make a test for this to be sure that's what happened on the exon games --> it didn't throw an error when it should have.

On Fri, Jun 11, 2021 at 12:39 PM Pol Monsó Purtí @.***> wrote:

I think the issue happens when the white sends a valid black move on black's turn. I have to make a test for this to be sure that's what happened on the exon games --> it didn't throw an error when it should have.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/guyver2/battlechess/issues/28#issuecomment-859489305, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA74OCIQ7OBEYY6CXRPLNADTSHRXRANCNFSM453PNRJA .

guyver2 commented 3 years ago

OK right, This I don't know, the UI doesn't allow such an API call. But if it is a possibility in the backend it should be fixed.