fix: check players hp before allowing them to start a battle
authorxangelo <git@xangelo.ca>
Thu, 13 Jul 2023 10:21:42 +0000 (06:21 -0400)
committerxangelo <git@xangelo.ca>
Thu, 13 Jul 2023 10:25:45 +0000 (06:25 -0400)
commit4d7a5560447631a4d5497d75d5ef1bb5d62bb1d4
tree26ef84db433fd901e7ebcc118e5b4bbab17accba
parentcecab786b949e1bf2c1c2db07b07d8083a83f82f
fix: check players hp before allowing them to start a battle

We display an error on the client side to stop them from starting a
battle.

We return a 400 on the server if the player doesn't have enough HP

fixes: #2
public/assets/bundle.js
src/client/index.ts
src/server/api.ts