Project showcase
Risk Battle Simulator

Risk Battle Simulator © GPL3+

Love Risk, but hate constant dice rolling? With this device, there is no more inevitable dice falling off tables and knocking around armies.

  • 732 views
  • 0 comments
  • 3 respects

Components and supplies

ATmega328p-pu
Microprocessors, Micro-controllers, DSPs / ARM, RISC-Based Micro-controllers
×1
Project case
Black- 100mm(3.93")x60mm(2.36")x25mm(0.98")
×1
Rocker Switch
×1
Lite on ltl 1chg
3 mm LED: Green
×3
Lite on ltl 1che
3 mm LED: Red
×2
Bi-Colour RG LED
×2
Omron b3f 1000 image 75px
SparkFun Pushbutton switch 12mm
×3
Tactile Switch Cap
×3
AAA Battery Holder
×1
1-side Copper Prototype Board
×2
A000066 iso both
Arduino UNO & Genuino UNO
×1

About this project

Description

This little device is able to simulate any type of dice rolling instance. 3v2, 3v1, 2v2, 2v1, 1v2, 1v1, it's all adjustable, and quick and easy to use. The two buttons on the left change the number of dice for each respective side, and the button on the right simulates the dice rolls. The LED's on the right show which side lost how many troops.

The idea for this project was heavily inspired by a fellow who designed his own Risk simulator and shared pictures of it on the Arduino subreddit. After seeing this I knew I had to try it myself and put my own twist on it.

Details

How does it work?

The user has the option of changing the amount of dice for each player, attacker and defender. The amount of dice currently chosen by the user is followed by counters that run from 1-3 for the attacker, and 1-2 for the defender. When the user selects the simulate button, the code will enter a subroutine based on the values of the two counters.

Example: 3v2

All 5 dice rolls are simulated with random number generation, and placed in order from largest to smallest for each side. First, the highest dice roll of each is compared. If the defender's number is equal to or greater than the attacker's, the attacker will lose 1 troop, and vice versa. Next, the same process is used for the next two highest numbers of each side.

The bi-colour RG LED's will flash their neutral orange colour a few times before displaying the troop losses by colour, each LED representing one troop lost. Green for attacker, red for defender.

<--- Shows the results from the serial monitor of simulations of different dice rolling scenarios.

Note: VCC and ground connections to micro missing to reduce clutter. RG LED's were used in my design, but RGB would be fine as well.

You can check out the hardware implementation in this project log.

Arduino risk simulator

Code

Github
https://github.com/sclandinin/arduino_risk_sim

Schematics

RISK sim schematic
Risk schematic

Comments

Similar projects you might like

LED Dice

Project showcase by Team ONYX

  • 7,460 views
  • 1 comment
  • 17 respects

Helping the Disabled and Chronic Patients battle the heat

Project tutorial by Manan Rai

  • 2,265 views
  • 0 comments
  • 9 respects

Arduino Altair 8800 Simulator

Project tutorial by David Hansel

  • 56,454 views
  • 105 comments
  • 129 respects

Perfect Parker

Project tutorial by scott mangiacotti

  • 2,872 views
  • 2 comments
  • 9 respects

Wooden LED Christmas Tree

Project showcase by Arduino_Jarod

  • 1,160 views
  • 0 comments
  • 7 respects
Add projectSign up / Login