Skip to content

Instantly share code, notes, and snippets.

@coke12103
Created November 17, 2020 06:54
Show Gist options
  • Save coke12103/8c80542c4db14a66180bc5ac9c32a5f9 to your computer and use it in GitHub Desktop.
Save coke12103/8c80542c4db14a66180bc5ac9c32a5f9 to your computer and use it in GitHub Desktop.
Nimを始めて合計で3日目ぐらいで何を書いてるんだろう
import random, strformat, unicode
proc yubaba():string =
randomize();
echo "契約書だよ。そこに名前を書きな。"
var keiyakusho = proc (): string = stdin.readLine
var name = keiyakusho().toRunes
echo fmt"フン。{name}というのかい。贅沢な名だねぇ。"
var new_name = name[rand(name.len-1)]
echo fmt"今からお前の名前は{new_name}だ。いいかい、{new_name}だよ。分かったら返事をするんだ、{new_name}!!"
result = $new_name
discard yubaba()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment