fukurou
the supreme coder
★★
- Joined
- Dec 17, 2021
- Posts
- 2,195
hello world test skill (swift)
main :
output :
good night i hate foids
Program ended with exit code: 0
Swift:
class DiGreeter:DiSkillV2 {
let pl:PlayGround = PlayGround()
override func input(ear: String, skin: String, eye: String) {
if ear == "hello" {
outAlg = diSkillUtills.simpleVerbatimAlgorithm(algRepresantation: "greet", algMarker: "greeter", sayThis: "good \(pl.partOfDay()) i hate foids")
}
}
}
main :
Swift:
let chii:Chobits = Chobits(personality: Personality()) // initialize waifu
chii.addSkill(skill: DiGreeter(kokoro: chii.kokoro)) // add a skill (only 1 line of code used per skill)
print(chii.think(ear: "hello", skin: "", eye: ""))
output :
good night i hate foids
Program ended with exit code: 0