mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 15:57:50 +01:00
Merge pull request #138 from AlecM33/minimum-playercount
lower minimum playercount
This commit is contained in:
@@ -76,12 +76,12 @@ commands defined in `package.json`.
|
||||
|
||||
If you simply want to run the app on the default port of **5000**:
|
||||
|
||||
`npm start:dev` (if developing on a linux machine)<br>
|
||||
`npm start:dev:windows` (if developing on a windows machine)
|
||||
`npm run start:dev` (if developing on a linux machine)<br>
|
||||
`npm run start:dev:windows` (if developing on a windows machine)
|
||||
|
||||
This command uses <a href="https://www.npmjs.com/package/nodemon">nodemon</a>
|
||||
to listen for changes to **server-side code** (Node.js modules) and automatically restart the server. If you do not want
|
||||
this, run instead `npm start:dev:no-hot-reload` or `npm start:dev:windows:no-hot-reload`.
|
||||
this, run instead `npm run start:dev:no-hot-reload` or `npm run start:dev:windows:no-hot-reload`.
|
||||
|
||||
If you are making changes to client-side javascript, in a separate terminal, execute `npm build:dev`. This uses <a href="https://webpack.js.org/">
|
||||
Webpack</a> to bundle javascript from the `client/src` directory and place it in the `client/dist` directory, which is ignored by Git.
|
||||
@@ -131,7 +131,7 @@ Have a question that isn't covered here? Email me at <a href="mailto:play.werewo
|
||||
|
||||
Tests are written using <a href="https://jasmine.github.io/">Jasmine</a>. End-to-end tests are run using <a href='https://karma-runner.github.io/latest/index.html'>Karma</a>.
|
||||
|
||||
Execute all tests by running `npm test`. Execute unit tests by running `npm test:unit`. Execute end-to-end tests by running `npm test:e2e`.
|
||||
Execute all tests by running `npm run test`. Execute unit tests by running `npm run test:unit`. Execute end-to-end tests by running `npm run test:e2e`.
|
||||
|
||||
Unit tests map 1:1 to the application directory structure - i.e. unit tests for
|
||||
`server/modules/GameManager` are found in `spec/unit/server/modules/GameManager_Spec.js`
|
||||
|
||||
@@ -36,14 +36,16 @@ export class GameCreationStepManager {
|
||||
2: {
|
||||
title: 'Create your deck of cards:',
|
||||
forwardHandler: () => {
|
||||
if (this.deckManager.getDeckSize() >= 3 && this.deckManager.getDeckSize() <= 50) {
|
||||
if (this.deckManager.getDeckSize() > 50) {
|
||||
toast('Your deck is too large. The max is 50 cards.', 'error', true);
|
||||
} else if (this.deckManager.getDeckSize() < 1) {
|
||||
toast('You must add at least one card', 'error', true);
|
||||
} else {
|
||||
this.currentGame.deck = this.deckManager.deck.filter((card) => card.quantity > 0);
|
||||
cancelCurrentToast();
|
||||
this.removeStepElementsFromDOM(this.step);
|
||||
this.incrementStep();
|
||||
this.renderStep('creation-step-container', this.step);
|
||||
} else {
|
||||
toast('You must have a deck for between 3 and 50 players', 'error', true);
|
||||
}
|
||||
},
|
||||
backHandler: this.defaultBackHandler
|
||||
|
||||
@@ -25,7 +25,7 @@ class Game {
|
||||
this.originalModeratorId = originalModeratorId;
|
||||
this.createTime = createTime;
|
||||
this.timerParams = timerParams;
|
||||
this.isFull = false;
|
||||
this.isFull = this.gameSize === 1 && !this.hasDedicatedModerator;
|
||||
this.timeRemaining = null;
|
||||
this.spectators = [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user