Skip to content

Instantly share code, notes, and snippets.

View mrkloan's full-sized avatar
🏠
Working from home

Valentin Fries mrkloan

🏠
Working from home
View GitHub Profile
@mrkloan
mrkloan / Kata-RPG.md
Last active November 26, 2019 14:48

Kata RPG

First iteration: Characters

  • A Character should have a name and a health pool.
  • A Character's health is initialized at 100 and cannot go above this value.
  • A Character can either be alive or dead - when it reaches 0 health points.
  • A Character can attack another Character and deal 1 damage point to its enemy's health if it isn't already dead. A Character cannot attack itself...
  • A Character can heal another Character and return 1 point to its ally's health pool. A Character can
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-shade-plugin.version>3.2.1</maven-shade-plugin.version>
</properties>
<build>

IntelliJ Shortcuts

Official cheatsheet

General

Action Shortcut
Search everywhere Double Shift
Find action Ctrl + Shift + A
New... Alt + Inser.
Toggle Project view Alt + 1

Kata RPN

Wikipedia 🤔

First iteration: +

  • 1 = 1
  • 1 2 + = 3
  • 1 2 + 3 + = 6
  • 1 2 3 + + = 6
  • 1 2 3 + + 4 5 + + 6 + = 21
  • 1.5 2 + = 3.5

Kata Fraction

Write a simple Fraction calculator. Simplification is not required.

Examples

Addition

  • 1/2 + 3/4
  • = ((1*4) + (3*2)) / (2*4)