jscrab icon indicating copy to clipboard operation
jscrab copied to clipboard

pointers to debug

Open deostroll opened this issue 8 years ago • 1 comments

Hi,

I like your work. Each time I run the game, I get new set of tiles. However, for live-debugging what the code does, whats recommended strategy?

There must be a way to manually set the racks (opponent as well as player). Can you provide some guidance here.

deostroll avatar May 23 '16 11:05 deostroll

Hi,

Sorry for the late reply - just realised I don't get any notifications when new messages arrive.

Don't know if it's still relevant, but here it is:

The following methods in ui.js set the racks of the player and the opponent. Notice where they are used and change the letters placed on the racks according to what you require.

self.setPlayerRack = function( letters )
{
     self.setLetters( 1, letters );
     if (self.firstrack) {
         self.firstrack = false;
         self.initRedips();
     }
};

self.setOpponentRack = function( letters )
{
    self.setLetters( 2, letters );
};

amnond avatar Aug 29 '16 18:08 amnond