Skip to content

Client doesn't receive state updates for AI moves #1208

Open
@captn3m0

Description

@captn3m0

I recently upgraded my Okiya implementation from 0.32 to 0.50, and moved away from React, following the Tic Tac Toe guide.

The game works fine with 2 player manual control. The AI works fine as well, but the AI gameplay does not trigger the state update event. The subscription is setup normally:

constructor(rootElement) {
  this.client = Client({ game: Okiya, numPlayers: 2, });
  this.client.start();
  this.rootElement = rootElement;

  this.client.subscribe(state => {
    this.update(state)
    this.attachListeners();
  });
}

As a result, the UI is not updated with AI-moves, in case react is not used. The game source is at https://github.com/captn3m0/okiya

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