Installation of Package
npm i alset-reactgame-test --save
How To Use The Package
Props :
<ALSET-ReactGame game=String // defaults -> Squad showCodeEditor=boolean // defaults -> false mode=String // defaults -> player-vs-bot player1Keys = obj // defaults -> {left:'s',right:'f', up:'e', down:'d', action:'w'} player2Keys = obj // defaults -> {left:'j',right:'l', up:'i', down:'k', action:'p'} />
Example :
;; const Game ={ const playerKeys=left:'1'right:'3' up:'5' down:'2' action:'0' return <ALSET-ReactGame game='squad' showCodeEditor=false mode='player-vs-bot' player1Keys = playerKeys />} ;
Type of games
- gemCollector
- squadGemCollector
- squad
- singlePlayerTwoWindows
Type of modes
- player-vs-player
- player-vs-bot
- bot-vs-bot
- bot-vs-custom-code( also send props showCodeEditor={true})