Add rulesets
This commit is contained in:
parent
43065902ae
commit
8ed8449b11
2 changed files with 5 additions and 1 deletions
|
@ -11,6 +11,9 @@ Meteor.methods({
|
|||
|
||||
let roomId = undefined;
|
||||
let state = "waitingRoom";
|
||||
let ruleset = {
|
||||
decks: 2,
|
||||
};
|
||||
|
||||
// attempt to get a valid room code 10 times
|
||||
let remainingAttempts = 10;
|
||||
|
@ -20,7 +23,7 @@ Meteor.methods({
|
|||
let started = new Date();
|
||||
|
||||
try {
|
||||
let result = Rooms.insert({ joinCode, started, state });
|
||||
let result = Rooms.insert({ joinCode, started, state, ruleset });
|
||||
roomId = result;
|
||||
break;
|
||||
} catch (e) {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<p>Join code: {{ currentRoom.joinCode }}</p>
|
||||
<p>State: {{ currentRoom.state }}
|
||||
<p>Owner: {{ playerNames[currentRoom.owner] }}</p>
|
||||
<p>Rules: <br /><pre>{{ JSON.stringify(currentRoom.ruleset, null, 2) }}</pre></p>
|
||||
<p>
|
||||
Players:
|
||||
<ul>
|
||||
|
|
Loading…
Reference in a new issue