Starlight-30036225 / ChessTCP

FILLMELATER
0 stars 0 forks source link

Display whos turn #30

Closed Starlight-30036225 closed 5 months ago

Starlight-30036225 commented 7 months ago

Currently it is not make very obvious who's turn it is by the board display class. I should change highlight colours and have a text box to make this much clearer.

Starlight-30036225 commented 7 months ago

g.setColor(Color.BLACK); g.setFont(new Font("serif", ROMAN_BASELINE, turn? 20: 15)); g.drawString(turn? "Your turn" : "Opponent's turn", MARGIN, BOARD_HEIGHT - MARGIN);

At the end of the draw cycle, this will display who's turn it currently is.

Turn is a Boolean variable that flips every time the board is re-rendered.

I'm not sure how this will work for spectators but that's a later issue.

image

image

Starlight-30036225 commented 7 months ago

It would make it even clearer who's turn it is if the previous move was visible somewhere, either on the board or in a log. But I will come back to that.