mkeeter / pont

An online board game in Rust and WebAssembly
https://mattkeeter.com/projects/pont
Apache License 2.0
260 stars 20 forks source link

Highlight tiles that were just played #6

Closed gjeuken closed 4 years ago

gjeuken commented 4 years ago

This is a very rudimentary solution to #4.

It adds a class played to the tiles on add_piece and then removes the played class from all tiles on on_move_accepted and on_played.

The code is probably not good enough given my very limited knowledge of Rust, but it might be of some help.

mkeeter commented 4 years ago

Updated + merged in fd69a0159cc0501f6d3a9f5cbd25dbdcf56854ba, thanks!

I ended up changing the color to make it more neutral, although I'm still not 100% happy with the color scheme – needing to distinguish between active + played + placed while not messing with the primary colors is tricky!