我完全失去了我的项目,我需要有人指向我正确的方向,因为现在我只是看着我的代码,我不知道从哪里开始。将我当前的项目转换为碎片。失去了我的项目
我的应用程序都是关于回答问题的。如果问题是对还是错,玩家必须回答。如果他回答了正确的问题,他就可以释放出新的水平。所以直到今天,我只是觉得我需要在每个级别创建一个新的活动,在这个活动中创建问题并让它运行。但直到今天,我意识到有100个不同层次的活动只是愚蠢的。
所以我需要使我的应用程序与片段工作。我唯一需要做的就是让每个不同层次的应用程序从问题列表中选择具体的问题,并用它们的值显示它们。
现在我在等级活动中创建问题。例如:Level1Activity
//Creating questions. (Question, boolean, answer).
final Question first = new Question("Do i understand this code?", true, "Only Jesus knows");
final Question second = new Question("Why dont i understand this code?", false, "Im not Jesus");
final Question third = new Question("Why I am not Jesus?", true, "2fat.");
//Creating Lists for questions and boolean values.
final ArrayList<Question> questions = new ArrayList<Question>();
final ArrayList<Boolean> type = new ArrayList<Boolean>();
//Adding questions to the question list
questions.add(first);
questions.add(second);
questions.add(third);
// Adding boleans to the boolean list
type.add(first.correctAnswer);
type.add(second.correctAnswer);
type.add(third.correctAnswer);
那么,我需要做什么,以便我不需要在每个级别上创建一个新问题的新活动。何做一项活动,并在各个层次上展示他们的片段?
所以我所有的函数代码如何回答问题以及如何添加分数必须在片段中?我需要在哪里存储我的问题?我应该创建一个新课程并将所有的问题存储在那里吗? – Arina 2015-02-10 14:42:43