add sound switch
This commit is contained in:
Generated
+24
-12
@@ -26,7 +26,11 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="f9039135-aa11-4abd-ad74-f40c84e4fdb2" name="Default Changelist" comment="">
|
<list default="true" id="f9039135-aa11-4abd-ad74-f40c84e4fdb2" name="Default Changelist" comment="">
|
||||||
|
<change afterPath="$PROJECT_DIR$/server/src/app/controller/foo.js" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/client/src/components/Action.vue" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/components/Action.vue" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/client/src/components/Audio.vue" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/components/Audio.vue" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/client/src/views/game.vue" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/views/game.vue" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -137,7 +141,13 @@
|
|||||||
<workItem from="1619848860699" duration="11720000" />
|
<workItem from="1619848860699" duration="11720000" />
|
||||||
<workItem from="1622876620759" duration="234000" />
|
<workItem from="1622876620759" duration="234000" />
|
||||||
<workItem from="1625991704189" duration="1640000" />
|
<workItem from="1625991704189" duration="1640000" />
|
||||||
<workItem from="1626598050251" duration="893000" />
|
<workItem from="1626598050251" duration="1027000" />
|
||||||
|
<workItem from="1628481482390" duration="13548000" />
|
||||||
|
<workItem from="1628783520074" duration="2544000" />
|
||||||
|
<workItem from="1629517950448" duration="175000" />
|
||||||
|
<workItem from="1629903360315" duration="5734000" />
|
||||||
|
<workItem from="1647001315115" duration="2876000" />
|
||||||
|
<workItem from="1665892838491" duration="4505000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
@@ -179,19 +189,21 @@
|
|||||||
<option name="oldMeFiltersMigrated" value="true" />
|
<option name="oldMeFiltersMigrated" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="WindowStateProjectService">
|
<component name="WindowStateProjectService">
|
||||||
<state x="100" y="123" width="1240" height="622" key="com.intellij.history.integration.ui.views.FileHistoryDialog" timestamp="1616905008870">
|
<state x="100" y="100" width="1240" height="700" key="DiffContextDialog" timestamp="1647002209329">
|
||||||
<screen x="0" y="23" width="1440" height="822" />
|
<screen x="0" y="0" width="1440" height="900" />
|
||||||
</state>
|
</state>
|
||||||
<state x="100" y="123" width="1240" height="622" key="com.intellij.history.integration.ui.views.FileHistoryDialog/0.23.1440.822@0.23.1440.822" timestamp="1616905008870" />
|
<state x="100" y="100" width="1240" height="700" key="DiffContextDialog/0.0.1440.900@0.0.1440.900" timestamp="1647002209329" />
|
||||||
<state x="385" y="173" width="670" height="672" key="search.everywhere.popup" timestamp="1616902799000">
|
<state x="528" y="156" key="RollbackChangesDialog" timestamp="1647068368012">
|
||||||
<screen x="0" y="23" width="1440" height="822" />
|
<screen x="0" y="0" width="1440" height="900" />
|
||||||
</state>
|
</state>
|
||||||
<state x="385" y="173" width="670" height="672" key="search.everywhere.popup/0.23.1440.822@0.23.1440.822" timestamp="1616902799000" />
|
<state x="528" y="156" key="RollbackChangesDialog/0.0.1440.900@0.0.1440.900" timestamp="1647068368012" />
|
||||||
<state x="385" y="173" width="670" height="673" key="search.everywhere.popup/0.23.1440.823@0.23.1440.823" timestamp="1616837414379" />
|
<state x="100" y="100" width="1240" height="700" key="com.intellij.history.integration.ui.views.FileHistoryDialog" timestamp="1647068977589">
|
||||||
<state x="450" y="359" key="vcs.readOnlyHandler.ReadOnlyStatusDialog" timestamp="1616873123947">
|
<screen x="0" y="25" width="1440" height="814" />
|
||||||
<screen x="0" y="23" width="1440" height="822" />
|
|
||||||
</state>
|
</state>
|
||||||
<state x="450" y="359" key="vcs.readOnlyHandler.ReadOnlyStatusDialog/0.23.1440.822@0.23.1440.822" timestamp="1616873123947" />
|
<state x="100" y="100" width="1240" height="700" key="com.intellij.history.integration.ui.views.FileHistoryDialog/0.25.1440.814@0.25.1440.814" timestamp="1647068977589" />
|
||||||
<state x="450" y="360" key="vcs.readOnlyHandler.ReadOnlyStatusDialog/0.23.1440.825@0.23.1440.825" timestamp="1616839505918" />
|
<state x="385" y="196" width="670" height="676" key="search.everywhere.popup" timestamp="1647067452212">
|
||||||
|
<screen x="0" y="0" width="1440" height="900" />
|
||||||
|
</state>
|
||||||
|
<state x="385" y="196" width="670" height="676" key="search.everywhere.popup/0.0.1440.900@0.0.1440.900" timestamp="1647067452212" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -20,8 +20,6 @@
|
|||||||
@click="raise(size)"
|
@click="raise(size)"
|
||||||
v-show="showActionSize(size)"
|
v-show="showActionSize(size)"
|
||||||
> {{Math.floor(size)}}</i>
|
> {{Math.floor(size)}}</i>
|
||||||
<!-- <i @click="raise(pot)">{{pot}}</i>-->
|
|
||||||
<!-- <i @click="raise(pot * 2)">{{2*pot}}</i>-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="action-other-size"
|
<div class="action-other-size"
|
||||||
@@ -46,9 +44,11 @@
|
|||||||
<div class="shadow"
|
<div class="shadow"
|
||||||
@click="isRaise = false"></div>
|
@click="isRaise = false"></div>
|
||||||
</div>
|
</div>
|
||||||
<iAudio :play="playClick" type="click"></iAudio>
|
<div>
|
||||||
<iAudio :play="playFold" type="fold"></iAudio>
|
<iAudio :play="playClick && audioStatus" type="click"></iAudio>
|
||||||
<iAudio :play="playRaise" type="raise"></iAudio>
|
<iAudio :play="playFold && audioStatus" type="fold"></iAudio>
|
||||||
|
<iAudio :play="playRaise && audioStatus" type="raise"></iAudio>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -73,6 +73,7 @@ import { IPlayer } from '@/interface/IPlayer';
|
|||||||
@Prop() private isPreFlop!: boolean;
|
@Prop() private isPreFlop!: boolean;
|
||||||
@Prop() private isTwoPlayer!: boolean;
|
@Prop() private isTwoPlayer!: boolean;
|
||||||
@Prop() private currPlayer!: IPlayer;
|
@Prop() private currPlayer!: IPlayer;
|
||||||
|
@Prop() private audioStatus?: boolean;
|
||||||
|
|
||||||
private isRaise = false;
|
private isRaise = false;
|
||||||
private raiseSize: number = 0;
|
private raiseSize: number = 0;
|
||||||
@@ -123,16 +124,15 @@ import { IPlayer } from '@/interface/IPlayer';
|
|||||||
}
|
}
|
||||||
|
|
||||||
private action(command: string) {
|
private action(command: string) {
|
||||||
// if (command.indexOf('raise') > -1 || command === 'allin' || command === 'call' ) {
|
if (command.indexOf('raise') > -1 || command === 'allin' || command === 'call' ) {
|
||||||
// this.playRaise = true;
|
this.playRaise = true;
|
||||||
// }
|
}
|
||||||
// if (command === 'fold' || command === 'check') {
|
if (command === 'fold' || command === 'check') {
|
||||||
// this.playFold = true;
|
this.playFold = true;
|
||||||
// }
|
}
|
||||||
if (!this.actioned) {
|
if (!this.actioned) {
|
||||||
this.actioned = true;
|
this.actioned = true;
|
||||||
this.$emit('action', command);
|
this.$emit('action', command);
|
||||||
// this.isAction = false;
|
|
||||||
this.isRaise = false;
|
this.isRaise = false;
|
||||||
this.actioned = false;
|
this.actioned = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="audio-container">
|
<div class="audio-container">
|
||||||
<!-- <audio ref="click" controls>-->
|
<audio ref="click" controls>
|
||||||
<!-- <source src="../assets/mp3/click.mp3" type="audio/mpeg">-->
|
<source src="../assets/mp3/click.mp3" type="audio/mpeg">
|
||||||
<!-- Your browser does not support the audio element.-->
|
Your browser does not support the audio element.
|
||||||
<!-- </audio>-->
|
</audio>
|
||||||
<!-- <audio ref="raise" controls>-->
|
<audio ref="raise" controls>
|
||||||
<!-- <source src="../assets/mp3/raise.mp3" type="audio/mpeg">-->
|
<source src="../assets/mp3/raise.mp3" type="audio/mpeg">
|
||||||
<!-- Your browser does not support the audio element.-->
|
Your browser does not support the audio element.
|
||||||
<!-- </audio>-->
|
</audio>
|
||||||
<!-- <audio ref="fold" controls>-->
|
<audio ref="fold" controls>
|
||||||
<!-- <source src="../assets/mp3/fold.mp3" type="audio/mpeg">-->
|
<source src="../assets/mp3/fold.mp3" type="audio/mpeg">
|
||||||
<!-- Your browser does not support the audio element.-->
|
Your browser does not support the audio element.
|
||||||
<!-- </audio>-->
|
</audio>
|
||||||
|
<audio ref="income" controls>
|
||||||
|
<source src="../assets/mp3/income.mp3" type="audio/mpeg">
|
||||||
|
Your browser does not support the audio element.
|
||||||
|
</audio>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
:min-action-size="minActionSize"
|
:min-action-size="minActionSize"
|
||||||
:is-two-player="gamePlayers.length === 2"
|
:is-two-player="gamePlayers.length === 2"
|
||||||
:pot="pot"
|
:pot="pot"
|
||||||
|
:audio-status="audioStatus"
|
||||||
:prev-size="prevSize"
|
:prev-size="prevSize"
|
||||||
@action = 'action'
|
@action = 'action'
|
||||||
></actionDialog>
|
></actionDialog>
|
||||||
@@ -47,6 +48,7 @@
|
|||||||
<i @click="showBuyInDialog()">buy in</i>
|
<i @click="showBuyInDialog()">buy in</i>
|
||||||
<i @click="standUp()">stand Up</i>
|
<i @click="standUp()">stand Up</i>
|
||||||
<i @click="showCounterRecord">counter record</i>
|
<i @click="showCounterRecord">counter record</i>
|
||||||
|
<i @click="closeAudio()">audio ({{`${audioStatus ? 'open' : 'close'}`}})</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<BuyIn :showBuyIn.sync='showBuyIn'
|
<BuyIn :showBuyIn.sync='showBuyIn'
|
||||||
@@ -58,7 +60,7 @@
|
|||||||
<record :players="players"
|
<record :players="players"
|
||||||
v-model="showRecord"></record>
|
v-model="showRecord"></record>
|
||||||
<sendMsg @send = 'sendMsgHandle' :msg-list="msgListReverse"></sendMsg>
|
<sendMsg @send = 'sendMsgHandle' :msg-list="msgListReverse"></sendMsg>
|
||||||
<!-- <iAudio :play="playIncome" type="income"></iAudio>-->
|
<iAudio :play="playIncome && audioStatus" type="income" ></iAudio>
|
||||||
<gameRecord v-model="showCommandRecord"
|
<gameRecord v-model="showCommandRecord"
|
||||||
:game-list="gameList"
|
:game-list="gameList"
|
||||||
@getRecord = "getRecord"
|
@getRecord = "getRecord"
|
||||||
@@ -145,7 +147,7 @@
|
|||||||
private actionUserId = '';
|
private actionUserId = '';
|
||||||
private showAllin = false;
|
private showAllin = false;
|
||||||
private showMsg = false;
|
private showMsg = false;
|
||||||
// private playIncome = false;
|
private playIncome = false;
|
||||||
private msg = '';
|
private msg = '';
|
||||||
private time = ACTION_TIME;
|
private time = ACTION_TIME;
|
||||||
private timeSt = 0;
|
private timeSt = 0;
|
||||||
@@ -154,6 +156,7 @@
|
|||||||
private showCommandRecord = false;
|
private showCommandRecord = false;
|
||||||
private gameList: IGameRecord [] = [];
|
private gameList: IGameRecord [] = [];
|
||||||
private currGameIndex = 0;
|
private currGameIndex = 0;
|
||||||
|
private audioStatus = true;
|
||||||
private roomConfig: IRoom = {
|
private roomConfig: IRoom = {
|
||||||
isShort: false,
|
isShort: false,
|
||||||
smallBlind: 1,
|
smallBlind: 1,
|
||||||
@@ -441,10 +444,10 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
// income music
|
// income music
|
||||||
// this.playIncome = true;
|
this.playIncome = true;
|
||||||
// setTimeout(() => {
|
setTimeout(() => {
|
||||||
// this.playIncome = false;
|
this.playIncome = false;
|
||||||
// }, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.action === 'newGame') {
|
if (msg.action === 'newGame') {
|
||||||
@@ -522,6 +525,10 @@
|
|||||||
this.showSetting = false;
|
this.showSetting = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private closeAudio() {
|
||||||
|
this.audioStatus = !this.audioStatus
|
||||||
|
}
|
||||||
|
|
||||||
private play() {
|
private play() {
|
||||||
if (this.players.length >= 2) {
|
if (this.players.length >= 2) {
|
||||||
this.gaming = true;
|
this.gaming = true;
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
function convertBase( numberString, fromBase, toBase ) {
|
||||||
|
let numberToTen = toTen(numberString, fromBase)
|
||||||
|
let str = ''
|
||||||
|
while (numberToTen) {
|
||||||
|
let toNumber = numberToTen % toBase.base
|
||||||
|
str += toBase.map[toNumber]
|
||||||
|
numberToTen = Math.floor(numberToTen / toBase.base)
|
||||||
|
}
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
function toTen(numberString, fromBase) {
|
||||||
|
let baseMap = fromBase.map.split('')
|
||||||
|
let numberArr = numberString.split('')
|
||||||
|
let sum = 0
|
||||||
|
for (let i = 0; i <= numberArr.length - 1; i++) {
|
||||||
|
let currNumber = numberArr[i]
|
||||||
|
let baseIndex = baseMap.findIndex(b => b === currNumber)
|
||||||
|
sum += ((baseIndex + 1) * fromBase.base ** (numberArr.length - 1 - i))
|
||||||
|
}
|
||||||
|
return sum
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user