class PoetryGroovy { final plans = ["Failed, try again", "Fell down, come on", "Congratulations, keep going"] def random = { new Random().nextInt(it) } def retry = { de ...
class PoetryGroovy { final plans = ["Failed, try again", "Fell down, come on", "Congratulations, keep going"] def random = { new Random().nextInt(it) } def retry = { de ...
#!/bin/sh randNum=0 plans=("Failed, try again" "Fell down, come one" "Congratulations, keep going") function random(){ randNum=$((RANDOM%($1))) } function doPlan(){ next=true ...
package main import ( "fmt" "math/rand" "time" ) func random(n int)(int){ rand.Seed(time.Now().UnixNano()) return rand.Intn(n) } func doPlan(){ plans := [3]string{ ...
import java.util.Random; public class Poetry { private Random ran; private String[] plans; public Poetry() { ran = new Random(); plans = new String[3]; p ...
'use strict' var plans = ['Failed, try again', 'Fell down, come on', 'Congratulation, keep going' ]; var random = function(n) { return Math.floor(Math.random() * (n + 1)); ...