diff --git a/src/components/market.cairo b/src/components/market.cairo
index 23411d046..5c7497101 100644
--- a/src/components/market.cairo
+++ b/src/components/market.cairo
@@ -89,7 +89,7 @@ impl MarketImpl of MarketTrait {
}
} else {
panic(array!['invalid drug_id']);
- PricingInfos { min_price: 0, max_price: 0, min_qty: 0, max_qty: 0, }
+ PricingInfos { min_price: 0, max_price: 0, min_qty: 0, max_qty: 0, }
}
}
}
@@ -102,7 +102,7 @@ fn normalize(amount: usize, market: Market) -> (u128, u128, u128) {
#[test]
-#[should_panic(expected: ('not enough liquidity',))]
+#[should_panic(expected: ('not enough liquidity', ))]
fn test_not_enough_quantity() {
let mut market = Market {
game_id: 0, location_id: 0, drug_id: 0, cash: SCALING_FACTOR * 1, quantity: 1
diff --git a/src/components/player.cairo b/src/components/player.cairo
index a3bebd38a..905f189a1 100644
--- a/src/components/player.cairo
+++ b/src/components/player.cairo
@@ -15,6 +15,7 @@ struct Player {
drug_count: usize,
bag_limit: usize,
turns_remaining: usize,
+ turns_remaining_on_death: usize
}
#[generate_trait]
diff --git a/src/components/risks.cairo b/src/components/risks.cairo
index 671bf38f9..583f715da 100644
--- a/src/components/risks.cairo
+++ b/src/components/risks.cairo
@@ -18,8 +18,8 @@ struct Risks {
#[generate_trait]
impl RisksImpl of RisksTrait {
#[inline(always)]
- fn travel(ref self: Risks, seed: felt252, cash: u128, drug_count: usize) -> PlayerStatus {
- if occurs(seed, self.travel) {
+ fn travel(self: @Risks, seed: felt252, cash: u128, drug_count: usize) -> PlayerStatus {
+ if occurs(seed, *self.travel) {
let seed = pedersen::pedersen(seed, seed);
let entropy: u256 = seed.into();
let result: u128 = entropy.low % 100;
@@ -43,8 +43,8 @@ impl RisksImpl of RisksTrait {
}
#[inline(always)]
- fn run(ref self: Risks, seed: felt252) -> bool {
- occurs(seed, self.capture)
+ fn run(self: @Risks, seed: felt252) -> bool {
+ occurs(seed, *self.capture)
}
}
diff --git a/src/systems/create.cairo b/src/systems/create.cairo
index c04e9f535..f86512509 100644
--- a/src/systems/create.cairo
+++ b/src/systems/create.cairo
@@ -19,8 +19,7 @@ mod create_game {
use rollyourown::components::location::{Location, LocationTrait};
use rollyourown::components::market::{MarketTrait};
use rollyourown::constants::{
- SCALING_FACTOR, TRAVEL_RISK, CAPTURE_RISK, STARTING_CASH, STARTING_HEALTH,
- STARTING_BAG_LIMIT
+ TRAVEL_RISK, CAPTURE_RISK, STARTING_CASH, STARTING_HEALTH, STARTING_BAG_LIMIT
};
use rollyourown::utils::random;
use debug::PrintTrait;
@@ -65,6 +64,7 @@ mod create_game {
drug_count: 0,
bag_limit: STARTING_BAG_LIMIT,
turns_remaining: max_turns,
+ turns_remaining_on_death: 0
};
let game = Game {
@@ -143,8 +143,9 @@ mod create_game {
// emit game created
emit!(
- ctx.world,
- GameCreated { game_id, creator: ctx.origin, start_time, max_players, max_turns }
+ ctx.world, GameCreated {
+ game_id, creator: ctx.origin, start_time, max_players, max_turns
+ }
);
(game_id, ctx.origin)
diff --git a/src/systems/decide.cairo b/src/systems/decide.cairo
index 4365c5b1d..e7ccc2fea 100644
--- a/src/systems/decide.cairo
+++ b/src/systems/decide.cairo
@@ -8,7 +8,7 @@ mod decide {
use dojo::world::Context;
use rollyourown::PlayerStatus;
- use rollyourown::constants::{GANGS_PAYMENT, HEALTH_IMPACT, COPS_DRUG_THRESHOLD};
+ use rollyourown::constants::{COPS_DRUG_THRESHOLD, HEALTH_IMPACT, GANGS_PAYMENT};
use rollyourown::components::game::{Game, GameTrait};
use rollyourown::components::risks::{Risks, RisksTrait};
use rollyourown::components::player::{Player, PlayerTrait};
@@ -100,6 +100,7 @@ mod decide {
if health_loss >= player.health {
player.health = 0;
player.turns_remaining = 0;
+ player.turns_remaining_on_death = player.turns_remaining;
outcome = Outcome::Died;
} else {
player.health -= health_loss
@@ -109,11 +110,13 @@ mod decide {
emit!(ctx.world, Decision { game_id, player_id, action });
emit!(
- ctx.world,
- Consequence { game_id, player_id, outcome, health_loss, drug_loss, cash_loss }
+ ctx.world, Consequence {
+ game_id, player_id, outcome, health_loss, drug_loss, cash_loss
+ }
);
}
+
fn cops_payment(drug_count: u32) -> u128 {
if drug_count < COPS_DRUG_THRESHOLD + 20 {
1000_0000 // $1000
@@ -126,6 +129,7 @@ mod decide {
}
}
+
fn take_drugs(
ctx: Context, game_id: u32, player_id: ContractAddress, percentage: usize
) -> usize {
diff --git a/src/systems/join.cairo b/src/systems/join.cairo
index e13d5ffe4..8b4dad143 100644
--- a/src/systems/join.cairo
+++ b/src/systems/join.cairo
@@ -11,9 +11,7 @@ mod join_game {
use rollyourown::components::game::Game;
use rollyourown::components::player::Player;
use rollyourown::components::location::{Location, LocationTrait};
- use rollyourown::constants::{
- SCALING_FACTOR, STARTING_CASH, STARTING_HEALTH, STARTING_BAG_LIMIT
- };
+ use rollyourown::constants::{STARTING_CASH, STARTING_HEALTH, STARTING_BAG_LIMIT};
#[event]
#[derive(Drop, starknet::Event)]
@@ -52,6 +50,7 @@ mod join_game {
drug_count: 0,
bag_limit: STARTING_BAG_LIMIT,
turns_remaining: game.max_turns,
+ turns_remaining_on_death: 0
};
set!(ctx.world, (game, player));
diff --git a/src/systems/set_name.cairo b/src/systems/set_name.cairo
index 2dbc455b1..1bf91d1b6 100644
--- a/src/systems/set_name.cairo
+++ b/src/systems/set_name.cairo
@@ -8,6 +8,6 @@ mod set_name {
use rollyourown::components::name::Name;
fn execute(ctx: Context, game_id: u32, player_name: felt252) {
- set!(ctx.world, (Name { game_id, player_id: ctx.origin, short_string: player_name, }))
+ set!(ctx.world, (Name { game_id, player_id: ctx.origin, short_string: player_name, }))
}
}
diff --git a/src/systems/travel.cairo b/src/systems/travel.cairo
index aa1d432a1..1a39b9aa8 100644
--- a/src/systems/travel.cairo
+++ b/src/systems/travel.cairo
@@ -47,11 +47,11 @@ mod travel {
assert(game.tick(), 'game cannot progress');
let player_id = ctx.origin;
- let mut player = get!(ctx.world, (game_id, player_id).into(), Player);
+ let mut player: Player = get!(ctx.world, (game_id, player_id).into(), Player);
assert(player.can_continue(), 'player cannot travel');
assert(player.location_id != next_location_id, 'already at location');
- let mut risks = get!(ctx.world, (game_id, next_location_id).into(), Risks);
+ let mut risks: Risks = get!(ctx.world, (game_id, next_location_id).into(), Risks);
let seed = starknet::get_tx_info().unbox().transaction_hash;
player.status = risks.travel(seed, player.cash, player.drug_count);
if player.status != PlayerStatus::Normal {
@@ -69,8 +69,7 @@ mod travel {
set!(ctx.world, (player));
emit!(
- ctx.world,
- Traveled {
+ ctx.world, Traveled {
game_id, player_id, from_location: player.location_id, to_location: next_location_id
}
);
diff --git a/web/public/sounds/GameOver.mp3 b/web/public/sounds/GameOver.mp3
new file mode 100644
index 000000000..4b83826d2
Binary files /dev/null and b/web/public/sounds/GameOver.mp3 differ
diff --git a/web/src/components/icons/Skull.tsx b/web/src/components/icons/Skull.tsx
new file mode 100644
index 000000000..387325f19
--- /dev/null
+++ b/web/src/components/icons/Skull.tsx
@@ -0,0 +1,9 @@
+import { Icon, IconProps } from ".";
+
+export const Skull = (props: IconProps) => {
+ return (
+
+
+
+ );
+};
\ No newline at end of file
diff --git a/web/src/components/icons/index.tsx b/web/src/components/icons/index.tsx
index b4879b4d0..896fce3de 100644
--- a/web/src/components/icons/index.tsx
+++ b/web/src/components/icons/index.tsx
@@ -45,6 +45,7 @@ export * from "./Roll";
export * from "./Close";
export * from "./ExternalLink";
export * from "./Heart";
+export * from "./Skull";
// Template for adding new icons. When copying svg from figma, viewBox is assumed
// to be 36x36, otherwise override within individual icons.
diff --git a/web/src/dojo/entities/usePlayerEntity.tsx b/web/src/dojo/entities/usePlayerEntity.tsx
index 595276697..ec3078329 100644
--- a/web/src/dojo/entities/usePlayerEntity.tsx
+++ b/web/src/dojo/entities/usePlayerEntity.tsx
@@ -17,6 +17,7 @@ export class PlayerEntity {
cash: number;
health: number;
turnsRemaining: number;
+ turnsRemainingOnDeath: number;
drugCount: number;
bagLimit: number;
locationId: string;
@@ -27,6 +28,7 @@ export class PlayerEntity {
this.cash = Number(player.cash) / SCALING_FACTOR;
this.health = player.health;
this.turnsRemaining = player.turns_remaining;
+ this.turnsRemainingOnDeath = player.turns_remaining_on_death;
this.drugCount = player.drug_count;
this.bagLimit = player.bag_limit;
this.locationId = player.location_id;
diff --git a/web/src/dojo/events.ts b/web/src/dojo/events.ts
index 52a7dc62e..b44916148 100644
--- a/web/src/dojo/events.ts
+++ b/web/src/dojo/events.ts
@@ -14,7 +14,7 @@ export enum RyoEvents {
Sold = "0x123e760cef925d0b4f685db5e1ac87aadaf1ad9f8069122a5bb03353444c386",
AdverseEvent = "0x3605d6af5b08d01a1b42fa16a5f4dc202724f1664912948dcdbe99f5c93d0a0",
Decision = "0xc9315f646a66dd126a564fa76bfdc00bdb47abe0d8187e464f69215dbf432a",
- Consqeuence = "0x1335a57b72e0bcb464f40bf1f140f691ec93e4147b91d0760640c19999b841d",
+ Consequence = "0x1335a57b72e0bcb464f40bf1f140f691ec93e4147b91d0760640c19999b841d",
}
export interface BaseEventData {
@@ -108,7 +108,7 @@ export const parseEvent = (
playerId: num.toHexString(raw.data[1]),
action: Number(raw.data[2]),
} as DecisionEventData;
- case RyoEvents.Consqeuence:
+ case RyoEvents.Consequence:
return {
gameId: num.toHexString(raw.data[0]),
playerId: num.toHexString(raw.data[1]),
diff --git a/web/src/dojo/helpers.ts b/web/src/dojo/helpers.ts
index 71e50191e..d86d8635b 100644
--- a/web/src/dojo/helpers.ts
+++ b/web/src/dojo/helpers.ts
@@ -157,6 +157,24 @@ export const outcomes: OutcomeInfo[] = [
getMuggerResponses(Outcome.Escaped, isInitial),
color: "neon.200",
},
+ {
+ name: "Got killed by the Gang",
+ type: Outcome.Died,
+ status: PlayerStatus.BeingMugged,
+ imageSrc: "/images/events/fought.png",
+ getResponse: (isInitial: boolean) =>
+ getMuggerResponses(Outcome.Died, isInitial),
+ color: "red",
+ },
+ {
+ name: "Got killed by the Cops",
+ type: Outcome.Died,
+ status: PlayerStatus.BeingArrested,
+ imageSrc: "/images/events/fought.png",
+ getResponse: (isInitial: boolean) =>
+ getMuggerResponses(Outcome.Died, isInitial),
+ color: "red",
+ },
];
function findBy(array: T[], key: keyof T, value: any): T | undefined {
@@ -191,11 +209,13 @@ export function getOutcomeInfo(
status: PlayerStatus,
type: Outcome,
): OutcomeInfo {
- return (
- outcomes.find((item) => {
+ const found = outcomes.find((item) => {
return item.status === status && item.type === type;
- }) || outcomes[0]
- );
+ });
+ if(!found) {
+ console.log(`getOutcomeInfo outcome ${status} ${type} not found !`)
+ }
+ return found || outcomes[0]
}
export function sortDrugMarkets(drugMarkets?: DrugMarket[]): DrugMarket[] {
diff --git a/web/src/dojo/systems/useSystems.tsx b/web/src/dojo/systems/useSystems.tsx
index 0aa270354..2fbf621d2 100644
--- a/web/src/dojo/systems/useSystems.tsx
+++ b/web/src/dojo/systems/useSystems.tsx
@@ -2,6 +2,7 @@ import { useCallback } from "react";
import { useDojo } from "..";
import { BaseEventData, parseEvent, RyoEvents } from "../events";
import { Action } from "../types";
+import { shortString } from "starknet";
export interface SystemsInterface {
create: (
@@ -41,7 +42,7 @@ export interface SystemExecuteResult {
export const useSystems = (): SystemsInterface => {
const { execute, account, error, isPending } = useDojo();
- const executeAndReciept = useCallback(
+ const executeAndReceipt = useCallback(
async (method: string, params: Array) => {
if (!account) {
throw new Error("No account connected");
@@ -60,7 +61,7 @@ export const useSystems = (): SystemsInterface => {
const create = useCallback(
async (startTime: number, maxPlayers: number, maxTurns: number) => {
- const receipt = await executeAndReciept("create_game", [
+ const receipt = await executeAndReceipt("create_game", [
startTime,
maxPlayers,
maxTurns,
@@ -76,12 +77,12 @@ export const useSystems = (): SystemsInterface => {
event,
};
},
- [executeAndReciept],
+ [executeAndReceipt],
);
const travel = useCallback(
async (gameId: string, locationId: string) => {
- const receipt = await executeAndReciept("travel", [gameId, locationId]);
+ const receipt = await executeAndReceipt("travel", [gameId, locationId]);
const hash =
"transaction_hash" in receipt ? receipt.transaction_hash : "";
@@ -95,12 +96,12 @@ export const useSystems = (): SystemsInterface => {
return result;
},
- [executeAndReciept],
+ [executeAndReceipt],
);
const join = useCallback(
async (gameId: string) => {
- const receipt = await executeAndReciept("join_game", [gameId]);
+ const receipt = await executeAndReceipt("join_game", [gameId]);
const event = parseEvent(receipt, RyoEvents.PlayerJoined);
const hash =
@@ -111,7 +112,7 @@ export const useSystems = (): SystemsInterface => {
event,
};
},
- [executeAndReciept],
+ [executeAndReceipt],
);
const buy = useCallback(
@@ -121,7 +122,7 @@ export const useSystems = (): SystemsInterface => {
drugId: string,
quantity: number,
) => {
- const receipt = await executeAndReciept("buy", [
+ const receipt = await executeAndReceipt("buy", [
gameId,
locationId,
drugId,
@@ -134,7 +135,7 @@ export const useSystems = (): SystemsInterface => {
hash,
};
},
- [executeAndReciept],
+ [executeAndReceipt],
);
const sell = useCallback(
@@ -144,7 +145,7 @@ export const useSystems = (): SystemsInterface => {
drugId: string,
quantity: number,
) => {
- const receipt = await executeAndReciept("sell", [
+ const receipt = await executeAndReceipt("sell", [
gameId,
locationId,
drugId,
@@ -157,12 +158,14 @@ export const useSystems = (): SystemsInterface => {
hash,
};
},
- [executeAndReciept],
+ [executeAndReceipt],
);
const setName = useCallback(
async (gameId: string, playerName: string) => {
- const receipt = await executeAndReciept("set_name", [gameId, playerName]);
+ // not working if name is number only
+ const name = shortString.encodeShortString(playerName);
+ const receipt = await executeAndReceipt("set_name", [gameId, name]);
const hash =
"transaction_hash" in receipt ? receipt.transaction_hash : "";
@@ -170,18 +173,18 @@ export const useSystems = (): SystemsInterface => {
hash,
};
},
- [executeAndReciept],
+ [executeAndReceipt],
);
const decide = useCallback(
async (gameId: string, action: Action, nextLocationId: string) => {
- const receipt = await executeAndReciept("decide", [
+ const receipt = await executeAndReceipt("decide", [
gameId,
action,
nextLocationId,
]);
- const event = parseEvent(receipt, RyoEvents.Consqeuence);
+ const event = parseEvent(receipt, RyoEvents.Consequence);
const hash =
"transaction_hash" in receipt ? receipt.transaction_hash : "";
return {
@@ -189,7 +192,7 @@ export const useSystems = (): SystemsInterface => {
event,
};
},
- [executeAndReciept],
+ [executeAndReceipt],
);
return {
diff --git a/web/src/generated/graphql.ts b/web/src/generated/graphql.ts
index b407071d9..228aa5b76 100644
--- a/web/src/generated/graphql.ts
+++ b/web/src/generated/graphql.ts
@@ -1,22 +1,10 @@
-import {
- useQuery,
- useInfiniteQuery,
- UseQueryOptions,
- UseInfiniteQueryOptions,
- QueryFunctionContext,
-} from "react-query";
-import { useFetchData } from "@/hooks/fetcher";
+import { useQuery, useInfiniteQuery, UseQueryOptions, UseInfiniteQueryOptions, QueryFunctionContext } from 'react-query';
+import { useFetchData } from '@/hooks/fetcher';
export type Maybe = T | null;
export type InputMaybe = Maybe;
-export type Exact = {
- [K in keyof T]: T[K];
-};
-export type MakeOptional = Omit & {
- [SubKey in K]?: Maybe;
-};
-export type MakeMaybe = Omit & {
- [SubKey in K]: Maybe;
-};
+export type Exact = { [K in keyof T]: T[K] };
+export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
+export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: string;
@@ -38,51 +26,51 @@ export type Scalars = {
};
export type Component = {
- __typename?: "Component";
- classHash?: Maybe;
- createdAt?: Maybe;
- id?: Maybe;
- name?: Maybe;
- transactionHash?: Maybe;
+ __typename?: 'Component';
+ classHash?: Maybe;
+ createdAt?: Maybe;
+ id?: Maybe;
+ name?: Maybe;
+ transactionHash?: Maybe;
};
export type ComponentConnection = {
- __typename?: "ComponentConnection";
+ __typename?: 'ComponentConnection';
edges?: Maybe>>;
- totalCount: Scalars["Int"];
+ totalCount: Scalars['Int'];
};
export type ComponentEdge = {
- __typename?: "ComponentEdge";
- cursor: Scalars["Cursor"];
+ __typename?: 'ComponentEdge';
+ cursor: Scalars['Cursor'];
node?: Maybe;
};
export type ComponentUnion = Drug | Game | Market | Name | Player | Risks;
export enum Direction {
- Asc = "ASC",
- Desc = "DESC",
+ Asc = 'ASC',
+ Desc = 'DESC'
}
export type Drug = {
- __typename?: "Drug";
- drug_id?: Maybe;
+ __typename?: 'Drug';
+ drug_id?: Maybe;
entity?: Maybe;
- game_id?: Maybe;
- player_id?: Maybe;
- quantity?: Maybe;
+ game_id?: Maybe;
+ player_id?: Maybe;
+ quantity?: Maybe;
};
export type DrugConnection = {
- __typename?: "DrugConnection";
+ __typename?: 'DrugConnection';
edges?: Maybe>>;
- totalCount: Scalars["Int"];
+ totalCount: Scalars['Int'];
};
export type DrugEdge = {
- __typename?: "DrugEdge";
- cursor: Scalars["Cursor"];
+ __typename?: 'DrugEdge';
+ cursor: Scalars['Cursor'];
node?: Maybe;
};
@@ -92,104 +80,104 @@ export type DrugOrder = {
};
export enum DrugOrderOrderField {
- DrugId = "DRUG_ID",
- GameId = "GAME_ID",
- PlayerId = "PLAYER_ID",
- Quantity = "QUANTITY",
+ DrugId = 'DRUG_ID',
+ GameId = 'GAME_ID',
+ PlayerId = 'PLAYER_ID',
+ Quantity = 'QUANTITY'
}
export type DrugWhereInput = {
- drug_id?: InputMaybe;
- drug_idGT?: InputMaybe;
- drug_idGTE?: InputMaybe;
- drug_idLT?: InputMaybe;
- drug_idLTE?: InputMaybe;
- drug_idNEQ?: InputMaybe;
- game_id?: InputMaybe;
- game_idGT?: InputMaybe;
- game_idGTE?: InputMaybe;
- game_idLT?: InputMaybe;
- game_idLTE?: InputMaybe;
- game_idNEQ?: InputMaybe;
- player_id?: InputMaybe;
- player_idGT?: InputMaybe;
- player_idGTE?: InputMaybe;
- player_idLT?: InputMaybe;
- player_idLTE?: InputMaybe;
- player_idNEQ?: InputMaybe;
- quantity?: InputMaybe;
- quantityGT?: InputMaybe;
- quantityGTE?: InputMaybe;
- quantityLT?: InputMaybe;
- quantityLTE?: InputMaybe;
- quantityNEQ?: InputMaybe;
+ drug_id?: InputMaybe;
+ drug_idGT?: InputMaybe;
+ drug_idGTE?: InputMaybe;
+ drug_idLT?: InputMaybe;
+ drug_idLTE?: InputMaybe;
+ drug_idNEQ?: InputMaybe;
+ game_id?: InputMaybe;
+ game_idGT?: InputMaybe;
+ game_idGTE?: InputMaybe;
+ game_idLT?: InputMaybe;
+ game_idLTE?: InputMaybe;
+ game_idNEQ?: InputMaybe;
+ player_id?: InputMaybe;
+ player_idGT?: InputMaybe;
+ player_idGTE?: InputMaybe;
+ player_idLT?: InputMaybe;
+ player_idLTE?: InputMaybe;
+ player_idNEQ?: InputMaybe;
+ quantity?: InputMaybe;
+ quantityGT?: InputMaybe;
+ quantityGTE?: InputMaybe;
+ quantityLT?: InputMaybe;
+ quantityLTE?: InputMaybe;
+ quantityNEQ?: InputMaybe;
};
export type Entity = {
- __typename?: "Entity";
- componentNames?: Maybe;
+ __typename?: 'Entity';
+ componentNames?: Maybe;
components?: Maybe>>;
- createdAt?: Maybe;
- id?: Maybe;
- keys?: Maybe>>;
- updatedAt?: Maybe;
+ createdAt?: Maybe;
+ id?: Maybe;
+ keys?: Maybe>>;
+ updatedAt?: Maybe;
};
export type EntityConnection = {
- __typename?: "EntityConnection";
+ __typename?: 'EntityConnection';
edges?: Maybe>>;
- totalCount: Scalars["Int"];
+ totalCount: Scalars['Int'];
};
export type EntityEdge = {
- __typename?: "EntityEdge";
- cursor: Scalars["Cursor"];
+ __typename?: 'EntityEdge';
+ cursor: Scalars['Cursor'];
node?: Maybe;
};
export type Event = {
- __typename?: "Event";
- createdAt?: Maybe;
- data?: Maybe;
- id?: Maybe;
- keys?: Maybe;
+ __typename?: 'Event';
+ createdAt?: Maybe;
+ data?: Maybe;
+ id?: Maybe;
+ keys?: Maybe;
systemCall: SystemCall;
- systemCallId?: Maybe;
+ systemCallId?: Maybe;
};
export type EventConnection = {
- __typename?: "EventConnection";
+ __typename?: 'EventConnection';
edges?: Maybe>>;
- totalCount: Scalars["Int"];
+ totalCount: Scalars['Int'];
};
export type EventEdge = {
- __typename?: "EventEdge";
- cursor: Scalars["Cursor"];
+ __typename?: 'EventEdge';
+ cursor: Scalars['Cursor'];
node?: Maybe;
};
export type Game = {
- __typename?: "Game";
- creator?: Maybe;
+ __typename?: 'Game';
+ creator?: Maybe;
entity?: Maybe;
- game_id?: Maybe;
- is_finished?: Maybe;
- max_players?: Maybe;
- max_turns?: Maybe;
- num_players?: Maybe;
- start_time?: Maybe;
+ game_id?: Maybe;
+ is_finished?: Maybe;
+ max_players?: Maybe;
+ max_turns?: Maybe;
+ num_players?: Maybe;
+ start_time?: Maybe;
};
export type GameConnection = {
- __typename?: "GameConnection";
+ __typename?: 'GameConnection';
edges?: Maybe>>;
- totalCount: Scalars["Int"];
+ totalCount: Scalars['Int'];
};
export type GameEdge = {
- __typename?: "GameEdge";
- cursor: Scalars["Cursor"];
+ __typename?: 'GameEdge';
+ cursor: Scalars['Cursor'];
node?: Maybe;
};
@@ -199,79 +187,79 @@ export type GameOrder = {
};
export enum GameOrderOrderField {
- Creator = "CREATOR",
- GameId = "GAME_ID",
- IsFinished = "IS_FINISHED",
- MaxPlayers = "MAX_PLAYERS",
- MaxTurns = "MAX_TURNS",
- NumPlayers = "NUM_PLAYERS",
- StartTime = "START_TIME",
+ Creator = 'CREATOR',
+ GameId = 'GAME_ID',
+ IsFinished = 'IS_FINISHED',
+ MaxPlayers = 'MAX_PLAYERS',
+ MaxTurns = 'MAX_TURNS',
+ NumPlayers = 'NUM_PLAYERS',
+ StartTime = 'START_TIME'
}
export type GameWhereInput = {
- creator?: InputMaybe;
- creatorGT?: InputMaybe;
- creatorGTE?: InputMaybe;
- creatorLT?: InputMaybe;
- creatorLTE?: InputMaybe;
- creatorNEQ?: InputMaybe;
- game_id?: InputMaybe;
- game_idGT?: InputMaybe;
- game_idGTE?: InputMaybe;
- game_idLT?: InputMaybe;
- game_idLTE?: InputMaybe;
- game_idNEQ?: InputMaybe;
- is_finished?: InputMaybe;
- is_finishedGT?: InputMaybe;
- is_finishedGTE?: InputMaybe;
- is_finishedLT?: InputMaybe;
- is_finishedLTE?: InputMaybe;
- is_finishedNEQ?: InputMaybe;
- max_players?: InputMaybe;
- max_playersGT?: InputMaybe;
- max_playersGTE?: InputMaybe;
- max_playersLT?: InputMaybe;
- max_playersLTE?: InputMaybe;
- max_playersNEQ?: InputMaybe;
- max_turns?: InputMaybe;
- max_turnsGT?: InputMaybe;
- max_turnsGTE?: InputMaybe;
- max_turnsLT?: InputMaybe;
- max_turnsLTE?: InputMaybe;
- max_turnsNEQ?: InputMaybe;
- num_players?: InputMaybe;
- num_playersGT?: InputMaybe;
- num_playersGTE?: InputMaybe;
- num_playersLT?: InputMaybe;
- num_playersLTE?: InputMaybe;
- num_playersNEQ?: InputMaybe;
- start_time?: InputMaybe;
- start_timeGT?: InputMaybe;
- start_timeGTE?: InputMaybe;
- start_timeLT?: InputMaybe;
- start_timeLTE?: InputMaybe;
- start_timeNEQ?: InputMaybe;
+ creator?: InputMaybe;
+ creatorGT?: InputMaybe;
+ creatorGTE?: InputMaybe;
+ creatorLT?: InputMaybe;
+ creatorLTE?: InputMaybe;
+ creatorNEQ?: InputMaybe;
+ game_id?: InputMaybe;
+ game_idGT?: InputMaybe;
+ game_idGTE?: InputMaybe;
+ game_idLT?: InputMaybe;
+ game_idLTE?: InputMaybe;
+ game_idNEQ?: InputMaybe;
+ is_finished?: InputMaybe;
+ is_finishedGT?: InputMaybe;
+ is_finishedGTE?: InputMaybe;
+ is_finishedLT?: InputMaybe;
+ is_finishedLTE?: InputMaybe;
+ is_finishedNEQ?: InputMaybe;
+ max_players?: InputMaybe;
+ max_playersGT?: InputMaybe;
+ max_playersGTE?: InputMaybe;
+ max_playersLT?: InputMaybe;
+ max_playersLTE?: InputMaybe;
+ max_playersNEQ?: InputMaybe;
+ max_turns?: InputMaybe;
+ max_turnsGT?: InputMaybe;
+ max_turnsGTE?: InputMaybe;
+ max_turnsLT?: InputMaybe;
+ max_turnsLTE?: InputMaybe;
+ max_turnsNEQ?: InputMaybe;
+ num_players?: InputMaybe;
+ num_playersGT?: InputMaybe;
+ num_playersGTE?: InputMaybe;
+ num_playersLT?: InputMaybe;
+ num_playersLTE?: InputMaybe;
+ num_playersNEQ?: InputMaybe;
+ start_time?: InputMaybe;
+ start_timeGT?: InputMaybe;
+ start_timeGTE?: InputMaybe;
+ start_timeLT?: InputMaybe;
+ start_timeLTE?: InputMaybe;
+ start_timeNEQ?: InputMaybe;
};
export type Market = {
- __typename?: "Market";
- cash?: Maybe;
- drug_id?: Maybe;
+ __typename?: 'Market';
+ cash?: Maybe;
+ drug_id?: Maybe;
entity?: Maybe;
- game_id?: Maybe;
- location_id?: Maybe;
- quantity?: Maybe;
+ game_id?: Maybe;
+ location_id?: Maybe;
+ quantity?: Maybe;
};
export type MarketConnection = {
- __typename?: "MarketConnection";
+ __typename?: 'MarketConnection';
edges?: Maybe>>;
- totalCount: Scalars["Int"];
+ totalCount: Scalars['Int'];
};
export type MarketEdge = {
- __typename?: "MarketEdge";
- cursor: Scalars["Cursor"];
+ __typename?: 'MarketEdge';
+ cursor: Scalars['Cursor'];
node?: Maybe;
};
@@ -281,63 +269,63 @@ export type MarketOrder = {
};
export enum MarketOrderOrderField {
- Cash = "CASH",
- DrugId = "DRUG_ID",
- GameId = "GAME_ID",
- LocationId = "LOCATION_ID",
- Quantity = "QUANTITY",
+ Cash = 'CASH',
+ DrugId = 'DRUG_ID',
+ GameId = 'GAME_ID',
+ LocationId = 'LOCATION_ID',
+ Quantity = 'QUANTITY'
}
export type MarketWhereInput = {
- cash?: InputMaybe;
- cashGT?: InputMaybe;
- cashGTE?: InputMaybe;
- cashLT?: InputMaybe;
- cashLTE?: InputMaybe;
- cashNEQ?: InputMaybe;
- drug_id?: InputMaybe;
- drug_idGT?: InputMaybe;
- drug_idGTE?: InputMaybe;
- drug_idLT?: InputMaybe;
- drug_idLTE?: InputMaybe;
- drug_idNEQ?: InputMaybe;
- game_id?: InputMaybe;
- game_idGT?: InputMaybe;
- game_idGTE?: InputMaybe;
- game_idLT?: InputMaybe;
- game_idLTE?: InputMaybe;
- game_idNEQ?: InputMaybe;
- location_id?: InputMaybe;
- location_idGT?: InputMaybe;
- location_idGTE?: InputMaybe;
- location_idLT?: InputMaybe;
- location_idLTE?: InputMaybe;
- location_idNEQ?: InputMaybe;
- quantity?: InputMaybe;
- quantityGT?: InputMaybe