Skip to content

Commit

Permalink
Update generateProgram function
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatehito committed Feb 6, 2024
1 parent 9604ca5 commit 836abdd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/problems/problemData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ export const courseIdToProgramIdLists: Record<CourseId, ProgramId[][]> = {

export function generateProgram(programId: ProgramId, languageId: LanguageId): string {
// TODO(exKAZUu): 問題IDに紐づくプログラム(テンプレート)を取得して、乱数を使って具体的なプログラムを生成する。
return programIdToLanguageIdToProgram[programId][languageId];
return (
`const character1 = new Character();
character1.moveForward();
character1.moveForward();
character1.moveForward();
character1.moveForward();
character1.moveForward();
` || programIdToLanguageIdToProgram[programId][languageId]
);
}

export function getExplanation(programId: ProgramId, languageId: LanguageId): string {
Expand Down

0 comments on commit 836abdd

Please sign in to comment.