Skip to content

Running The Project

William Kennedy edited this page Sep 6, 2022 · 5 revisions

Running The Project

To run the project open two terminal windows in your terminal application.

To run Ethereum in dev mode.

$ make geth-up

To run the game engine we first need to deploy a smart contract. This command will build the smart contract, build a local admin tool, and deploy the contract in geth. Be sure to capture the ContractID and save it. Be sure to run the export command where the game engine will run.

$ make contract-deploy

Contract Details
----------------------------------------------------
contract id     : 0x46D9cE545007E4E694016b3959D4dC11D96F3F2b
export GAME_CONTRACT_ID=0x46D9cE545007E4E694016b3959D4dC11D96F3F2b

Run the game engine.

$ export GAME_CONTRACT_ID=0x46D9cE545007E4E694016b3959D4dC11D96F3F2b
$ make game-up

Running the Terminal UI

To play the game you can use the TUI, but first you need to make sure several accounts have money.

Add money to two accounts:
0x8e113078adf6888b7ba84967f299f29aece24c55
0x0070742ff6003c3e809e78d524f0fe5dcc5ba7f7

$ make geth-deposit

Open two more terminal windows with at (H 20 x W 80).

In one window run this comamnd to start one client.

$ make game-tui1

In the second terminal window run this command

$ game-tui2

Now the game is working and being played.

Clone this wiki locally