Skip to content

Commit

Permalink
Edit documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
quasoft committed Dec 18, 2016
1 parent 1e3e00b commit 1328cc7
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,35 @@ Want a rule where every second dice is 6:6, well, nothing prevents you from crea
- Open file `app/server/config.js`
- Add the name of the new rule to the `enabledRules` array:

var config = {
'rulePath': '../../lib/rules/',
'enabledRules': [
'RuleBgCasual',
'RuleBgGulbara',
'RuleBgTapa',
'RuleCCYourRule' // <- Added a rule with country
// code `CC` and class name RuleCCYourRule.
]
};
var config = {
'rulePath': '../../lib/rules/',
'enabledRules': [
'RuleBgCasual',
'RuleBgGulbara',
'RuleBgTapa',
'RuleCCYourRule' // <- Added a rule with country
// code `CC` and class name RuleCCYourRule.
]
};

To enable the new rule in client:

- Open file `app/browser/js/config.js`
- Add the name of the new rule to the `selectableRules` array:
var config = {
'containerID': 'backgammon',
'boardUI': '../app/browser/js/SimpleBoardUI.js',
'defaultRule': 'RuleBgCasual',
'selectableRules': [
'RuleBgCasual',
'RuleBgGulbara',
'RuleBgTapa',
'RuleCCYourRule' // <- Added a rule with country
// code `CC` and class name RuleCCYourRule.
]
};

var config = {
'containerID': 'backgammon',
'boardUI': '../app/browser/js/SimpleBoardUI.js',
'defaultRule': 'RuleBgCasual',
'selectableRules': [
'RuleBgCasual',
'RuleBgGulbara',
'RuleBgTapa',
'RuleCCYourRule' // <- Added a rule with country
// code `CC` and class name RuleCCYourRule.
]
};

- Open file `app/browser/js/main.js` and add a new require after others:

`require('../../../lib/rules/RuleCCYourRule.js');`
Expand Down

0 comments on commit 1328cc7

Please sign in to comment.