/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var OptionButton = Container.expand(function () {
var self = Container.call(this);
self.isCorrect = false;
self.isAnswered = false;
var background = self.attachAsset('optionBox', {
anchorX: 0.5,
anchorY: 0.5
});
self.wordText = new Text2('', {
size: 55,
fill: 0xFFFFFF
});
self.wordText.anchor.set(0.5, 0.5);
self.addChild(self.wordText);
self.setWord = function (word) {
self.wordText.setText(word);
};
self.setCorrect = function (correct) {
self.isCorrect = correct;
};
self.showResult = function () {
self.isAnswered = true;
var newAsset;
if (self.isCorrect) {
newAsset = LK.getAsset('correctBox', {
anchorX: 0.5,
anchorY: 0.5
});
} else {
newAsset = LK.getAsset('incorrectBox', {
anchorX: 0.5,
anchorY: 0.5
});
}
self.removeChildAt(0);
self.addChildAt(newAsset, 0);
};
self.reset = function () {
self.isAnswered = false;
self.isCorrect = false;
var newAsset = LK.getAsset('optionBox', {
anchorX: 0.5,
anchorY: 0.5
});
self.removeChildAt(0);
self.addChildAt(newAsset, 0);
};
self.down = function (x, y, obj) {
if (!self.isAnswered) {
handleAnswer(self);
}
};
return self;
});
var QuestionBox = Container.expand(function () {
var self = Container.call(this);
var background = self.attachAsset('questionBox', {
anchorX: 0.5,
anchorY: 0.5
});
self.definitionText = new Text2('', {
size: 65,
fill: 0xFFFFFF,
wordWrap: true,
wordWrapWidth: 1700
});
self.definitionText.anchor.set(0.5, 0.5);
self.addChild(self.definitionText);
self.setDefinition = function (definition) {
self.definitionText.setText(definition);
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x8B4513
});
/****
* Game Code
****/
// Word database with definitions
var wordDatabase = [{
word: "abandon",
definition: "To give up completely or leave behind"
}, {
word: "abundant",
definition: "Existing in large quantities; plentiful"
}, {
word: "accommodate",
definition: "To provide lodging or to adapt to"
}, {
word: "achieve",
definition: "To successfully complete or accomplish"
}, {
word: "acquire",
definition: "To obtain or get possession of"
}, {
word: "adequate",
definition: "Sufficient or acceptable in quality"
}, {
word: "advocate",
definition: "To publicly support or recommend"
}, {
word: "ambiguous",
definition: "Having more than one possible meaning"
}, {
word: "analyze",
definition: "To examine in detail for understanding"
}, {
word: "anticipate",
definition: "To expect or predict something will happen"
}, {
word: "appreciate",
definition: "To recognize the value or significance of"
}, {
word: "approach",
definition: "To come near or closer to something"
}, {
word: "appropriate",
definition: "Suitable or proper for a particular situation"
}, {
word: "arbitrary",
definition: "Based on random choice rather than reason"
}, {
word: "assemble",
definition: "To fit together the parts of something"
}, {
word: "assess",
definition: "To evaluate or judge the nature of"
}, {
word: "assume",
definition: "To suppose something is true without proof"
}, {
word: "authority",
definition: "The power or right to give orders"
}, {
word: "beneficial",
definition: "Having a good or helpful effect"
}, {
word: "capable",
definition: "Having the ability or skill to do something"
}, {
word: "capacity",
definition: "The maximum amount something can contain"
}, {
word: "circumstances",
definition: "The conditions that affect a situation"
}, {
word: "collaborate",
definition: "To work jointly with others"
}, {
word: "commence",
definition: "To begin or start"
}, {
word: "compensate",
definition: "To give something to make up for loss"
}, {
word: "competent",
definition: "Having necessary skill or knowledge"
}, {
word: "complement",
definition: "To complete or bring to perfection"
}, {
word: "comprehensive",
definition: "Complete and including everything"
}, {
word: "comprise",
definition: "To consist of or be made up of"
}, {
word: "conceive",
definition: "To form an idea or plan in the mind"
}, {
word: "conclude",
definition: "To bring or come to an end"
}, {
word: "concurrent",
definition: "Happening at the same time"
}, {
word: "conduct",
definition: "To organize and carry out"
}, {
word: "confirm",
definition: "To establish the truth of something"
}, {
word: "consecutive",
definition: "Following each other without interruption"
}, {
word: "consent",
definition: "Permission or agreement to do something"
}, {
word: "consequence",
definition: "A result or effect of an action"
}, {
word: "considerable",
definition: "Large in size, amount, or extent"
}, {
word: "consist",
definition: "To be composed or made up of"
}, {
word: "constitute",
definition: "To form or make up"
}, {
word: "constrain",
definition: "To limit or restrict"
}, {
word: "construct",
definition: "To build or put together"
}, {
word: "consume",
definition: "To use up or eat and drink"
}, {
word: "contemporary",
definition: "Belonging to the present time"
}, {
word: "contradict",
definition: "To assert the opposite of a statement"
}, {
word: "contrast",
definition: "To show differences when compared"
}, {
word: "contribute",
definition: "To give something to help achieve"
}, {
word: "controversy",
definition: "Disagreement about something important"
}, {
word: "convert",
definition: "To change from one form to another"
}, {
word: "convince",
definition: "To persuade someone to believe something"
}, {
word: "correspond",
definition: "To have close similarity or connection"
}, {
word: "criteria",
definition: "Standards used for judging something"
}, {
word: "crucial",
definition: "Extremely important or essential"
}, {
word: "culminate",
definition: "To reach the highest point"
}, {
word: "decade",
definition: "A period of ten years"
}, {
word: "decline",
definition: "To become smaller or weaker"
}, {
word: "deduce",
definition: "To reach a conclusion by reasoning"
}, {
word: "demonstrate",
definition: "To show clearly by evidence"
}, {
word: "denote",
definition: "To be a sign of or indicate"
}, {
word: "derive",
definition: "To obtain something from a source"
}, {
word: "detect",
definition: "To discover or identify something"
}, {
word: "deviate",
definition: "To depart from an established course"
}, {
word: "dimension",
definition: "A measurable extent such as length"
}, {
word: "diminish",
definition: "To make or become less"
}, {
word: "discrete",
definition: "Individually separate and distinct"
}, {
word: "discriminate",
definition: "To recognize a distinction"
}, {
word: "displace",
definition: "To take over the position of"
}, {
word: "dispose",
definition: "To get rid of or throw away"
}, {
word: "distinct",
definition: "Recognizably different in nature"
}, {
word: "distribute",
definition: "To give shares of something"
}, {
word: "diverse",
definition: "Showing great variety or difference"
}, {
word: "domain",
definition: "An area of territory or sphere of activity"
}, {
word: "dominate",
definition: "To have control or influence over"
}, {
word: "dramatic",
definition: "Sudden and striking in effect"
}, {
word: "duration",
definition: "The time during which something continues"
}, {
word: "element",
definition: "A basic part of a complex whole"
}, {
word: "eliminate",
definition: "To remove or get rid of"
}, {
word: "emerge",
definition: "To come forth into view from concealment"
}, {
word: "emphasis",
definition: "Special importance given to something"
}, {
word: "enable",
definition: "To give someone the ability to do something"
}, {
word: "encounter",
definition: "To meet someone or something unexpectedly"
}, {
word: "enhance",
definition: "To improve the quality or value of"
}, {
word: "enormous",
definition: "Very large in size or quantity"
}, {
word: "ensure",
definition: "To make certain that something happens"
}, {
word: "entity",
definition: "A thing with distinct existence"
}, {
word: "environment",
definition: "The surroundings or conditions"
}, {
word: "equivalent",
definition: "Equal in value, amount, or meaning"
}, {
word: "error",
definition: "A mistake or inaccuracy"
}, {
word: "establish",
definition: "To set up on a firm basis"
}, {
word: "estimate",
definition: "To roughly calculate or judge"
}, {
word: "evaluate",
definition: "To form an idea of the worth of"
}, {
word: "eventual",
definition: "Occurring at the end of a process"
}, {
word: "evident",
definition: "Clearly seen or understood"
}, {
word: "evolve",
definition: "To develop gradually"
}, {
word: "exceed",
definition: "To be greater than a number or amount"
}, {
word: "exclude",
definition: "To deny access to or bar from"
}, {
word: "exhibit",
definition: "To display or show publicly"
}, {
word: "expand",
definition: "To become or make larger"
}, {
word: "expert",
definition: "A person with special knowledge"
}, {
word: "explicit",
definition: "Stated clearly and exactly"
}, {
word: "exploit",
definition: "To make use of and benefit from"
}, {
word: "expose",
definition: "To reveal or make visible"
}, {
word: "external",
definition: "Belonging to or forming the outer surface"
}, {
word: "extract",
definition: "To remove or take out"
}, {
word: "facilitate",
definition: "To make an action easier"
}, {
word: "factor",
definition: "A circumstance that contributes to a result"
}, {
word: "feature",
definition: "A distinctive attribute or characteristic"
}, {
word: "final",
definition: "Coming at the end; last"
}, {
word: "finance",
definition: "The management of money and investments"
}, {
word: "finite",
definition: "Having limits or bounds"
}, {
word: "flexible",
definition: "Able to bend without breaking"
}, {
word: "fluctuate",
definition: "To rise and fall irregularly"
}, {
word: "formula",
definition: "A mathematical rule expressed in symbols"
}, {
word: "foundation",
definition: "An underlying basis or principle"
}, {
word: "framework",
definition: "A basic structure underlying a system"
}, {
word: "function",
definition: "The purpose for which something exists"
}, {
word: "fundamental",
definition: "Forming a necessary base or core"
}, {
word: "generate",
definition: "To produce or create"
}, {
word: "globe",
definition: "The earth or a spherical representation"
}, {
word: "goal",
definition: "An aim or desired result"
}, {
word: "grade",
definition: "A level of rank, quality, or proficiency"
}, {
word: "grant",
definition: "To give or allow someone to have"
}, {
word: "guarantee",
definition: "A formal promise or assurance"
}, {
word: "guideline",
definition: "A general rule or principle"
}, {
word: "hence",
definition: "As a consequence; for this reason"
}, {
word: "hypothesis",
definition: "A proposed explanation for something"
}, {
word: "identical",
definition: "Exactly the same"
}, {
word: "identify",
definition: "To recognize or establish who someone is"
}, {
word: "ideology",
definition: "A system of ideas and ideals"
}, {
word: "illustrate",
definition: "To explain by using examples"
}, {
word: "image",
definition: "A representation of something"
}, {
word: "implement",
definition: "To put a plan or system into effect"
}, {
word: "imply",
definition: "To suggest something without saying it"
}, {
word: "impose",
definition: "To force something unwelcome to be accepted"
}, {
word: "incentive",
definition: "Something that motivates action"
}, {
word: "incidence",
definition: "The occurrence or rate of something"
}, {
word: "income",
definition: "Money received for work or investments"
}, {
word: "incorporate",
definition: "To include something as part of a whole"
}, {
word: "index",
definition: "An alphabetical list of names or subjects"
}, {
word: "indicate",
definition: "To point out or show"
}, {
word: "individual",
definition: "Single; separate from others"
}, {
word: "induce",
definition: "To succeed in persuading someone to do"
}, {
word: "inevitable",
definition: "Certain to happen; unavoidable"
}, {
word: "infer",
definition: "To deduce from evidence and reasoning"
}, {
word: "inhibit",
definition: "To hinder or restrain"
}, {
word: "initial",
definition: "Existing or occurring at the beginning"
}, {
word: "initiate",
definition: "To cause a process to begin"
}, {
word: "innovate",
definition: "To make changes in something established"
}, {
word: "input",
definition: "What is put in or contributed"
}, {
word: "insert",
definition: "To place or fit something into something"
}, {
word: "inspect",
definition: "To look at something carefully"
}, {
word: "instance",
definition: "An example or single occurrence"
}, {
word: "institute",
definition: "To establish something"
}, {
word: "instruct",
definition: "To teach someone or give directions"
}, {
word: "integral",
definition: "Necessary to make a whole complete"
}, {
word: "integrate",
definition: "To combine parts into a whole"
}, {
word: "intelligent",
definition: "Having good understanding or judgment"
}, {
word: "intense",
definition: "Existing in high degree; extreme"
}, {
word: "interact",
definition: "To act in a way that has an effect"
}, {
word: "intermediate",
definition: "Coming between two things in time"
}, {
word: "internal",
definition: "Existing on the inside"
}, {
word: "interpret",
definition: "To explain the meaning of something"
}, {
word: "interval",
definition: "A space of time between events"
}, {
word: "intervene",
definition: "To come between to prevent or alter"
}, {
word: "intrinsic",
definition: "Belonging naturally; essential"
}, {
word: "invest",
definition: "To put money into something for profit"
}, {
word: "investigate",
definition: "To carry out research into something"
}, {
word: "invoke",
definition: "To call on something for assistance"
}, {
word: "involve",
definition: "To include as a necessary part"
}, {
word: "isolate",
definition: "To set apart from others"
}, {
word: "issue",
definition: "An important topic for debate"
}, {
word: "item",
definition: "An individual article or unit"
}, {
word: "journal",
definition: "A newspaper or magazine"
}, {
word: "justify",
definition: "To show or prove to be reasonable"
}, {
word: "label",
definition: "A piece of paper or other material"
}, {
word: "labor",
definition: "Work involving mental or physical effort"
}, {
word: "layer",
definition: "A sheet or thickness of material"
}, {
word: "lecture",
definition: "An educational talk to an audience"
}, {
word: "legal",
definition: "Permitted by law"
}, {
word: "legislate",
definition: "To make or enact laws"
}, {
word: "levy",
definition: "To impose a tax or fine"
}, {
word: "liberal",
definition: "Open to new behavior or opinions"
}, {
word: "license",
definition: "A permit to own or use something"
}, {
word: "likewise",
definition: "In the same way; also"
}, {
word: "link",
definition: "A relationship between two things"
}, {
word: "locate",
definition: "To discover the exact place of something"
}, {
word: "logic",
definition: "Reasoning conducted according to principles"
}, {
word: "maintain",
definition: "To cause to continue in the same state"
}, {
word: "major",
definition: "Important, serious, or significant"
}, {
word: "manipulate",
definition: "To handle or control in a skillful way"
}, {
word: "manual",
definition: "Done or operated by hand"
}, {
word: "margin",
definition: "The edge or border of something"
}, {
word: "mature",
definition: "Fully developed physically or mentally"
}, {
word: "maximum",
definition: "The greatest amount possible"
}, {
word: "mechanism",
definition: "A system of parts working together"
}, {
word: "media",
definition: "The means of mass communication"
}, {
word: "medical",
definition: "Relating to medicine or treatment"
}, {
word: "medium",
definition: "In the middle between extremes"
}, {
word: "mental",
definition: "Relating to the mind"
}, {
word: "method",
definition: "A particular procedure for doing something"
}, {
word: "migrate",
definition: "To move from one place to another"
}, {
word: "military",
definition: "Relating to armed forces"
}, {
word: "minimize",
definition: "To reduce to the smallest possible amount"
}, {
word: "minimum",
definition: "The least or smallest amount possible"
}, {
word: "minor",
definition: "Lesser in importance or seriousness"
}, {
word: "mode",
definition: "A way or manner of doing something"
}, {
word: "modify",
definition: "To make partial changes to something"
}, {
word: "monitor",
definition: "To observe and check over time"
}, {
word: "motive",
definition: "A reason for doing something"
}, {
word: "mutual",
definition: "Experienced by two or more parties"
}, {
word: "negate",
definition: "To nullify or make ineffective"
}, {
word: "network",
definition: "A group of interconnected things"
}, {
word: "neutral",
definition: "Not helping either side in a conflict"
}, {
word: "nevertheless",
definition: "In spite of that; however"
}, {
word: "norm",
definition: "Something that is usual or standard"
}, {
word: "normal",
definition: "Conforming to a standard; usual"
}, {
word: "notion",
definition: "A conception or belief about something"
}, {
word: "nuclear",
definition: "Relating to the nucleus of an atom"
}, {
word: "objective",
definition: "Not influenced by personal feelings"
}, {
word: "obtain",
definition: "To get or acquire something"
}, {
word: "obvious",
definition: "Easily perceived or understood"
}, {
word: "occupy",
definition: "To take up space or time"
}, {
word: "occur",
definition: "To happen or take place"
}, {
word: "odd",
definition: "Strange or unusual"
}, {
word: "offset",
definition: "To counteract something by having an equal force"
}, {
word: "ongoing",
definition: "Continuing to exist or progress"
}, {
word: "option",
definition: "A thing that may be chosen"
}, {
word: "orient",
definition: "To align relative to points of compass"
}, {
word: "outcome",
definition: "The result or consequence of something"
}, {
word: "output",
definition: "The amount of something produced"
}, {
word: "overall",
definition: "Taking everything into account"
}, {
word: "overlap",
definition: "To extend over and cover part of"
}, {
word: "overseas",
definition: "In or to a foreign country"
}, {
word: "panel",
definition: "A flat piece forming part of a surface"
}, {
word: "paradigm",
definition: "A typical example or pattern"
}, {
word: "paragraph",
definition: "A distinct section of writing"
}, {
word: "parallel",
definition: "Side by side and having same distance"
}, {
word: "parameter",
definition: "A numerical characteristic of a population"
}, {
word: "participate",
definition: "To take part in something"
}, {
word: "partner",
definition: "A person who takes part with another"
}, {
word: "passive",
definition: "Accepting what happens without resistance"
}, {
word: "patent",
definition: "A government license for an invention"
}, {
word: "perceive",
definition: "To become aware of through the senses"
}, {
word: "percent",
definition: "By the hundred; out of every hundred"
}, {
word: "period",
definition: "A length or portion of time"
}, {
word: "persist",
definition: "To continue firmly despite difficulty"
}, {
word: "perspective",
definition: "A particular attitude toward something"
}, {
word: "phase",
definition: "A distinct period in development"
}, {
word: "phenomenon",
definition: "A fact or situation observed to exist"
}, {
word: "philosophy",
definition: "The study of fundamental nature of reality"
}, {
word: "physical",
definition: "Relating to the body or material things"
}, {
word: "plus",
definition: "With the addition of"
}, {
word: "policy",
definition: "A course of action adopted by government"
}, {
word: "portion",
definition: "A part of a whole"
}, {
word: "pose",
definition: "To present or constitute a problem"
}, {
word: "positive",
definition: "Constructive, optimistic, or confident"
}, {
word: "potential",
definition: "Having or showing capacity for development"
}, {
word: "practitioner",
definition: "A person engaged in a profession"
}, {
word: "precede",
definition: "To come before in time or order"
}, {
word: "precise",
definition: "Marked by exactness and accuracy"
}, {
word: "predict",
definition: "To say what will happen in the future"
}, {
word: "preliminary",
definition: "Preceding the main part of something"
}, {
word: "presume",
definition: "To suppose something is true"
}, {
word: "previous",
definition: "Existing or occurring before in time"
}, {
word: "primary",
definition: "Of chief importance; principal"
}, {
word: "prime",
definition: "Of first importance; main"
}, {
word: "principal",
definition: "First in order of importance"
}, {
word: "principle",
definition: "A fundamental truth serving as foundation"
}, {
word: "prior",
definition: "Existing or coming before in time"
}, {
word: "priority",
definition: "The fact of being regarded as more important"
}, {
word: "proceed",
definition: "To begin or continue a course of action"
}, {
word: "process",
definition: "A series of actions to achieve a result"
}, {
word: "professional",
definition: "Relating to a job requiring special training"
}, {
word: "project",
definition: "An individual or collaborative enterprise"
}, {
word: "promote",
definition: "To further the progress of something"
}, {
word: "proportion",
definition: "A part considered in relation to the whole"
}, {
word: "prospect",
definition: "The possibility of future success"
}, {
word: "protocol",
definition: "The official procedure or rules"
}, {
word: "psychology",
definition: "The scientific study of mind and behavior"
}, {
word: "publication",
definition: "The preparation and issuing of a book"
}, {
word: "publish",
definition: "To prepare and issue for public sale"
}, {
word: "purchase",
definition: "To acquire by paying money for it"
}, {
word: "pursue",
definition: "To follow or chase"
}, {
word: "qualitative",
definition: "Relating to quality or kind"
}, {
word: "quantitative",
definition: "Relating to quantity or amount"
}, {
word: "quote",
definition: "To repeat someone else's words"
}, {
word: "radical",
definition: "Relating to fundamental nature of something"
}, {
word: "random",
definition: "Made without conscious decision"
}, {
word: "range",
definition: "The area of variation between limits"
}, {
word: "ratio",
definition: "The quantitative relation between amounts"
}, {
word: "rational",
definition: "Based on reason or logic"
}, {
word: "react",
definition: "To respond or behave in particular way"
}, {
word: "recover",
definition: "To return to normal state of health"
}, {
word: "refine",
definition: "To improve by making small changes"
}, {
word: "reform",
definition: "To make changes to improve something"
}, {
word: "regard",
definition: "To consider or think of in a particular way"
}, {
word: "region",
definition: "An area of a country or the world"
}, {
word: "register",
definition: "To record or sign up officially"
}, {
word: "regulate",
definition: "To control by means of rules"
}, {
word: "reinforce",
definition: "To strengthen or give support to"
}, {
word: "reject",
definition: "To dismiss as inadequate or unacceptable"
}, {
word: "relax",
definition: "To make or become less tense"
}, {
word: "release",
definition: "To allow to escape or go free"
}, {
word: "relevant",
definition: "Closely connected to the matter at hand"
}, {
word: "reliable",
definition: "Consistently good in quality or performance"
}, {
word: "reluctant",
definition: "Unwilling and hesitant"
}, {
word: "rely",
definition: "To depend on with confidence"
}, {
word: "remove",
definition: "To take away from a place or position"
}, {
word: "require",
definition: "To need for a particular purpose"
}, {
word: "research",
definition: "The systematic investigation into a subject"
}, {
word: "reside",
definition: "To have one's permanent home somewhere"
}, {
word: "resolve",
definition: "To settle or find solution to a problem"
}, {
word: "resource",
definition: "A supply of something that can be drawn on"
}, {
word: "respond",
definition: "To say something in reply"
}, {
word: "restore",
definition: "To bring back to former condition"
}, {
word: "restrict",
definition: "To put limits on something"
}, {
word: "retain",
definition: "To continue to have something"
}, {
word: "reveal",
definition: "To make known or show"
}, {
word: "revenue",
definition: "Income generated by a business"
}, {
word: "reverse",
definition: "To move backward or in opposite direction"
}, {
word: "revise",
definition: "To reconsider and alter"
}, {
word: "revolution",
definition: "A dramatic and wide-reaching change"
}, {
word: "rigid",
definition: "Unable to bend or be forced out of shape"
}, {
word: "role",
definition: "The function assumed by someone"
}, {
word: "route",
definition: "A way or course taken to get somewhere"
}, {
word: "scenario",
definition: "A written outline of a possible course"
}, {
word: "schedule",
definition: "A plan for carrying out a process"
}, {
word: "scheme",
definition: "A large-scale systematic plan"
}, {
word: "scope",
definition: "The extent of the area covered by something"
}, {
word: "section",
definition: "Any of the parts into which something is divided"
}, {
word: "sector",
definition: "An area of activity in an economy"
}, {
word: "secure",
definition: "Fixed or fastened so as not to give way"
}, {
word: "seek",
definition: "To attempt to find something"
}, {
word: "select",
definition: "To carefully choose from a number of alternatives"
}, {
word: "sequence",
definition: "A particular order in which things follow"
}, {
word: "series",
definition: "A number of events coming one after another"
}, {
word: "sex",
definition: "Either male or female division of organisms"
}, {
word: "shift",
definition: "To move or cause to move from one place"
}, {
word: "significant",
definition: "Sufficiently great to be worthy of attention"
}, {
word: "similar",
definition: "Having resemblance without being identical"
}, {
word: "simulate",
definition: "To imitate the conditions of a situation"
}, {
word: "site",
definition: "An area of ground on which something is located"
}, {
word: "so-called",
definition: "Used to express doubt about a name given"
}, {
word: "sole",
definition: "One and only"
}, {
word: "somewhat",
definition: "To a moderate extent or degree"
}, {
word: "source",
definition: "A place, person, or thing from which something comes"
}, {
word: "specific",
definition: "Clearly defined or identified"
}, {
word: "specify",
definition: "To identify clearly and definitely"
}, {
word: "sphere",
definition: "A round solid figure or an area of activity"
}, {
word: "stable",
definition: "Not likely to change or fail"
}, {
word: "statistic",
definition: "A fact or piece of data obtained from a study"
}, {
word: "status",
definition: "The relative social or professional position"
}, {
word: "straightforward",
definition: "Uncomplicated and easy to do"
}, {
word: "strategy",
definition: "A plan of action designed to achieve a goal"
}, {
word: "stress",
definition: "Pressure or tension exerted on an object"
}, {
word: "structure",
definition: "The arrangement of and relations between parts"
}, {
word: "style",
definition: "A manner of doing something"
}, {
word: "submit",
definition: "To accept or yield to authority"
}, {
word: "subordinate",
definition: "Lower in rank or position"
}, {
word: "subsequent",
definition: "Coming after something in time"
}, {
word: "subsidiary",
definition: "Less important than but related to something"
}, {
word: "substitute",
definition: "A person or thing acting in place of another"
}, {
word: "successor",
definition: "A person or thing that succeeds another"
}, {
word: "sufficient",
definition: "Enough to meet the needs of a situation"
}, {
word: "sum",
definition: "A particular amount of money"
}, {
word: "summary",
definition: "A brief statement of the main points"
}, {
word: "supplement",
definition: "Something that completes or enhances"
}, {
word: "survey",
definition: "A general view, examination, or description"
}, {
word: "survive",
definition: "To continue to live or exist"
}, {
word: "suspend",
definition: "To temporarily prevent from continuing"
}, {
word: "sustain",
definition: "To strengthen or support physically"
}, {
word: "symbol",
definition: "A thing representing something else"
}, {
word: "tape",
definition: "Light, flexible material in a narrow strip"
}, {
word: "target",
definition: "A person, object, or place aimed at"
}, {
word: "task",
definition: "A piece of work to be done"
}, {
word: "team",
definition: "A group of players forming one side"
}, {
word: "technical",
definition: "Relating to a particular subject or craft"
}, {
word: "technique",
definition: "A way of carrying out a particular activity"
}, {
word: "technology",
definition: "The application of scientific knowledge"
}, {
word: "temporary",
definition: "Lasting for only a limited period"
}, {
word: "tense",
definition: "Stretched tight or rigid"
}, {
word: "terminate",
definition: "To bring to an end"
}, {
word: "text",
definition: "Written or printed words"
}, {
word: "theme",
definition: "The subject of a talk or piece of writing"
}, {
word: "theory",
definition: "A supposition explaining something"
}, {
word: "thereby",
definition: "By that means; as a result of that"
}, {
word: "thesis",
definition: "A statement put forward as a premise"
}, {
word: "topic",
definition: "A matter dealt with in a text"
}, {
word: "trace",
definition: "To find or discover by investigation"
}, {
word: "track",
definition: "To follow the course or trail of"
}, {
word: "tradition",
definition: "The transmission of customs or beliefs"
}, {
word: "transfer",
definition: "To move from one place to another"
}, {
word: "transform",
definition: "To make a thorough change in form"
}, {
word: "transit",
definition: "The carrying of people or things"
}, {
word: "transmit",
definition: "To cause something to pass on"
}, {
word: "transport",
definition: "To take or carry from one place to another"
}, {
word: "trend",
definition: "A general direction in which something develops"
}, {
word: "trigger",
definition: "To cause something to happen"
}, {
word: "ultimate",
definition: "Being the best or most extreme example"
}, {
word: "undergo",
definition: "To experience or be subjected to"
}, {
word: "underlie",
definition: "To be the cause or basis of something"
}, {
word: "undertake",
definition: "To commit oneself to and begin"
}, {
word: "uniform",
definition: "Remaining the same in all cases"
}, {
word: "unify",
definition: "To make or become united"
}, {
word: "unique",
definition: "Being the only one of its kind"
}, {
word: "unity",
definition: "The state of being united"
}, {
word: "universal",
definition: "Applicable to all cases"
}, {
word: "update",
definition: "To give the latest information"
}, {
word: "upgrade",
definition: "To raise to a higher standard"
}, {
word: "urban",
definition: "Relating to a city or town"
}, {
word: "usage",
definition: "The action of using something"
}, {
word: "utilize",
definition: "To make practical use of something"
}, {
word: "valid",
definition: "Having a sound basis in logic or fact"
}, {
word: "vary",
definition: "To change or cause to change"
}, {
word: "vehicle",
definition: "A thing used for transporting people"
}, {
word: "version",
definition: "A particular form of something"
}, {
word: "via",
definition: "Traveling through a place en route"
}, {
word: "violate",
definition: "To break or fail to comply with"
}, {
word: "virtual",
definition: "Almost or nearly as described"
}, {
word: "visible",
definition: "Able to be seen"
}, {
word: "visual",
definition: "Relating to seeing or sight"
}, {
word: "volume",
definition: "The amount of space occupied by something"
}, {
word: "voluntary",
definition: "Done by one's own free choice"
}, {
word: "welfare",
definition: "The health and happiness of people"
}, {
word: "whereas",
definition: "In contrast or comparison with the fact"
}, {
word: "whereby",
definition: "By which or according to which"
}, {
word: "widespread",
definition: "Found or distributed over a large area"
}];
var currentQuestion = null;
var options = [];
var correctAnswer = null;
var isAnswering = false;
// Add wood background
var woodBg = game.attachAsset('woodBackground', {
anchorX: 0,
anchorY: 0,
x: 0,
y: 0
});
// Add logo at top center
var logo = game.attachAsset('logo', {
anchorX: 0.5,
anchorY: 0.5,
x: 2048 / 2,
y: 250
});
// Current score display in top-left with large digital style
var scoreTxt = new Text2('0', {
size: 80,
fill: 0x00FF00,
fontFamily: 'Courier New, monospace'
});
scoreTxt.anchor.set(0, 0);
LK.gui.topLeft.addChild(scoreTxt);
scoreTxt.x = 120;
scoreTxt.y = 50;
// Best score display in top-right
var bestScore = storage.bestScore || 0;
var bestScoreTxt = new Text2('Best: ' + bestScore, {
size: 50,
fill: 0xFFD700
});
bestScoreTxt.anchor.set(1, 0);
LK.gui.topRight.addChild(bestScoreTxt);
bestScoreTxt.x = -20;
bestScoreTxt.y = 30;
// View Bests link below best score
var viewBestsLink = new Text2('View Bests', {
size: 30,
fill: 0x000000
});
viewBestsLink.anchor.set(1, 0);
LK.gui.topRight.addChild(viewBestsLink);
viewBestsLink.x = -20;
viewBestsLink.y = 90;
// Make View Bests clickable
viewBestsLink.down = function (x, y, obj) {
console.log('View Bests clicked - Best Score: ' + bestScore);
};
// Question display with larger size
var questionBox = new QuestionBox();
questionBox.x = 2048 / 2;
questionBox.y = 1200;
questionBox.scaleX = 1;
questionBox.scaleY = 1;
game.addChild(questionBox);
// Option buttons positioned at bottom
var optionButtons = [];
for (var i = 0; i < 4; i++) {
var button = new OptionButton();
var row = Math.floor(i / 2);
var col = i % 2;
button.x = 512 + col * 1024;
button.y = 2100 + row * 200;
optionButtons.push(button);
game.addChild(button);
}
function generateQuestion() {
if (isAnswering) {
return;
}
// Select random word for correct answer
var randomIndex = Math.floor(Math.random() * wordDatabase.length);
currentQuestion = wordDatabase[randomIndex];
correctAnswer = currentQuestion.word;
// Set question definition
questionBox.setDefinition(currentQuestion.definition);
// Generate 3 wrong answers
var wrongAnswers = [];
while (wrongAnswers.length < 3) {
var randomWrongIndex = Math.floor(Math.random() * wordDatabase.length);
var wrongWord = wordDatabase[randomWrongIndex].word;
if (wrongWord !== correctAnswer && wrongAnswers.indexOf(wrongWord) === -1) {
wrongAnswers.push(wrongWord);
}
}
// Shuffle correct and wrong answers
options = [correctAnswer].concat(wrongAnswers);
for (var i = options.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = options[i];
options[i] = options[j];
options[j] = temp;
}
// Set up option buttons
for (var i = 0; i < 4; i++) {
optionButtons[i].reset();
optionButtons[i].setWord(options[i]);
optionButtons[i].setCorrect(options[i] === correctAnswer);
}
}
function handleAnswer(selectedButton) {
if (isAnswering) {
return;
}
isAnswering = true;
var isCorrect = selectedButton.isCorrect;
// Update score
if (isCorrect) {
LK.setScore(LK.getScore() + 10);
LK.getSound('correct').play();
} else {
LK.setScore(LK.getScore() - 5);
if (LK.getScore() < 0) {
LK.setScore(0);
}
LK.getSound('incorrect').play();
}
scoreTxt.setText(LK.getScore().toString());
// Update best score if current score is higher
if (LK.getScore() > bestScore) {
bestScore = LK.getScore();
storage.bestScore = bestScore;
bestScoreTxt.setText('Best: ' + bestScore);
}
// Show results on all buttons
for (var i = 0; i < 4; i++) {
optionButtons[i].showResult();
}
// Flash effect
if (isCorrect) {
LK.effects.flashObject(selectedButton, 0x00ff00, 500);
} else {
LK.effects.flashObject(selectedButton, 0xff0000, 500);
}
// Generate new question after delay
LK.setTimeout(function () {
isAnswering = false;
generateQuestion();
}, 1500);
}
LK.getSound('s').play();
// Start first question
generateQuestion(); /****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var OptionButton = Container.expand(function () {
var self = Container.call(this);
self.isCorrect = false;
self.isAnswered = false;
var background = self.attachAsset('optionBox', {
anchorX: 0.5,
anchorY: 0.5
});
self.wordText = new Text2('', {
size: 55,
fill: 0xFFFFFF
});
self.wordText.anchor.set(0.5, 0.5);
self.addChild(self.wordText);
self.setWord = function (word) {
self.wordText.setText(word);
};
self.setCorrect = function (correct) {
self.isCorrect = correct;
};
self.showResult = function () {
self.isAnswered = true;
var newAsset;
if (self.isCorrect) {
newAsset = LK.getAsset('correctBox', {
anchorX: 0.5,
anchorY: 0.5
});
} else {
newAsset = LK.getAsset('incorrectBox', {
anchorX: 0.5,
anchorY: 0.5
});
}
self.removeChildAt(0);
self.addChildAt(newAsset, 0);
};
self.reset = function () {
self.isAnswered = false;
self.isCorrect = false;
var newAsset = LK.getAsset('optionBox', {
anchorX: 0.5,
anchorY: 0.5
});
self.removeChildAt(0);
self.addChildAt(newAsset, 0);
};
self.down = function (x, y, obj) {
if (!self.isAnswered) {
handleAnswer(self);
}
};
return self;
});
var QuestionBox = Container.expand(function () {
var self = Container.call(this);
var background = self.attachAsset('questionBox', {
anchorX: 0.5,
anchorY: 0.5
});
self.definitionText = new Text2('', {
size: 65,
fill: 0xFFFFFF,
wordWrap: true,
wordWrapWidth: 1700
});
self.definitionText.anchor.set(0.5, 0.5);
self.addChild(self.definitionText);
self.setDefinition = function (definition) {
self.definitionText.setText(definition);
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x8B4513
});
/****
* Game Code
****/
// Word database with definitions
var wordDatabase = [{
word: "abandon",
definition: "To give up completely or leave behind"
}, {
word: "abundant",
definition: "Existing in large quantities; plentiful"
}, {
word: "accommodate",
definition: "To provide lodging or to adapt to"
}, {
word: "achieve",
definition: "To successfully complete or accomplish"
}, {
word: "acquire",
definition: "To obtain or get possession of"
}, {
word: "adequate",
definition: "Sufficient or acceptable in quality"
}, {
word: "advocate",
definition: "To publicly support or recommend"
}, {
word: "ambiguous",
definition: "Having more than one possible meaning"
}, {
word: "analyze",
definition: "To examine in detail for understanding"
}, {
word: "anticipate",
definition: "To expect or predict something will happen"
}, {
word: "appreciate",
definition: "To recognize the value or significance of"
}, {
word: "approach",
definition: "To come near or closer to something"
}, {
word: "appropriate",
definition: "Suitable or proper for a particular situation"
}, {
word: "arbitrary",
definition: "Based on random choice rather than reason"
}, {
word: "assemble",
definition: "To fit together the parts of something"
}, {
word: "assess",
definition: "To evaluate or judge the nature of"
}, {
word: "assume",
definition: "To suppose something is true without proof"
}, {
word: "authority",
definition: "The power or right to give orders"
}, {
word: "beneficial",
definition: "Having a good or helpful effect"
}, {
word: "capable",
definition: "Having the ability or skill to do something"
}, {
word: "capacity",
definition: "The maximum amount something can contain"
}, {
word: "circumstances",
definition: "The conditions that affect a situation"
}, {
word: "collaborate",
definition: "To work jointly with others"
}, {
word: "commence",
definition: "To begin or start"
}, {
word: "compensate",
definition: "To give something to make up for loss"
}, {
word: "competent",
definition: "Having necessary skill or knowledge"
}, {
word: "complement",
definition: "To complete or bring to perfection"
}, {
word: "comprehensive",
definition: "Complete and including everything"
}, {
word: "comprise",
definition: "To consist of or be made up of"
}, {
word: "conceive",
definition: "To form an idea or plan in the mind"
}, {
word: "conclude",
definition: "To bring or come to an end"
}, {
word: "concurrent",
definition: "Happening at the same time"
}, {
word: "conduct",
definition: "To organize and carry out"
}, {
word: "confirm",
definition: "To establish the truth of something"
}, {
word: "consecutive",
definition: "Following each other without interruption"
}, {
word: "consent",
definition: "Permission or agreement to do something"
}, {
word: "consequence",
definition: "A result or effect of an action"
}, {
word: "considerable",
definition: "Large in size, amount, or extent"
}, {
word: "consist",
definition: "To be composed or made up of"
}, {
word: "constitute",
definition: "To form or make up"
}, {
word: "constrain",
definition: "To limit or restrict"
}, {
word: "construct",
definition: "To build or put together"
}, {
word: "consume",
definition: "To use up or eat and drink"
}, {
word: "contemporary",
definition: "Belonging to the present time"
}, {
word: "contradict",
definition: "To assert the opposite of a statement"
}, {
word: "contrast",
definition: "To show differences when compared"
}, {
word: "contribute",
definition: "To give something to help achieve"
}, {
word: "controversy",
definition: "Disagreement about something important"
}, {
word: "convert",
definition: "To change from one form to another"
}, {
word: "convince",
definition: "To persuade someone to believe something"
}, {
word: "correspond",
definition: "To have close similarity or connection"
}, {
word: "criteria",
definition: "Standards used for judging something"
}, {
word: "crucial",
definition: "Extremely important or essential"
}, {
word: "culminate",
definition: "To reach the highest point"
}, {
word: "decade",
definition: "A period of ten years"
}, {
word: "decline",
definition: "To become smaller or weaker"
}, {
word: "deduce",
definition: "To reach a conclusion by reasoning"
}, {
word: "demonstrate",
definition: "To show clearly by evidence"
}, {
word: "denote",
definition: "To be a sign of or indicate"
}, {
word: "derive",
definition: "To obtain something from a source"
}, {
word: "detect",
definition: "To discover or identify something"
}, {
word: "deviate",
definition: "To depart from an established course"
}, {
word: "dimension",
definition: "A measurable extent such as length"
}, {
word: "diminish",
definition: "To make or become less"
}, {
word: "discrete",
definition: "Individually separate and distinct"
}, {
word: "discriminate",
definition: "To recognize a distinction"
}, {
word: "displace",
definition: "To take over the position of"
}, {
word: "dispose",
definition: "To get rid of or throw away"
}, {
word: "distinct",
definition: "Recognizably different in nature"
}, {
word: "distribute",
definition: "To give shares of something"
}, {
word: "diverse",
definition: "Showing great variety or difference"
}, {
word: "domain",
definition: "An area of territory or sphere of activity"
}, {
word: "dominate",
definition: "To have control or influence over"
}, {
word: "dramatic",
definition: "Sudden and striking in effect"
}, {
word: "duration",
definition: "The time during which something continues"
}, {
word: "element",
definition: "A basic part of a complex whole"
}, {
word: "eliminate",
definition: "To remove or get rid of"
}, {
word: "emerge",
definition: "To come forth into view from concealment"
}, {
word: "emphasis",
definition: "Special importance given to something"
}, {
word: "enable",
definition: "To give someone the ability to do something"
}, {
word: "encounter",
definition: "To meet someone or something unexpectedly"
}, {
word: "enhance",
definition: "To improve the quality or value of"
}, {
word: "enormous",
definition: "Very large in size or quantity"
}, {
word: "ensure",
definition: "To make certain that something happens"
}, {
word: "entity",
definition: "A thing with distinct existence"
}, {
word: "environment",
definition: "The surroundings or conditions"
}, {
word: "equivalent",
definition: "Equal in value, amount, or meaning"
}, {
word: "error",
definition: "A mistake or inaccuracy"
}, {
word: "establish",
definition: "To set up on a firm basis"
}, {
word: "estimate",
definition: "To roughly calculate or judge"
}, {
word: "evaluate",
definition: "To form an idea of the worth of"
}, {
word: "eventual",
definition: "Occurring at the end of a process"
}, {
word: "evident",
definition: "Clearly seen or understood"
}, {
word: "evolve",
definition: "To develop gradually"
}, {
word: "exceed",
definition: "To be greater than a number or amount"
}, {
word: "exclude",
definition: "To deny access to or bar from"
}, {
word: "exhibit",
definition: "To display or show publicly"
}, {
word: "expand",
definition: "To become or make larger"
}, {
word: "expert",
definition: "A person with special knowledge"
}, {
word: "explicit",
definition: "Stated clearly and exactly"
}, {
word: "exploit",
definition: "To make use of and benefit from"
}, {
word: "expose",
definition: "To reveal or make visible"
}, {
word: "external",
definition: "Belonging to or forming the outer surface"
}, {
word: "extract",
definition: "To remove or take out"
}, {
word: "facilitate",
definition: "To make an action easier"
}, {
word: "factor",
definition: "A circumstance that contributes to a result"
}, {
word: "feature",
definition: "A distinctive attribute or characteristic"
}, {
word: "final",
definition: "Coming at the end; last"
}, {
word: "finance",
definition: "The management of money and investments"
}, {
word: "finite",
definition: "Having limits or bounds"
}, {
word: "flexible",
definition: "Able to bend without breaking"
}, {
word: "fluctuate",
definition: "To rise and fall irregularly"
}, {
word: "formula",
definition: "A mathematical rule expressed in symbols"
}, {
word: "foundation",
definition: "An underlying basis or principle"
}, {
word: "framework",
definition: "A basic structure underlying a system"
}, {
word: "function",
definition: "The purpose for which something exists"
}, {
word: "fundamental",
definition: "Forming a necessary base or core"
}, {
word: "generate",
definition: "To produce or create"
}, {
word: "globe",
definition: "The earth or a spherical representation"
}, {
word: "goal",
definition: "An aim or desired result"
}, {
word: "grade",
definition: "A level of rank, quality, or proficiency"
}, {
word: "grant",
definition: "To give or allow someone to have"
}, {
word: "guarantee",
definition: "A formal promise or assurance"
}, {
word: "guideline",
definition: "A general rule or principle"
}, {
word: "hence",
definition: "As a consequence; for this reason"
}, {
word: "hypothesis",
definition: "A proposed explanation for something"
}, {
word: "identical",
definition: "Exactly the same"
}, {
word: "identify",
definition: "To recognize or establish who someone is"
}, {
word: "ideology",
definition: "A system of ideas and ideals"
}, {
word: "illustrate",
definition: "To explain by using examples"
}, {
word: "image",
definition: "A representation of something"
}, {
word: "implement",
definition: "To put a plan or system into effect"
}, {
word: "imply",
definition: "To suggest something without saying it"
}, {
word: "impose",
definition: "To force something unwelcome to be accepted"
}, {
word: "incentive",
definition: "Something that motivates action"
}, {
word: "incidence",
definition: "The occurrence or rate of something"
}, {
word: "income",
definition: "Money received for work or investments"
}, {
word: "incorporate",
definition: "To include something as part of a whole"
}, {
word: "index",
definition: "An alphabetical list of names or subjects"
}, {
word: "indicate",
definition: "To point out or show"
}, {
word: "individual",
definition: "Single; separate from others"
}, {
word: "induce",
definition: "To succeed in persuading someone to do"
}, {
word: "inevitable",
definition: "Certain to happen; unavoidable"
}, {
word: "infer",
definition: "To deduce from evidence and reasoning"
}, {
word: "inhibit",
definition: "To hinder or restrain"
}, {
word: "initial",
definition: "Existing or occurring at the beginning"
}, {
word: "initiate",
definition: "To cause a process to begin"
}, {
word: "innovate",
definition: "To make changes in something established"
}, {
word: "input",
definition: "What is put in or contributed"
}, {
word: "insert",
definition: "To place or fit something into something"
}, {
word: "inspect",
definition: "To look at something carefully"
}, {
word: "instance",
definition: "An example or single occurrence"
}, {
word: "institute",
definition: "To establish something"
}, {
word: "instruct",
definition: "To teach someone or give directions"
}, {
word: "integral",
definition: "Necessary to make a whole complete"
}, {
word: "integrate",
definition: "To combine parts into a whole"
}, {
word: "intelligent",
definition: "Having good understanding or judgment"
}, {
word: "intense",
definition: "Existing in high degree; extreme"
}, {
word: "interact",
definition: "To act in a way that has an effect"
}, {
word: "intermediate",
definition: "Coming between two things in time"
}, {
word: "internal",
definition: "Existing on the inside"
}, {
word: "interpret",
definition: "To explain the meaning of something"
}, {
word: "interval",
definition: "A space of time between events"
}, {
word: "intervene",
definition: "To come between to prevent or alter"
}, {
word: "intrinsic",
definition: "Belonging naturally; essential"
}, {
word: "invest",
definition: "To put money into something for profit"
}, {
word: "investigate",
definition: "To carry out research into something"
}, {
word: "invoke",
definition: "To call on something for assistance"
}, {
word: "involve",
definition: "To include as a necessary part"
}, {
word: "isolate",
definition: "To set apart from others"
}, {
word: "issue",
definition: "An important topic for debate"
}, {
word: "item",
definition: "An individual article or unit"
}, {
word: "journal",
definition: "A newspaper or magazine"
}, {
word: "justify",
definition: "To show or prove to be reasonable"
}, {
word: "label",
definition: "A piece of paper or other material"
}, {
word: "labor",
definition: "Work involving mental or physical effort"
}, {
word: "layer",
definition: "A sheet or thickness of material"
}, {
word: "lecture",
definition: "An educational talk to an audience"
}, {
word: "legal",
definition: "Permitted by law"
}, {
word: "legislate",
definition: "To make or enact laws"
}, {
word: "levy",
definition: "To impose a tax or fine"
}, {
word: "liberal",
definition: "Open to new behavior or opinions"
}, {
word: "license",
definition: "A permit to own or use something"
}, {
word: "likewise",
definition: "In the same way; also"
}, {
word: "link",
definition: "A relationship between two things"
}, {
word: "locate",
definition: "To discover the exact place of something"
}, {
word: "logic",
definition: "Reasoning conducted according to principles"
}, {
word: "maintain",
definition: "To cause to continue in the same state"
}, {
word: "major",
definition: "Important, serious, or significant"
}, {
word: "manipulate",
definition: "To handle or control in a skillful way"
}, {
word: "manual",
definition: "Done or operated by hand"
}, {
word: "margin",
definition: "The edge or border of something"
}, {
word: "mature",
definition: "Fully developed physically or mentally"
}, {
word: "maximum",
definition: "The greatest amount possible"
}, {
word: "mechanism",
definition: "A system of parts working together"
}, {
word: "media",
definition: "The means of mass communication"
}, {
word: "medical",
definition: "Relating to medicine or treatment"
}, {
word: "medium",
definition: "In the middle between extremes"
}, {
word: "mental",
definition: "Relating to the mind"
}, {
word: "method",
definition: "A particular procedure for doing something"
}, {
word: "migrate",
definition: "To move from one place to another"
}, {
word: "military",
definition: "Relating to armed forces"
}, {
word: "minimize",
definition: "To reduce to the smallest possible amount"
}, {
word: "minimum",
definition: "The least or smallest amount possible"
}, {
word: "minor",
definition: "Lesser in importance or seriousness"
}, {
word: "mode",
definition: "A way or manner of doing something"
}, {
word: "modify",
definition: "To make partial changes to something"
}, {
word: "monitor",
definition: "To observe and check over time"
}, {
word: "motive",
definition: "A reason for doing something"
}, {
word: "mutual",
definition: "Experienced by two or more parties"
}, {
word: "negate",
definition: "To nullify or make ineffective"
}, {
word: "network",
definition: "A group of interconnected things"
}, {
word: "neutral",
definition: "Not helping either side in a conflict"
}, {
word: "nevertheless",
definition: "In spite of that; however"
}, {
word: "norm",
definition: "Something that is usual or standard"
}, {
word: "normal",
definition: "Conforming to a standard; usual"
}, {
word: "notion",
definition: "A conception or belief about something"
}, {
word: "nuclear",
definition: "Relating to the nucleus of an atom"
}, {
word: "objective",
definition: "Not influenced by personal feelings"
}, {
word: "obtain",
definition: "To get or acquire something"
}, {
word: "obvious",
definition: "Easily perceived or understood"
}, {
word: "occupy",
definition: "To take up space or time"
}, {
word: "occur",
definition: "To happen or take place"
}, {
word: "odd",
definition: "Strange or unusual"
}, {
word: "offset",
definition: "To counteract something by having an equal force"
}, {
word: "ongoing",
definition: "Continuing to exist or progress"
}, {
word: "option",
definition: "A thing that may be chosen"
}, {
word: "orient",
definition: "To align relative to points of compass"
}, {
word: "outcome",
definition: "The result or consequence of something"
}, {
word: "output",
definition: "The amount of something produced"
}, {
word: "overall",
definition: "Taking everything into account"
}, {
word: "overlap",
definition: "To extend over and cover part of"
}, {
word: "overseas",
definition: "In or to a foreign country"
}, {
word: "panel",
definition: "A flat piece forming part of a surface"
}, {
word: "paradigm",
definition: "A typical example or pattern"
}, {
word: "paragraph",
definition: "A distinct section of writing"
}, {
word: "parallel",
definition: "Side by side and having same distance"
}, {
word: "parameter",
definition: "A numerical characteristic of a population"
}, {
word: "participate",
definition: "To take part in something"
}, {
word: "partner",
definition: "A person who takes part with another"
}, {
word: "passive",
definition: "Accepting what happens without resistance"
}, {
word: "patent",
definition: "A government license for an invention"
}, {
word: "perceive",
definition: "To become aware of through the senses"
}, {
word: "percent",
definition: "By the hundred; out of every hundred"
}, {
word: "period",
definition: "A length or portion of time"
}, {
word: "persist",
definition: "To continue firmly despite difficulty"
}, {
word: "perspective",
definition: "A particular attitude toward something"
}, {
word: "phase",
definition: "A distinct period in development"
}, {
word: "phenomenon",
definition: "A fact or situation observed to exist"
}, {
word: "philosophy",
definition: "The study of fundamental nature of reality"
}, {
word: "physical",
definition: "Relating to the body or material things"
}, {
word: "plus",
definition: "With the addition of"
}, {
word: "policy",
definition: "A course of action adopted by government"
}, {
word: "portion",
definition: "A part of a whole"
}, {
word: "pose",
definition: "To present or constitute a problem"
}, {
word: "positive",
definition: "Constructive, optimistic, or confident"
}, {
word: "potential",
definition: "Having or showing capacity for development"
}, {
word: "practitioner",
definition: "A person engaged in a profession"
}, {
word: "precede",
definition: "To come before in time or order"
}, {
word: "precise",
definition: "Marked by exactness and accuracy"
}, {
word: "predict",
definition: "To say what will happen in the future"
}, {
word: "preliminary",
definition: "Preceding the main part of something"
}, {
word: "presume",
definition: "To suppose something is true"
}, {
word: "previous",
definition: "Existing or occurring before in time"
}, {
word: "primary",
definition: "Of chief importance; principal"
}, {
word: "prime",
definition: "Of first importance; main"
}, {
word: "principal",
definition: "First in order of importance"
}, {
word: "principle",
definition: "A fundamental truth serving as foundation"
}, {
word: "prior",
definition: "Existing or coming before in time"
}, {
word: "priority",
definition: "The fact of being regarded as more important"
}, {
word: "proceed",
definition: "To begin or continue a course of action"
}, {
word: "process",
definition: "A series of actions to achieve a result"
}, {
word: "professional",
definition: "Relating to a job requiring special training"
}, {
word: "project",
definition: "An individual or collaborative enterprise"
}, {
word: "promote",
definition: "To further the progress of something"
}, {
word: "proportion",
definition: "A part considered in relation to the whole"
}, {
word: "prospect",
definition: "The possibility of future success"
}, {
word: "protocol",
definition: "The official procedure or rules"
}, {
word: "psychology",
definition: "The scientific study of mind and behavior"
}, {
word: "publication",
definition: "The preparation and issuing of a book"
}, {
word: "publish",
definition: "To prepare and issue for public sale"
}, {
word: "purchase",
definition: "To acquire by paying money for it"
}, {
word: "pursue",
definition: "To follow or chase"
}, {
word: "qualitative",
definition: "Relating to quality or kind"
}, {
word: "quantitative",
definition: "Relating to quantity or amount"
}, {
word: "quote",
definition: "To repeat someone else's words"
}, {
word: "radical",
definition: "Relating to fundamental nature of something"
}, {
word: "random",
definition: "Made without conscious decision"
}, {
word: "range",
definition: "The area of variation between limits"
}, {
word: "ratio",
definition: "The quantitative relation between amounts"
}, {
word: "rational",
definition: "Based on reason or logic"
}, {
word: "react",
definition: "To respond or behave in particular way"
}, {
word: "recover",
definition: "To return to normal state of health"
}, {
word: "refine",
definition: "To improve by making small changes"
}, {
word: "reform",
definition: "To make changes to improve something"
}, {
word: "regard",
definition: "To consider or think of in a particular way"
}, {
word: "region",
definition: "An area of a country or the world"
}, {
word: "register",
definition: "To record or sign up officially"
}, {
word: "regulate",
definition: "To control by means of rules"
}, {
word: "reinforce",
definition: "To strengthen or give support to"
}, {
word: "reject",
definition: "To dismiss as inadequate or unacceptable"
}, {
word: "relax",
definition: "To make or become less tense"
}, {
word: "release",
definition: "To allow to escape or go free"
}, {
word: "relevant",
definition: "Closely connected to the matter at hand"
}, {
word: "reliable",
definition: "Consistently good in quality or performance"
}, {
word: "reluctant",
definition: "Unwilling and hesitant"
}, {
word: "rely",
definition: "To depend on with confidence"
}, {
word: "remove",
definition: "To take away from a place or position"
}, {
word: "require",
definition: "To need for a particular purpose"
}, {
word: "research",
definition: "The systematic investigation into a subject"
}, {
word: "reside",
definition: "To have one's permanent home somewhere"
}, {
word: "resolve",
definition: "To settle or find solution to a problem"
}, {
word: "resource",
definition: "A supply of something that can be drawn on"
}, {
word: "respond",
definition: "To say something in reply"
}, {
word: "restore",
definition: "To bring back to former condition"
}, {
word: "restrict",
definition: "To put limits on something"
}, {
word: "retain",
definition: "To continue to have something"
}, {
word: "reveal",
definition: "To make known or show"
}, {
word: "revenue",
definition: "Income generated by a business"
}, {
word: "reverse",
definition: "To move backward or in opposite direction"
}, {
word: "revise",
definition: "To reconsider and alter"
}, {
word: "revolution",
definition: "A dramatic and wide-reaching change"
}, {
word: "rigid",
definition: "Unable to bend or be forced out of shape"
}, {
word: "role",
definition: "The function assumed by someone"
}, {
word: "route",
definition: "A way or course taken to get somewhere"
}, {
word: "scenario",
definition: "A written outline of a possible course"
}, {
word: "schedule",
definition: "A plan for carrying out a process"
}, {
word: "scheme",
definition: "A large-scale systematic plan"
}, {
word: "scope",
definition: "The extent of the area covered by something"
}, {
word: "section",
definition: "Any of the parts into which something is divided"
}, {
word: "sector",
definition: "An area of activity in an economy"
}, {
word: "secure",
definition: "Fixed or fastened so as not to give way"
}, {
word: "seek",
definition: "To attempt to find something"
}, {
word: "select",
definition: "To carefully choose from a number of alternatives"
}, {
word: "sequence",
definition: "A particular order in which things follow"
}, {
word: "series",
definition: "A number of events coming one after another"
}, {
word: "sex",
definition: "Either male or female division of organisms"
}, {
word: "shift",
definition: "To move or cause to move from one place"
}, {
word: "significant",
definition: "Sufficiently great to be worthy of attention"
}, {
word: "similar",
definition: "Having resemblance without being identical"
}, {
word: "simulate",
definition: "To imitate the conditions of a situation"
}, {
word: "site",
definition: "An area of ground on which something is located"
}, {
word: "so-called",
definition: "Used to express doubt about a name given"
}, {
word: "sole",
definition: "One and only"
}, {
word: "somewhat",
definition: "To a moderate extent or degree"
}, {
word: "source",
definition: "A place, person, or thing from which something comes"
}, {
word: "specific",
definition: "Clearly defined or identified"
}, {
word: "specify",
definition: "To identify clearly and definitely"
}, {
word: "sphere",
definition: "A round solid figure or an area of activity"
}, {
word: "stable",
definition: "Not likely to change or fail"
}, {
word: "statistic",
definition: "A fact or piece of data obtained from a study"
}, {
word: "status",
definition: "The relative social or professional position"
}, {
word: "straightforward",
definition: "Uncomplicated and easy to do"
}, {
word: "strategy",
definition: "A plan of action designed to achieve a goal"
}, {
word: "stress",
definition: "Pressure or tension exerted on an object"
}, {
word: "structure",
definition: "The arrangement of and relations between parts"
}, {
word: "style",
definition: "A manner of doing something"
}, {
word: "submit",
definition: "To accept or yield to authority"
}, {
word: "subordinate",
definition: "Lower in rank or position"
}, {
word: "subsequent",
definition: "Coming after something in time"
}, {
word: "subsidiary",
definition: "Less important than but related to something"
}, {
word: "substitute",
definition: "A person or thing acting in place of another"
}, {
word: "successor",
definition: "A person or thing that succeeds another"
}, {
word: "sufficient",
definition: "Enough to meet the needs of a situation"
}, {
word: "sum",
definition: "A particular amount of money"
}, {
word: "summary",
definition: "A brief statement of the main points"
}, {
word: "supplement",
definition: "Something that completes or enhances"
}, {
word: "survey",
definition: "A general view, examination, or description"
}, {
word: "survive",
definition: "To continue to live or exist"
}, {
word: "suspend",
definition: "To temporarily prevent from continuing"
}, {
word: "sustain",
definition: "To strengthen or support physically"
}, {
word: "symbol",
definition: "A thing representing something else"
}, {
word: "tape",
definition: "Light, flexible material in a narrow strip"
}, {
word: "target",
definition: "A person, object, or place aimed at"
}, {
word: "task",
definition: "A piece of work to be done"
}, {
word: "team",
definition: "A group of players forming one side"
}, {
word: "technical",
definition: "Relating to a particular subject or craft"
}, {
word: "technique",
definition: "A way of carrying out a particular activity"
}, {
word: "technology",
definition: "The application of scientific knowledge"
}, {
word: "temporary",
definition: "Lasting for only a limited period"
}, {
word: "tense",
definition: "Stretched tight or rigid"
}, {
word: "terminate",
definition: "To bring to an end"
}, {
word: "text",
definition: "Written or printed words"
}, {
word: "theme",
definition: "The subject of a talk or piece of writing"
}, {
word: "theory",
definition: "A supposition explaining something"
}, {
word: "thereby",
definition: "By that means; as a result of that"
}, {
word: "thesis",
definition: "A statement put forward as a premise"
}, {
word: "topic",
definition: "A matter dealt with in a text"
}, {
word: "trace",
definition: "To find or discover by investigation"
}, {
word: "track",
definition: "To follow the course or trail of"
}, {
word: "tradition",
definition: "The transmission of customs or beliefs"
}, {
word: "transfer",
definition: "To move from one place to another"
}, {
word: "transform",
definition: "To make a thorough change in form"
}, {
word: "transit",
definition: "The carrying of people or things"
}, {
word: "transmit",
definition: "To cause something to pass on"
}, {
word: "transport",
definition: "To take or carry from one place to another"
}, {
word: "trend",
definition: "A general direction in which something develops"
}, {
word: "trigger",
definition: "To cause something to happen"
}, {
word: "ultimate",
definition: "Being the best or most extreme example"
}, {
word: "undergo",
definition: "To experience or be subjected to"
}, {
word: "underlie",
definition: "To be the cause or basis of something"
}, {
word: "undertake",
definition: "To commit oneself to and begin"
}, {
word: "uniform",
definition: "Remaining the same in all cases"
}, {
word: "unify",
definition: "To make or become united"
}, {
word: "unique",
definition: "Being the only one of its kind"
}, {
word: "unity",
definition: "The state of being united"
}, {
word: "universal",
definition: "Applicable to all cases"
}, {
word: "update",
definition: "To give the latest information"
}, {
word: "upgrade",
definition: "To raise to a higher standard"
}, {
word: "urban",
definition: "Relating to a city or town"
}, {
word: "usage",
definition: "The action of using something"
}, {
word: "utilize",
definition: "To make practical use of something"
}, {
word: "valid",
definition: "Having a sound basis in logic or fact"
}, {
word: "vary",
definition: "To change or cause to change"
}, {
word: "vehicle",
definition: "A thing used for transporting people"
}, {
word: "version",
definition: "A particular form of something"
}, {
word: "via",
definition: "Traveling through a place en route"
}, {
word: "violate",
definition: "To break or fail to comply with"
}, {
word: "virtual",
definition: "Almost or nearly as described"
}, {
word: "visible",
definition: "Able to be seen"
}, {
word: "visual",
definition: "Relating to seeing or sight"
}, {
word: "volume",
definition: "The amount of space occupied by something"
}, {
word: "voluntary",
definition: "Done by one's own free choice"
}, {
word: "welfare",
definition: "The health and happiness of people"
}, {
word: "whereas",
definition: "In contrast or comparison with the fact"
}, {
word: "whereby",
definition: "By which or according to which"
}, {
word: "widespread",
definition: "Found or distributed over a large area"
}];
var currentQuestion = null;
var options = [];
var correctAnswer = null;
var isAnswering = false;
// Add wood background
var woodBg = game.attachAsset('woodBackground', {
anchorX: 0,
anchorY: 0,
x: 0,
y: 0
});
// Add logo at top center
var logo = game.attachAsset('logo', {
anchorX: 0.5,
anchorY: 0.5,
x: 2048 / 2,
y: 250
});
// Current score display in top-left with large digital style
var scoreTxt = new Text2('0', {
size: 80,
fill: 0x00FF00,
fontFamily: 'Courier New, monospace'
});
scoreTxt.anchor.set(0, 0);
LK.gui.topLeft.addChild(scoreTxt);
scoreTxt.x = 120;
scoreTxt.y = 50;
// Best score display in top-right
var bestScore = storage.bestScore || 0;
var bestScoreTxt = new Text2('Best: ' + bestScore, {
size: 50,
fill: 0xFFD700
});
bestScoreTxt.anchor.set(1, 0);
LK.gui.topRight.addChild(bestScoreTxt);
bestScoreTxt.x = -20;
bestScoreTxt.y = 30;
// View Bests link below best score
var viewBestsLink = new Text2('View Bests', {
size: 30,
fill: 0x000000
});
viewBestsLink.anchor.set(1, 0);
LK.gui.topRight.addChild(viewBestsLink);
viewBestsLink.x = -20;
viewBestsLink.y = 90;
// Make View Bests clickable
viewBestsLink.down = function (x, y, obj) {
console.log('View Bests clicked - Best Score: ' + bestScore);
};
// Question display with larger size
var questionBox = new QuestionBox();
questionBox.x = 2048 / 2;
questionBox.y = 1200;
questionBox.scaleX = 1;
questionBox.scaleY = 1;
game.addChild(questionBox);
// Option buttons positioned at bottom
var optionButtons = [];
for (var i = 0; i < 4; i++) {
var button = new OptionButton();
var row = Math.floor(i / 2);
var col = i % 2;
button.x = 512 + col * 1024;
button.y = 2100 + row * 200;
optionButtons.push(button);
game.addChild(button);
}
function generateQuestion() {
if (isAnswering) {
return;
}
// Select random word for correct answer
var randomIndex = Math.floor(Math.random() * wordDatabase.length);
currentQuestion = wordDatabase[randomIndex];
correctAnswer = currentQuestion.word;
// Set question definition
questionBox.setDefinition(currentQuestion.definition);
// Generate 3 wrong answers
var wrongAnswers = [];
while (wrongAnswers.length < 3) {
var randomWrongIndex = Math.floor(Math.random() * wordDatabase.length);
var wrongWord = wordDatabase[randomWrongIndex].word;
if (wrongWord !== correctAnswer && wrongAnswers.indexOf(wrongWord) === -1) {
wrongAnswers.push(wrongWord);
}
}
// Shuffle correct and wrong answers
options = [correctAnswer].concat(wrongAnswers);
for (var i = options.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = options[i];
options[i] = options[j];
options[j] = temp;
}
// Set up option buttons
for (var i = 0; i < 4; i++) {
optionButtons[i].reset();
optionButtons[i].setWord(options[i]);
optionButtons[i].setCorrect(options[i] === correctAnswer);
}
}
function handleAnswer(selectedButton) {
if (isAnswering) {
return;
}
isAnswering = true;
var isCorrect = selectedButton.isCorrect;
// Update score
if (isCorrect) {
LK.setScore(LK.getScore() + 10);
LK.getSound('correct').play();
} else {
LK.setScore(LK.getScore() - 5);
if (LK.getScore() < 0) {
LK.setScore(0);
}
LK.getSound('incorrect').play();
}
scoreTxt.setText(LK.getScore().toString());
// Update best score if current score is higher
if (LK.getScore() > bestScore) {
bestScore = LK.getScore();
storage.bestScore = bestScore;
bestScoreTxt.setText('Best: ' + bestScore);
}
// Show results on all buttons
for (var i = 0; i < 4; i++) {
optionButtons[i].showResult();
}
// Flash effect
if (isCorrect) {
LK.effects.flashObject(selectedButton, 0x00ff00, 500);
} else {
LK.effects.flashObject(selectedButton, 0xff0000, 500);
}
// Generate new question after delay
LK.setTimeout(function () {
isAnswering = false;
generateQuestion();
}, 1500);
}
LK.getSound('s').play();
// Start first question
generateQuestion();