Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow approved AI players to join games #1996

Open
wants to merge 2 commits into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions src/frontend-scripts/components/section-main/Creategame.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default class Creategame extends React.Component {
flappyMode: false,
flappyOnlyMode: false,
privateAnonymousRemakes: false,
allowBots: true,
customGameSettings: {
enabled: false,
// Valid powers: investigate, deckpeek, election, bullet; null for no power
Expand Down Expand Up @@ -599,6 +600,7 @@ export default class Creategame extends React.Component {
isEloLimited: false,
xpSliderValue: [0],
isXPLimited: false,
allowBots: true,
customGameSettings: {
enabled: false,
// Valid powers: investigate, deckpeek, election, bullet; null for no power
Expand Down Expand Up @@ -640,6 +642,7 @@ export default class Creategame extends React.Component {
isEloLimited: true,
xpSliderValue: [0],
isXPLimited: false,
allowBots: true,
customGameSettings: {
enabled: false,
// Valid powers: investigate, deckpeek, election, bullet; null for no power
Expand Down Expand Up @@ -681,6 +684,7 @@ export default class Creategame extends React.Component {
isEloLimited: false,
xpSliderValue: [0],
isXPLimited: false,
allowBots: true,
customGameSettings: {
enabled: true,
// Valid powers: investigate, deckpeek, election, bullet; null for no power
Expand Down Expand Up @@ -716,6 +720,7 @@ export default class Creategame extends React.Component {
isTourny: false,
blindMode: false,
timedMode: false,
allowBots: true,
isVerifiedOnly: !isRainbow,
timedSliderValue: [120],
customGameSliderValue: [7],
Expand Down Expand Up @@ -765,6 +770,7 @@ export default class Creategame extends React.Component {
isEloLimited: false,
xpSliderValue: [0],
isXPLimited: false,
allowBots: true,
customGameSettings: {
enabled: false,
// Valid powers: investigate, deckpeek, election, bullet; null for no power
Expand Down Expand Up @@ -807,6 +813,7 @@ export default class Creategame extends React.Component {
isEloLimited: false,
xpSliderValue: [0],
isXPLimited: false,
allowBots: true,
customGameSettings: {
enabled: false,
// Valid powers: investigate, deckpeek, election, bullet; null for no power
Expand Down Expand Up @@ -891,6 +898,7 @@ export default class Creategame extends React.Component {
isEloLimited: false,
xpSliderValue: [0],
isXPLimited: false,
allowBots: true,
customGameSettings: {
enabled: true,
// Valid powers: investigate, deckpeek, election, bullet; null for no power
Expand Down Expand Up @@ -933,6 +941,7 @@ export default class Creategame extends React.Component {
isEloLimited: false,
xpSliderValue: [0],
isXPLimited: false,
allowBots: true,
customGameSettings: {
enabled: false,
// Valid powers: investigate, deckpeek, election, bullet; null for no power
Expand Down Expand Up @@ -2321,6 +2330,26 @@ export default class Creategame extends React.Component {
marks={{ 0: 'TDing', 1: 'No TDing', 2: 'No Double TDing' }}
/>
</div>
<div className="four wide column">
<i class="fa-solid fa-robot"></i>
<h4 className="ui header">Allow Bots to join the game</h4>
<Switch
className="create-game-switch"
onChange={checked => {
this.setState({
allowBots: checked,
});
}}
checked={this.state.checked}
onColor="#627cc8"
offColor="#444444"
uncheckedIcon={false}
checkedIcon={false}
height={21}
width={48}
handleDiameter={21}
/>
</div>
</div>
<div className="row">
<div className="sixteen wide column">
Expand Down