1 var AI_Job_Ask_isWord = function(env){
2 AI_Job_Ask_isWord.base.call(this, env);
4 this.currentCandidate = null;
5 this.isPromptedByUser = false;
7 //ユーザーが空入力をすると、候補単語が単語であるかどうかをユーザーに問いかける。
11 if(!this.waiting && this.env.memory.candidateWordList.length > 0 && this.isPromptedByUser){
12 this.currentCandidate = this.env.memory.candidateWordList.pop();
13 this.env.memory.removeMemoryTagByObject(this.currentCandidate);
14 this.env.message("「" + this.currentCandidate.str + "」は単語ですか?(y/n)\n");
16 this.isPromptedByUser = false;
21 //ジョブが登録されているときに入力があると呼ばれる。
23 if(this.env.input.lastSentenceSourceType != "User"){
26 if(this.waiting == false){
28 this.isPromptedByUser = true;
32 this.env.memory.appendMemoryTag(new AI_WordTag(this.currentCandidate.str));
33 this.env.message(this.env.memory.wordList.length + "個目の単語を登録しました!\n");
36 this.currentCandidate = null;