Implementing a rock paper scissors game

Project Source Code

Get the project source code below, and follow along with the lesson material.

Download Project Source Code

To set up the project on your local machine, please follow the directions provided in the README.md file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.

This lesson preview is part of the newline's Introduction to Privacy on Ethereum course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.

This video is available to students only
Unlock This Course

Get unlimited access to newline's Introduction to Privacy on Ethereum, plus 70+ \newline books, guides and courses with the \newline Pro subscription.

Thumbnail for the \newline course newline's Introduction to Privacy on Ethereum
  • [00:00 - 01:37] Hello and welcome to the Module 2 of the course. In this module we are going to build rock paper scissors on Ethereum. The idea of this module is to give you hands-on experience with implementing privacy-focused smart contracts on Ethereum. Ethereum is the most widely used smart contract platform which is very easy to get started with and will be writing code in solidarity. Feel free to try out Wiper which is like Python and other smart contract languages and platforms. However, the focus here is to get the right approach and think about privacy in everything you develop and think about the limitations. This is a lot more about the architecture and design and how to write code. The languages and platforms are all over time but the fundamental approach is remain the same. In this simple rock paper scissors application, we will deep dive into how one can play rock paper scissors without revealing what their move is and letting the smart contract decide the winner in a fair way and to make this even more interesting. You can always add incentives such as both players deposit an amount before the start of the game and once both players have played their moves, the winner gets both the deposits and you can extend it in many many different ways. But for this module, we will look at how to implement a basic rock paper scissors, then we will enhance its privacy and then we will go further. So stay tuned. And...

    [01:38 - 01:58] [ Silence ]