@cowprotocol/cow-runner-game
v0.2.9
Published
Cow runner game
Downloads
893
Keywords
Readme
Cow Runner Game - React component
The trex runner game extracted from chrome offline error page, but with less dinosaurs and more Cows!
This project is a typescript library that provides CowGame
as a react component.
Changes over the original:
- Broken down into smaller entities (see
src/game/model
) - Converted into typescript project
- The game has ben wrapped into a React component
- The React component is exported as a library
- Integrated with webpack. You can build the HTML page or run it in dev mode
🏗 Pending to add the sprites and styles for the cow game.
Usage
Add dependency to your project:
yarn add @cowprotocol/cow-runner-game
Use the CowGame
react component:
import { CowGame } from '@cowprotocol/cow-runner-game'
export default function Your () {
return (
<div>
<h1>Cow Game</h1>
<p>Try not to get 🥪</p>
<CowGame />
</div>
)
}
Development
Install dependencies
yarn
Run dev browser
yarn start
Build library
yarn build