Compare commits

...

6 Commits

15 changed files with 16 additions and 16 deletions

View File

@@ -2,7 +2,7 @@
"expo": {
"name": "Traintrape-moi",
"slug": "traintrape-moi-client",
"version": "1.0.1",
"version": "1.1.1",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "traintrapemoi",
@@ -15,7 +15,7 @@
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
"backgroundColor": "#0033fe"
},
"package": "eu.luemy.traintrapemoi",
"permissions": [
@@ -49,9 +49,9 @@
"expo-splash-screen",
{
"image": "./assets/images/splash-icon.png",
"imageWidth": 200,
"imageWidth": 128,
"resizeMode": "contain",
"backgroundColor": "#ffffff"
"backgroundColor": "#0033fe"
}
],
"expo-task-manager",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -2,10 +2,5 @@ module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
env: {
production: {
plugins: ['react-native-paper/babel'],
},
},
}
}

View File

@@ -80,7 +80,7 @@ function PlayerLocationsMarkers({ setDisplayedPlayerId }: { setDisplayedPlayerId
const game = useGame()
const lastPlayerLocations = useLastPlayerLocations()
return lastPlayerLocations ? lastPlayerLocations
.filter(() => game.currentRunner === true || !game.gameStarted)
.filter(() => !game.currentRunner || !game.gameStarted)
.filter(playerLoc => playerLoc.playerId !== game.playerId)
.map(playerLoc => <PlayerLocationMarker key={`player-${playerLoc.playerId}-loc`} playerLocation={playerLoc} setDisplayedPlayerId={setDisplayedPlayerId} />) : <></>
}

View File

@@ -1,7 +1,7 @@
{
"name": "traintrape-moi-client",
"main": "expo-router/entry",
"version": "1.0.1",
"version": "1.1.1",
"scripts": {
"start": "expo start",
"android": "expo run:android",

View File

@@ -1,6 +1,6 @@
{
"name": "traintrape-moi-server",
"version": "1.0.1",
"version": "1.1.1",
"description": "",
"author": "",
"private": true,

View File

@@ -1,8 +1,13 @@
export const Constants = {
/**
* Nombre de points attribués au début de la partie
* Nombre de points attribués au début de la partie pour la première joueuse
*/
INITIAL_MONEY: 2000,
INITIAL_MONEY_1ST_PLAYER: 1500,
/**
* Nombre de points attribués au début de la partie pour la première joueuse
*/
INITIAL_MONEY_2ND_PLAYER: 1000,
/**
* Nombre de points attribués lors d'une nouvelle tentative

View File

@@ -20,16 +20,16 @@ export class GameService {
const alreadyStarted = game.currentRunId !== null
let run
if (!alreadyStarted) {
const runnerId = players[Math.floor(players.length * Math.random())].id
for (const player of players) {
await this.prisma.moneyUpdate.create({
data: {
playerId: player.id,
amount: Constants.INITIAL_MONEY,
amount: player.id === runnerId ? Constants.INITIAL_MONEY_1ST_PLAYER : Constants.INITIAL_MONEY_2ND_PLAYER,
reason: MoneyUpdateType.START,
}
})
}
const runnerId = players[Math.floor(players.length * Math.random())].id
run = await this.prisma.playerRun.create({
data: {
gameId: game.id,