- Install dependencies in
/backendand/frontendwithnpm install. - Compile the project in
/backendand/frontendwithnpm run build. - Copy
.env.exampleto.env. - Download the sipgate Softphone from here.
- Login with your sipgate account.
- Choose a phone number from your sipgate account and enter it as
NUMBER_TO_CALLin the.env. - Select the device, that is connected to the choosen phone number, in the dropdown of the softphone.
- Create an ngrok account on ngrok.com
- Copy your authtoken from ngrok and enter it's value as
NGROK_AUTH_TOKENin the.env. - Create a Personal-Access-Token on app.sipgate.com with the two scopes:
settings:sipgateio:readsettings:sipgateio:write
- Enter the token as
PAT_TOKENand the token ID asPAT_TOKEN_IDinto the.env.
- Start the project with
npm start. - Start the sipgate Softphone and ensure that the correct phone is selected (see Setup).
- Press
Enterin the console once the softphone is running and configured.
To connect to the game, the player must call the number shown on the screen and then use the numberpad to control the game. After reading the instructions, the player must first press a key to start the game.
Mastermind is about guessing a code, consisting of four different digits, in up to ten tries. After guessing a code, the game gives you two numbers as feedback:
- the number in the square brackets is the amount of digits that are at the correct position
- the number in the parentheses is the amount of digits that are at the wrong position, but do appear in the code
These two pieces of information will help you to improve your next guess. You will get more points, the fewer guesses you need and the faster you complete the game.
The two red arrows indicate in which row and column you are currently located. Press a digit from 1 to 6 to enter it at the present location. By clicking * the arrow moves to the right until it wraps around to the first column. You can confirm your input with the # button.
This issue occurs, when another ngrok instance is running. To fix this, you need to make sure that no other instance of Mastermind is running, by killing all processes on the ports 3000, 3001 and 3002. Enter the command sudo lsof -iTCP -sTCP:LISTEN and look for programs that listen on the ports listed above in the NAME column. Kill a process by its PID using sudo kill <PID>.
Since every players phone number is listed in a database, you need to remove the corresponding entry from the database to allow a caller to play again.
- Open the databse (for example with SQLitebrowser)
- Select the
gamestable - Find and delete the row that corresponds to the phone number
- Write the changes you've made