Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 00bb90d0 rédigé par Malo Grall's avatar Malo Grall
Parcourir les fichiers

Added types

parent 1c99602b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #56316 réussi
import React, { useState } from 'react'
import React, { useEffect, useState } from 'react'
import GameWaiting from './pages/GameWaiting/GameWaiting'
import Home from './pages/Home/Home'
import ClientMock from './utils/Client/ClientMock'
......@@ -10,6 +10,10 @@ function App () {
const client = new ClientMock(setPage)
useEffect(() => {
console.log(page)
}, [page])
return (
<div>
{
......
......@@ -18,7 +18,8 @@ export default class Client implements IClient {
}
joinGame (userName: string) {
// TODO
// Change page
this.setPage('game-waiting')
}
playCard (card: Card, action: Action) {
......
......@@ -16,12 +16,33 @@ export interface Card {
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Wonder {
}
interface PlayerDTO {
userID: string
userName: string
wonder: Wonder
resources: Map<Resource, number>
builtCards: Card[]
victoryPoints: number
defeatPoints: number
conflictPoints: number
money: number
}
/**
* All the Data contained in the Game
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface GameDTO {
currentAge: number
gameTurn: number
currentAgeCards: Card[]
gameState: GameState
playersPublic: PlayerDTO[]
}
/**
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter