DEV Community

Cover image for Rock Paper and Scissors with Elixir
Diego Novais
Diego Novais

Posted on • Edited on

4

Rock Paper and Scissors with Elixir

Hey, dev!

Let's code the game Rock, Paper, and Scissors in Elixir?

About the game

The game Rock, Paper, Scissors (aka "Ro-Sham-Bo"; janken; "Bato, Bato, Pick"; and "Scissors, Paper, Stone") is a simple hand game with many names and variations.

In the game, usually, we have two opponents. And the players use their hands to choose and represent one of three items: a rock, paper, or scissors.

Who wins?

The player who chooses the most powerful object is the winner of the game.

As the picture below:

  • Rock breaks the scissor;
  • Scissor cut the paper;
  • Paper covers the Rock;

Who wins?

One crucial detail is that the players can also draw the game when they choose the same item.

In the next article we'll initialize the project.

See ya!

Contacts

Email: contato@diegonovais.com.br
Linkedin: https://www.linkedin.com/in/diegonovais/
Twitter: https://twitter.com/diegonovaistech

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more