Task Request [Great for beginners!] Build a Simple Game Logic

Build a basic game logic as a template for an open source decentralized blockchain game

I recently started a new open source project to build a decentralized game running on the Steem blockchain. You can find the repository here and the original post here.

This task request will also be posted as an issue on the Github repository.

Details

The task is to build a simple, turn-based game of your choice's game logic. Example games (ranging from easiest to hardest) are tic-tac-toe, checkers, and chess. This game should be implemented in the src/core/game/game.js file and not have any dependencies (except maybe console-handler/console-handler.js). There should be two functions exported from the file:

  • initState() should return an object representing the state of the game when it starts e.g for tic-tac-toe (you can create your own specification):
{
   isXTurn: true,
   isOTurn: false,
   turnNum: 0,
   board: [...]
}
  • completeMove(state, move) should return the state variable after move is applied. An example move argument for tic-tac-toe might be (you can create your own specification):
{
   positionToPlaceX: 2,
   positionToPlaceY: 0    // The player completing the move is inferred by the current state
}

Also, include some sort of function that can be used to test the game in the CLI. Don't spend too much time on it, just make sure to have a way to test the game.

Components

No sections of the software should be affected, only the game.js file should be modified (You may also modify index.js to test the game or other files necessary to test).

Deadline

This should be completed by Monday November 26, 2018.

Communication

To communicate with me about this task, either comment on the post or the github issue or direct message me in Discord (I am π•Ύπ–π–—π–Šπ–‰π–Ÿ7#8239). Once you have completed the task, create a pull request on the Github page.

Github

You can find me on Github at: https://github.com/shredz7

H2
H3
H4
Upload from PC
Video gallery
3 columns
2 columns
1 column
6 Comments