blob: a71697d2825d5fce3a91574e50f3fbf780d74b11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
const LC = require('./src/client');
const playerName = process.env.PLAYER_NAME || 'A shy user';
client = LC.newClient({
playerName,
challengerURL: process.env.CHALLENGER_URL,
});
client.start()
.then(token => console.log(`${playerName} has registered with token ${token}`) || token)
.then(client.nextChallenge)
.then(challenge => console.log(`Next challenge: ${challenge}`) || challenge)
.then(client.solve)
.then(solution => console.log(`… solved into: ${solution}`));
|