Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cpu turn could be more clear #31

Open
yassienAbdillahi opened this issue Feb 15, 2023 · 0 comments
Open

Cpu turn could be more clear #31

yassienAbdillahi opened this issue Feb 15, 2023 · 0 comments

Comments

@yassienAbdillahi
Copy link

You're using a setTimeout here to delay the cpu's move attack/heal. This isn't immediately obvious to the player playing as banana joe so they may not wait and continue to click on attack/heal only to suddenly see their own health (seemingly) randomly decrease when the cpu's timer finally fires and they attack.

A potential way to improve the user experience would be to hide the attack/heal buttons temporarily and then show sometging to indicate that the game is waiting for the cpu to take their turn.

setTimeout(() => {
const cpuFuncs = [CpuAttack, CpuHeal];
const randomCpuFunc = cpuFuncs[Math.floor(Math.random() * 2)];
randomCpuFunc();
}, 5000);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant