This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package kata.colouredtriangles; | |
public class Kata { | |
private static final int R = 0; | |
private static final int G = 1; | |
private static final int B = 2; | |
public static char triangle(final String firstRow) { | |
StringBuilder row = new StringBuilder(firstRow); | |
while (row.length() != 1) { | |
row = triangleOneTime(row); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Type inference, global variable and function as object | |
var x = fun(x:Int, y:Int): Int { | |
return x + y | |
} | |
//Top level functions | |
fun main(args: Array<String>) { | |
println("Hello world") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Api: | |
/generate?name=[user] -> String with user | |
/stage?name=[user] -> get actual stage in int | |
/validate json -> true/false | |
/users -> return json with all users | |
/cu?pass=[password]&name=[name] -> creates user | |
/au?pass=[password]&name=[name]&... -> admin settings for users (fields like user json) | |
/du?pass=[password]&name=[name] -> deletes user | |
validate json: |