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

Design better player command interface #86

Open
jcowman2 opened this issue Dec 10, 2018 · 0 comments
Open

Design better player command interface #86

jcowman2 opened this issue Dec 10, 2018 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed research Requires outside research
Milestone

Comments

@jcowman2
Copy link
Contributor

jcowman2 commented Dec 10, 2018

Overview

Player commands are instructions that are submitted by the player of a Regal game. At the moment, this handling is underdeveloped (see description below).

This issue is meant to serve as a discussion thread for the research and design of an improved player command interface experience.

Description

Currently, the player commands are parsed as raw strings through the onPlayerCommand hook. The flow looks something like this:

onPlayerCommand((command: string) => game => {
    if (command === "A") {
        ...
    } else if (command === "B") {
        ...
    }
    ...
});

Handling player commands by trying to parse a string with a series of if-else blocks is not scalable or fun. The Regal Game Library should provide a more intuitive interface for building and handling these commands.

More research into this topic is needed. Further discussion should take place as comments on this issue.

@jcowman2 jcowman2 added enhancement New feature or request help wanted Extra attention is needed research Requires outside research labels Dec 10, 2018
@jcowman2 jcowman2 added this to the Future milestone Dec 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed research Requires outside research
Projects
None yet
Development

No branches or pull requests

1 participant