Skip to content

Cpu turn could be more clear #31

@yassienAbdillahi

Description

@yassienAbdillahi

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);
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions