Skip to content

Commit

Permalink
No wait screen before final truth round
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicespresso committed May 11, 2020
1 parent 0441605 commit 23e5133
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 41 deletions.
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ class App extends Component {
*/
handleClick = (e) => {
let target = e.target.firstElementChild !== null ? e.target.firstElementChild.textContent : e.target.textContent;
if (this.state.step === 24 && target==='Human 🤷‍♀️') this.setState({result: 'You are incorrect - this was a bot! '})
if (this.state.step === 24 && target==='Bot 🤖') this.setState({result: 'You are correct - this was a bot! '})
if (this.state.step === 23 && target==='Human 🤷‍♀️') this.setState({result: 'You are incorrect - this was a bot! '})
if (this.state.step === 23 && target==='Bot 🤖') this.setState({result: 'You are correct - this was a bot! '})

// welcome to callback hell :3
this.setState({ timerStart: Date.now()},
Expand Down
147 changes: 108 additions & 39 deletions src/stateMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const stateMap = [
messages: [],
main: 'Narrator',
headerText: 'A Truth or Dare Turing Test',
fieldTop: 'Welcome to Bot or Not 🤖',
fieldTop: 'Welcome to Bot or Not... 🤖',
fieldBottom: '',
input: 'SingleButton',
singleButtonText: 'Next',
Expand All @@ -30,14 +30,80 @@ export const stateMap = [
messages: [],
main: 'Narrator',
headerText: 'A Truth or Dare Turing Test',
fieldTop: 'You’ll have to guess whether the other player is a 🤷‍♀️ or a 🤖',
fieldTop: "...a game of truth, where you have to decide if your opponent is human",
fieldBottom: '',
input: 'SingleButton',
singleButtonText: 'Next',
button1Text: '',
button2Text: '',
},{
},
{
step: 3,
timeLimit: 6*1000,
messages: [],
main: 'Narrator',
headerText: 'A Truth or Dare Turing Test',
fieldTop: "It's like truth or dare, with just the 'truth' part...",
fieldBottom: '',
input: 'SingleButton',
singleButtonText: 'Next',
button1Text: '',
button2Text: '',
},
{
step: 4,
timeLimit: 6*1000,
messages: [],
main: 'Narrator',
headerText: 'A Truth or Dare Turing Test',
fieldTop: "...you and your opponent take turns to ask questions.",
fieldBottom: '',
input: 'SingleButton',
singleButtonText: 'Next',
button1Text: '',
button2Text: '',
},
{
step: 5,
timeLimit: 6*1000,
messages: [],
main: 'Narrator',
headerText: 'A Truth or Dare Turing Test',
fieldTop: 'Each round is 60 seconds ⏱',
fieldBottom: '',
input: 'SingleButton',
singleButtonText: 'Next',
button1Text: '',
button2Text: '',
},
{
step: 6,
timeLimit: 6*1000,
messages: [],
main: 'Narrator',
headerText: 'A Truth or Dare Turing Test',
fieldTop: "After three rounds, you judge whether they're a 🤷‍♀️ or a 🤖...",
fieldBottom: '',
input: 'SingleButton',
singleButtonText: 'Next',
button1Text: '',
button2Text: '',
},
{
step: 7,
timeLimit: 6*1000,
messages: [],
main: 'Narrator',
headerText: 'A Truth or Dare Turing Test',
fieldTop: "...and they'll be judging you, too 😉",
fieldBottom: '',
input: 'SingleButton',
singleButtonText: 'Next',
button1Text: '',
button2Text: '',
},
{
step: 8,
timeLimit: 1000*1000,
messages: [],
main: 'Narrator',
Expand All @@ -48,8 +114,9 @@ export const stateMap = [
singleButtonText: '',
button1Text: '',
button2Text: '',
},{
step: 4,
},
{
step: 9,
timeLimit: getRandomInt(6,12)*1000,
messages: [],
main: 'MatchingScreen',
Expand All @@ -61,7 +128,7 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 5,
step: 10,
timeLimit: 1000*1000,
messages: [],
main: 'Narrator',
Expand All @@ -72,9 +139,23 @@ export const stateMap = [
singleButtonText: 'Chat',
button1Text: '',
button2Text: '',
},{
step: 6,
timeLimit: 45*1000,
},
{
step: 11,
timeLimit: 1000*1000,
messages: [],
main: 'Narrator',
headerText: '',
fieldTop: 'Good luck, and remember, act human!',
fieldBottom: '',
input: 'SingleButton',
singleButtonText: 'Chat',
button1Text: '',
button2Text: '',
},
{
step: 12,
timeLimit: 59*1000,
messages: [],
headerText: 'Practice round',
main: 'Chat',
Expand All @@ -85,7 +166,7 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 7,
step: 13,
timeLimit: 1000*1000,
messages: [],
main: 'Narrator',
Expand All @@ -97,7 +178,7 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 8,
step: 14,
timeLimit: getRandomInt(4,6)*1000,
messages: [],
main: 'NarratorWait',
Expand All @@ -109,7 +190,7 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 9,
step: 15,
timeLimit: 1000*1000,
messages: [],
main: 'Narrator',
Expand All @@ -121,8 +202,8 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 10,
timeLimit: 45*1000,
step: 16,
timeLimit: 59*1000,
messages: [],
headerText: '',
main: 'Chat',
Expand All @@ -133,7 +214,7 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 11,
step: 17,
timeLimit: 1000*1000,
messages: [],
main: 'Narrator',
Expand All @@ -145,7 +226,7 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 12,
step: 18,
timeLimit: 1000*1000,
messages: [],
main: 'Narrator',
Expand All @@ -157,8 +238,8 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 13,
timeLimit: 45*1000,
step: 19,
timeLimit: 59*1000,
messages: [],
main: 'Chat',
headerText: '',
Expand All @@ -169,7 +250,7 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 14,
step: 20,
timeLimit: getRandomInt(4,6)*1000,
messages: [],
main: 'NarratorWait',
Expand All @@ -181,20 +262,8 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 15,
timeLimit: 1000*1000,
messages: [],
main: 'Narrator',
headerText: '',
fieldTop: 'Last round: Truth ⚖️',
fieldBottom: '',
input: 'SingleButton',
singleButtonText: 'I am ready!',
button1Text: '',
button2Text: '',
},{
step: 16,
timeLimit: 45*1000,
step: 21,
timeLimit: 59*1000,
headerText: '',
main: 'Chat',
fieldTop: '',
Expand All @@ -204,7 +273,7 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 17,
step: 22,
timeLimit: 1000*1000,
messages: [],
main: 'Narrator',
Expand All @@ -216,7 +285,7 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 18,
step: 23,
timeLimit: 1000*1000,
messages: [],
main: 'Narrator',
Expand All @@ -228,7 +297,7 @@ export const stateMap = [
button1Text: 'Bot 🤖',
button2Text: 'Human 🤷‍♀️',
},{
step: 19,
step: 24,
timeLimit: 1000*1000,
messages: [],
main: 'End',
Expand All @@ -240,7 +309,7 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 20,
step: 25,
timeLimit: 1000*1000,
messages: [],
main: 'About',
Expand All @@ -252,7 +321,7 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 21,
step: 26,
timeLimit: 1000*1000,
messages: [],
main: 'Credits',
Expand All @@ -264,7 +333,7 @@ export const stateMap = [
button1Text: '',
button2Text: '',
},{
step: 22,
step: 27,
timeLimit: 10000*1000,
messages: [],
headerText: 'Free chat zone',
Expand Down

0 comments on commit 23e5133

Please sign in to comment.