Skip to content

Commit

Permalink
Update Entity def.
Browse files Browse the repository at this point in the history
  • Loading branch information
zernie committed Jan 10, 2020
1 parent feb873d commit 36a4839
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Built for educational purposes only. Your contributions are welcome 😉
* [ ] Secret
* [ ] Quest
* [ ] Sidequest
* [ ] Enchantment
* [ ] Aura
* [x] Zones
* [x] Play
* [x] Hand
Expand All @@ -43,31 +45,33 @@ Built for educational purposes only. Your contributions are welcome 😉
* [ ] Stealth (needs targeting improvements)
* [ ] Poisonous
* [ ] Divine shield
* [ ] Choosing a deck
* [ ] Card targeting requirements

### Visual
* [x] Card rendering (basic)
* [x] Card rendering
* [x] Basic
* [ ] Use [Sunwell](https://github.com/HearthSim/Sunwell)?
* [x] Drag & Drop cards(react-dnd)
* [x] Touch screens support
* [x] Drag & Drop cards (`react-dnd`)
* [x] Touch screen support
* [ ] Fix minion death animation bug (#10)

### Technical
* [ ] Merge all game entities into `game.entities` (?)
* [ ] Tests
* [ ] [Sequences](https://hearthstone.gamepedia.com/Advanced_rulebook#Advanced_mechanics_101_.28READ_THIS_FIRST.29) (will require major refactoring)
* [ ] Load cards from https://hearthstonejson.com/
* [ ] Load cards from https://hearthstonejson.com
* [ ] Save/Load
* [ ] LocalStorage
* [ ] File system
* [ ] ~~Multiplayer~~
* [ ] Triggers
* [ ] ~~Multiplayer~~

## Project structure
* `src/models` contains game models' type declarations and some helper functions.
* `src/redux` contains contains actual game logic, using Redux and decoupled from UI rendering.
It is highly recommended to use [redux-devtools](https://github.com/reduxjs/redux-devtools) for debugging.
* `src/UI` is a React implementation of Game UI.
* `src/redux` contains the actual game logic, using **Redux** and decoupled from UI rendering.
It is highly recommended to use [redux-devtools](https://github.com/reduxjs/redux-devtools) Chrome extension for debugging.
* `src/UI` is a **React**-based implementation of Game's UI.

## Development
$ yarn && yarn start
Expand Down
1 change: 0 additions & 1 deletion src/models/Card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { CardContainer } from "./Container";
import { Game } from "./Game";
import { canSpendMana, Player } from "./Player";

// TODO: deprecate in favor of Entity?
export type Card = Character | Weapon | HeroPower;

// FIXME
Expand Down
3 changes: 2 additions & 1 deletion src/models/Entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import { HeroPower } from "./HeroPower";
import { Hero } from "./Hero";
import { CardType } from "./enums";
import { Minion } from "./Minion";
import { Card } from "./Card";

export type Entity = Player | Character | Weapon | HeroPower;
export type Entity = Player | Card;
export type EntityContainer = Container<Entity>;
export type EntityPayload<T extends Record<string, any> = {}> = T & {
id: number;
Expand Down

0 comments on commit 36a4839

Please sign in to comment.