correction du draw pour tictactoe online
continuous-integration/drone/push Build is passing Details

peristanceBDD
Thomas Chazot 2 years ago
parent 2d14f83813
commit b8138127dc

@ -60,14 +60,15 @@ export default function TicTacToeOnline(props: { navigation: any }){
function setUpTicTacToeOnline() {
if (initTic===0){
setInitTic(1);
socket.on("oppPlayTicTacToe", (rowIndex, columnIndex, turn) =>{
socket.on("oppPlayTicTacToe", async (rowIndex, columnIndex, turn) =>{
setMap((existingMap) =>{
const updateMap = [...existingMap]
updateMap[rowIndex][columnIndex]=turn;
return updateMap;
});
if (!checkWinning()){
const retour= await checkWinning();
if(retour!=true){
checkComplete();
}
if (turn==="x"){

@ -20,7 +20,7 @@ export default interface ISaverUser{
* updateUser methode that update a User in the data management system
* u the user we want to update
*/
updateUser(u:User | null): Promise<void>;
updateUser(u:User | null): Promise<void>;
addSkinList(u: User, s:Skin): Promise<void>;

Loading…
Cancel
Save