Skip to content

Commit

Permalink
Merge branch 'Hanabi-Live:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
David707x authored Dec 12, 2023
2 parents 431066f + c1e3b3c commit 67c54d3
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/client/src/game/reducers/noteIdentity.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Rank, SuitIndex, SuitRankTuple, Variant } from "@hanabi/data";
import { ALL_RESERVED_NOTES, START_CARD_RANK } from "@hanabi/data";
import type { CardIdentity } from "@hanabi/game";
import { eRange, newArray } from "@hanabi/utils";
import type { CardIdentity } from "../types/CardIdentity";

/**
* Represents the card identities that a card could possibly be.
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/game/reducers/stateReducer.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// The main reducer for the game mode, contemplating replays and game actions.

import type { CardIdentity } from "@hanabi/game";
import { assertDefined, assertNotNull } from "@hanabi/utils";
import type { Draft } from "immer";
import { castDraft, original, produce } from "immer";
import * as segmentRules from "../rules/segment";
import type { CardIdentity } from "../types/CardIdentity";
import type { GameMetadata } from "../types/GameMetadata";
import type { GameState } from "../types/GameState";
import type { State } from "../types/State";
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/game/types/HypotheticalState.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PlayerIndex } from "@hanabi/data";
import type { CardIdentity } from "./CardIdentity";
import type { CardIdentity } from "@hanabi/game";
import type { GameState } from "./GameState";

export interface HypotheticalState {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/game/types/JSONGame.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Character } from "@hanabi/data";
import type { CardIdentity } from "./CardIdentity";
import type { CardIdentity } from "@hanabi/game";
import type { ClientAction } from "./ClientAction";

export interface JSONGame {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/game/types/State.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { CardIdentity } from "./CardIdentity";
import type { CardIdentity } from "@hanabi/game";
import type { ClientAction } from "./ClientAction";
import type { GameMetadata } from "./GameMetadata";
import type { GameState } from "./GameState";
Expand Down
3 changes: 1 addition & 2 deletions packages/client/src/game/types/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import type {
Rank,
SuitIndex,
} from "@hanabi/data";
import type { EndCondition } from "@hanabi/game";
import type { CardIdentity, EndCondition } from "@hanabi/game";
import type { Tuple } from "@hanabi/utils";
import type { CardIdentity } from "./CardIdentity";
import type { ClientAction } from "./ClientAction";
import type { MsgClue } from "./MsgClue";
import type { Spectator } from "./Spectator";
Expand Down
3 changes: 1 addition & 2 deletions packages/client/src/game/ui/HanabiCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
Variant,
} from "@hanabi/data";
import { getSuit } from "@hanabi/data";
import type { CardState } from "@hanabi/game";
import type { CardIdentity, CardState } from "@hanabi/game";
import { CardStatus, StackDirection } from "@hanabi/game";
import { assertDefined, assertNotNull, iRange } from "@hanabi/utils";
import Konva from "konva";
Expand All @@ -18,7 +18,6 @@ import { noteEqual, noteHasMeaning, parseNote } from "../reducers/notesReducer";
import * as abbreviationRules from "../rules/abbreviation";
import * as cardRules from "../rules/card";
import * as variantRules from "../rules/variant";
import type { CardIdentity } from "../types/CardIdentity";
import type { CardNote } from "../types/CardNote";
import type { UICard } from "../types/UICard";
import * as HanabiCardInit from "./HanabiCardInit";
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/game/ui/HanabiCardClick.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Click functions for the HanabiCard object.

import type { CardIdentity } from "@hanabi/game";
import type Konva from "konva";
import * as modals from "../../modals";
import * as cardRules from "../rules/card";
import type { CardIdentity } from "../types/CardIdentity";
import type { HanabiCard } from "./HanabiCard";
import { globals } from "./UIGlobals";
import * as arrows from "./arrows";
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/game/ui/gameCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import type { CardOrder, NumPlayers, PlayerIndex } from "@hanabi/data";
import { getVariant } from "@hanabi/data";
import type { CardIdentity } from "@hanabi/game";
import type { Tuple } from "@hanabi/utils";
import { iRange, newArray } from "@hanabi/utils";
import { createStore } from "redux";
Expand All @@ -15,7 +16,6 @@ import * as hGroupRules from "../rules/hGroup";
import * as handRules from "../rules/hand";
import * as statsRules from "../rules/stats";
import * as turnRules from "../rules/turn";
import type { CardIdentity } from "../types/CardIdentity";
import type { GameMetadata } from "../types/GameMetadata";
import type { InitData } from "../types/InitData";
import { ReplayArrowOrder } from "../types/ReplayArrowOrder";
Expand Down
3 changes: 1 addition & 2 deletions packages/client/src/game/ui/reactive/view/cardsView.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { CardOrder } from "@hanabi/data";
import type { CardState } from "@hanabi/game";
import type { CardIdentity, CardState } from "@hanabi/game";
import { eRange } from "@hanabi/utils";
import type { CardIdentity } from "../../../types/CardIdentity";
import type { State } from "../../../types/State";
import { HanabiCard } from "../../HanabiCard";
import { globals } from "../../UIGlobals";
Expand Down
2 changes: 1 addition & 1 deletion packages/client/test/loadGameJSON.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import type {
import { MAX_PLAYERS, MIN_PLAYERS, getVariant } from "@hanabi/data";
import { assertDefined, assertNotNull, eRange } from "@hanabi/utils";
import { ClueType } from "../../game/src/enums/ClueType";
import type { CardIdentity } from "../../game/src/interfaces/CardIdentity";
import { gameStateReducer } from "../src/game/reducers/gameStateReducer";
import { initialState } from "../src/game/reducers/initialStates/initialState";
import * as cluesRules from "../src/game/rules/clues";
import * as handRules from "../src/game/rules/hand";
import * as playStacksRules from "../src/game/rules/playStacks";
import * as segmentRules from "../src/game/rules/segment";
import { ActionType } from "../src/game/types/ActionType";
import type { CardIdentity } from "../src/game/types/CardIdentity";
import type { GameState } from "../src/game/types/GameState";
import type { State } from "../src/game/types/State";
import type {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
"moduleResolution": "Node",
},

"include": ["./src/**/*.ts"],
"include": ["./src/**/*.ts", "../game/src/interfaces/CardIdentity.ts"],
}
1 change: 1 addition & 0 deletions packages/game/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export * from "./enums/EndCondition";
export * from "./enums/PaceRisk";
export * from "./enums/SoundType";
export * from "./enums/StackDirection";
export * from "./interfaces/CardIdentity";
export * from "./interfaces/CardState";
export * from "./interfaces/TurnState";
export * from "./types/StateClue";

0 comments on commit 67c54d3

Please sign in to comment.