Compare commits
76 Commits
Author | SHA1 | Date |
---|---|---|
Robert Chen | 38b30e23d1 | 10 years ago |
Robert Chen | c32af7c431 | 10 years ago |
Zott820 | 150fc28435 | 10 years ago |
Robert Chen | 1bc0788752 | 11 years ago |
Zott820 | 5b0a60815c | 11 years ago |
Zott820 | 23a9b78633 | 11 years ago |
Robert Chen | 13afa12307 | 11 years ago |
Robert Chen | 7ea13ab753 | 11 years ago |
Robert Chen | 4023f6f150 | 11 years ago |
Robert Chen | 9efe75e0ce | 11 years ago |
Robert Chen | 39a5674e42 | 11 years ago |
Robert Chen | 918907c2e8 | 11 years ago |
Zott820 | ef6fdbaf90 | 11 years ago |
Zott820 | ef9a3a1921 | 11 years ago |
SheenKao | edae9ee63a | 11 years ago |
Robert Chen | 32f291a3c0 | 11 years ago |
Robert Chen | 2f87b7cd90 | 11 years ago |
Robert Chen | 58e5b35364 | 11 years ago |
Robert Chen | 9cc608e406 | 11 years ago |
Robert Chen | ffe8f5febf | 11 years ago |
Zott820 | f5b4bee126 | 11 years ago |
Robert Chen | cc065837c6 | 11 years ago |
Zott820 | db4a3c78ac | 11 years ago |
Zott820 | 894df796db | 11 years ago |
Robert Chen | 3e273827bb | 11 years ago |
Robert Chen | 85be74cc83 | 11 years ago |
Robert Chen | 4dbd98a618 | 11 years ago |
Robert Chen | ccd0b1ceed | 11 years ago |
sakerfalcon | 0e37a1d441 | 11 years ago |
sakerfalcon | 3f8f4b4162 | 11 years ago |
sakerfalcon | 29c75b2f6f | 11 years ago |
sakerfalcon | fc923abb8a | 11 years ago |
sakerfalcon | c4f71c1436 | 11 years ago |
sakerfalcon | 318bb5afda | 11 years ago |
sakerfalcon | 14014f6156 | 11 years ago |
sakerfalcon | e5617df6ef | 11 years ago |
Robert Chen | fb92860175 | 11 years ago |
Robert Chen | be8ce4c28d | 11 years ago |
Robert Chen | c16976a691 | 11 years ago |
Robert Chen | 47d6ead344 | 11 years ago |
Robert Chen | 56bcde6458 | 11 years ago |
Robert Chen | cbd9738a6d | 11 years ago |
Robert Chen | c2d9bc6e6d | 11 years ago |
Robert Chen | 690c8be1fb | 11 years ago |
Robert Chen | 5f1b4e59e4 | 11 years ago |
Robert Chen | 281e007ca9 | 11 years ago |
Robert Chen | 5d9373e688 | 11 years ago |
Robert Chen | 7d6da51451 | 11 years ago |
Robert Chen | 553a303bf2 | 11 years ago |
Robert Chen | 455d9e6e21 | 11 years ago |
Robert Chen | b66d307b6e | 11 years ago |
Robert Chen | 7381f55699 | 11 years ago |
Robert Chen | 49ad605a46 | 11 years ago |
Robert Chen | 77ca3dbc59 | 11 years ago |
Robert Chen | 7441e3b182 | 11 years ago |
Robert Chen | 5d3920e069 | 11 years ago |
Robert Chen | 5a8473c21d | 11 years ago |
Robert Chen | b539104f59 | 11 years ago |
Robert Chen | 8e975c3d99 | 11 years ago |
Robert Chen | 6dff033fe7 | 11 years ago |
Robert Chen | a2abc33f67 | 11 years ago |
Robert Chen | f1c12f87ca | 11 years ago |
Robert Chen | 10766bb687 | 11 years ago |
Robert Chen | 629d7a10d1 | 11 years ago |
Robert Chen | 515352a562 | 11 years ago |
Robert Chen | e2fe4cd664 | 11 years ago |
Robert Chen | 845c98b7a6 | 11 years ago |
Robert Chen | 09509b4caa | 11 years ago |
Robert Chen | 1be987f003 | 11 years ago |
Robert Chen | 4b18b3a5ca | 11 years ago |
Robert Chen | 332cf780f8 | 11 years ago |
Robert Chen | a96dd9459a | 11 years ago |
Robert Chen | a4a04ed71a | 11 years ago |
Robert Chen | 1da45c0ba9 | 11 years ago |
Robert Chen | 2d8e5909dc | 11 years ago |
Robert Chen | 2682b732d8 | 11 years ago |
@ -0,0 +1,674 @@
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE |
||||
Version 3, 29 June 2007 |
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
||||
Everyone is permitted to copy and distribute verbatim copies |
||||
of this license document, but changing it is not allowed. |
||||
|
||||
Preamble |
||||
|
||||
The GNU General Public License is a free, copyleft license for |
||||
software and other kinds of works. |
||||
|
||||
The licenses for most software and other practical works are designed |
||||
to take away your freedom to share and change the works. By contrast, |
||||
the GNU General Public License is intended to guarantee your freedom to |
||||
share and change all versions of a program--to make sure it remains free |
||||
software for all its users. We, the Free Software Foundation, use the |
||||
GNU General Public License for most of our software; it applies also to |
||||
any other work released this way by its authors. You can apply it to |
||||
your programs, too. |
||||
|
||||
When we speak of free software, we are referring to freedom, not |
||||
price. Our General Public Licenses are designed to make sure that you |
||||
have the freedom to distribute copies of free software (and charge for |
||||
them if you wish), that you receive source code or can get it if you |
||||
want it, that you can change the software or use pieces of it in new |
||||
free programs, and that you know you can do these things. |
||||
|
||||
To protect your rights, we need to prevent others from denying you |
||||
these rights or asking you to surrender the rights. Therefore, you have |
||||
certain responsibilities if you distribute copies of the software, or if |
||||
you modify it: responsibilities to respect the freedom of others. |
||||
|
||||
For example, if you distribute copies of such a program, whether |
||||
gratis or for a fee, you must pass on to the recipients the same |
||||
freedoms that you received. You must make sure that they, too, receive |
||||
or can get the source code. And you must show them these terms so they |
||||
know their rights. |
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps: |
||||
(1) assert copyright on the software, and (2) offer you this License |
||||
giving you legal permission to copy, distribute and/or modify it. |
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains |
||||
that there is no warranty for this free software. For both users' and |
||||
authors' sake, the GPL requires that modified versions be marked as |
||||
changed, so that their problems will not be attributed erroneously to |
||||
authors of previous versions. |
||||
|
||||
Some devices are designed to deny users access to install or run |
||||
modified versions of the software inside them, although the manufacturer |
||||
can do so. This is fundamentally incompatible with the aim of |
||||
protecting users' freedom to change the software. The systematic |
||||
pattern of such abuse occurs in the area of products for individuals to |
||||
use, which is precisely where it is most unacceptable. Therefore, we |
||||
have designed this version of the GPL to prohibit the practice for those |
||||
products. If such problems arise substantially in other domains, we |
||||
stand ready to extend this provision to those domains in future versions |
||||
of the GPL, as needed to protect the freedom of users. |
||||
|
||||
Finally, every program is threatened constantly by software patents. |
||||
States should not allow patents to restrict development and use of |
||||
software on general-purpose computers, but in those that do, we wish to |
||||
avoid the special danger that patents applied to a free program could |
||||
make it effectively proprietary. To prevent this, the GPL assures that |
||||
patents cannot be used to render the program non-free. |
||||
|
||||
The precise terms and conditions for copying, distribution and |
||||
modification follow. |
||||
|
||||
TERMS AND CONDITIONS |
||||
|
||||
0. Definitions. |
||||
|
||||
"This License" refers to version 3 of the GNU General Public License. |
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of |
||||
works, such as semiconductor masks. |
||||
|
||||
"The Program" refers to any copyrightable work licensed under this |
||||
License. Each licensee is addressed as "you". "Licensees" and |
||||
"recipients" may be individuals or organizations. |
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work |
||||
in a fashion requiring copyright permission, other than the making of an |
||||
exact copy. The resulting work is called a "modified version" of the |
||||
earlier work or a work "based on" the earlier work. |
||||
|
||||
A "covered work" means either the unmodified Program or a work based |
||||
on the Program. |
||||
|
||||
To "propagate" a work means to do anything with it that, without |
||||
permission, would make you directly or secondarily liable for |
||||
infringement under applicable copyright law, except executing it on a |
||||
computer or modifying a private copy. Propagation includes copying, |
||||
distribution (with or without modification), making available to the |
||||
public, and in some countries other activities as well. |
||||
|
||||
To "convey" a work means any kind of propagation that enables other |
||||
parties to make or receive copies. Mere interaction with a user through |
||||
a computer network, with no transfer of a copy, is not conveying. |
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices" |
||||
to the extent that it includes a convenient and prominently visible |
||||
feature that (1) displays an appropriate copyright notice, and (2) |
||||
tells the user that there is no warranty for the work (except to the |
||||
extent that warranties are provided), that licensees may convey the |
||||
work under this License, and how to view a copy of this License. If |
||||
the interface presents a list of user commands or options, such as a |
||||
menu, a prominent item in the list meets this criterion. |
||||
|
||||
1. Source Code. |
||||
|
||||
The "source code" for a work means the preferred form of the work |
||||
for making modifications to it. "Object code" means any non-source |
||||
form of a work. |
||||
|
||||
A "Standard Interface" means an interface that either is an official |
||||
standard defined by a recognized standards body, or, in the case of |
||||
interfaces specified for a particular programming language, one that |
||||
is widely used among developers working in that language. |
||||
|
||||
The "System Libraries" of an executable work include anything, other |
||||
than the work as a whole, that (a) is included in the normal form of |
||||
packaging a Major Component, but which is not part of that Major |
||||
Component, and (b) serves only to enable use of the work with that |
||||
Major Component, or to implement a Standard Interface for which an |
||||
implementation is available to the public in source code form. A |
||||
"Major Component", in this context, means a major essential component |
||||
(kernel, window system, and so on) of the specific operating system |
||||
(if any) on which the executable work runs, or a compiler used to |
||||
produce the work, or an object code interpreter used to run it. |
||||
|
||||
The "Corresponding Source" for a work in object code form means all |
||||
the source code needed to generate, install, and (for an executable |
||||
work) run the object code and to modify the work, including scripts to |
||||
control those activities. However, it does not include the work's |
||||
System Libraries, or general-purpose tools or generally available free |
||||
programs which are used unmodified in performing those activities but |
||||
which are not part of the work. For example, Corresponding Source |
||||
includes interface definition files associated with source files for |
||||
the work, and the source code for shared libraries and dynamically |
||||
linked subprograms that the work is specifically designed to require, |
||||
such as by intimate data communication or control flow between those |
||||
subprograms and other parts of the work. |
||||
|
||||
The Corresponding Source need not include anything that users |
||||
can regenerate automatically from other parts of the Corresponding |
||||
Source. |
||||
|
||||
The Corresponding Source for a work in source code form is that |
||||
same work. |
||||
|
||||
2. Basic Permissions. |
||||
|
||||
All rights granted under this License are granted for the term of |
||||
copyright on the Program, and are irrevocable provided the stated |
||||
conditions are met. This License explicitly affirms your unlimited |
||||
permission to run the unmodified Program. The output from running a |
||||
covered work is covered by this License only if the output, given its |
||||
content, constitutes a covered work. This License acknowledges your |
||||
rights of fair use or other equivalent, as provided by copyright law. |
||||
|
||||
You may make, run and propagate covered works that you do not |
||||
convey, without conditions so long as your license otherwise remains |
||||
in force. You may convey covered works to others for the sole purpose |
||||
of having them make modifications exclusively for you, or provide you |
||||
with facilities for running those works, provided that you comply with |
||||
the terms of this License in conveying all material for which you do |
||||
not control copyright. Those thus making or running the covered works |
||||
for you must do so exclusively on your behalf, under your direction |
||||
and control, on terms that prohibit them from making any copies of |
||||
your copyrighted material outside their relationship with you. |
||||
|
||||
Conveying under any other circumstances is permitted solely under |
||||
the conditions stated below. Sublicensing is not allowed; section 10 |
||||
makes it unnecessary. |
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law. |
||||
|
||||
No covered work shall be deemed part of an effective technological |
||||
measure under any applicable law fulfilling obligations under article |
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or |
||||
similar laws prohibiting or restricting circumvention of such |
||||
measures. |
||||
|
||||
When you convey a covered work, you waive any legal power to forbid |
||||
circumvention of technological measures to the extent such circumvention |
||||
is effected by exercising rights under this License with respect to |
||||
the covered work, and you disclaim any intention to limit operation or |
||||
modification of the work as a means of enforcing, against the work's |
||||
users, your or third parties' legal rights to forbid circumvention of |
||||
technological measures. |
||||
|
||||
4. Conveying Verbatim Copies. |
||||
|
||||
You may convey verbatim copies of the Program's source code as you |
||||
receive it, in any medium, provided that you conspicuously and |
||||
appropriately publish on each copy an appropriate copyright notice; |
||||
keep intact all notices stating that this License and any |
||||
non-permissive terms added in accord with section 7 apply to the code; |
||||
keep intact all notices of the absence of any warranty; and give all |
||||
recipients a copy of this License along with the Program. |
||||
|
||||
You may charge any price or no price for each copy that you convey, |
||||
and you may offer support or warranty protection for a fee. |
||||
|
||||
5. Conveying Modified Source Versions. |
||||
|
||||
You may convey a work based on the Program, or the modifications to |
||||
produce it from the Program, in the form of source code under the |
||||
terms of section 4, provided that you also meet all of these conditions: |
||||
|
||||
a) The work must carry prominent notices stating that you modified |
||||
it, and giving a relevant date. |
||||
|
||||
b) The work must carry prominent notices stating that it is |
||||
released under this License and any conditions added under section |
||||
7. This requirement modifies the requirement in section 4 to |
||||
"keep intact all notices". |
||||
|
||||
c) You must license the entire work, as a whole, under this |
||||
License to anyone who comes into possession of a copy. This |
||||
License will therefore apply, along with any applicable section 7 |
||||
additional terms, to the whole of the work, and all its parts, |
||||
regardless of how they are packaged. This License gives no |
||||
permission to license the work in any other way, but it does not |
||||
invalidate such permission if you have separately received it. |
||||
|
||||
d) If the work has interactive user interfaces, each must display |
||||
Appropriate Legal Notices; however, if the Program has interactive |
||||
interfaces that do not display Appropriate Legal Notices, your |
||||
work need not make them do so. |
||||
|
||||
A compilation of a covered work with other separate and independent |
||||
works, which are not by their nature extensions of the covered work, |
||||
and which are not combined with it such as to form a larger program, |
||||
in or on a volume of a storage or distribution medium, is called an |
||||
"aggregate" if the compilation and its resulting copyright are not |
||||
used to limit the access or legal rights of the compilation's users |
||||
beyond what the individual works permit. Inclusion of a covered work |
||||
in an aggregate does not cause this License to apply to the other |
||||
parts of the aggregate. |
||||
|
||||
6. Conveying Non-Source Forms. |
||||
|
||||
You may convey a covered work in object code form under the terms |
||||
of sections 4 and 5, provided that you also convey the |
||||
machine-readable Corresponding Source under the terms of this License, |
||||
in one of these ways: |
||||
|
||||
a) Convey the object code in, or embodied in, a physical product |
||||
(including a physical distribution medium), accompanied by the |
||||
Corresponding Source fixed on a durable physical medium |
||||
customarily used for software interchange. |
||||
|
||||
b) Convey the object code in, or embodied in, a physical product |
||||
(including a physical distribution medium), accompanied by a |
||||
written offer, valid for at least three years and valid for as |
||||
long as you offer spare parts or customer support for that product |
||||
model, to give anyone who possesses the object code either (1) a |
||||
copy of the Corresponding Source for all the software in the |
||||
product that is covered by this License, on a durable physical |
||||
medium customarily used for software interchange, for a price no |
||||
more than your reasonable cost of physically performing this |
||||
conveying of source, or (2) access to copy the |
||||
Corresponding Source from a network server at no charge. |
||||
|
||||
c) Convey individual copies of the object code with a copy of the |
||||
written offer to provide the Corresponding Source. This |
||||
alternative is allowed only occasionally and noncommercially, and |
||||
only if you received the object code with such an offer, in accord |
||||
with subsection 6b. |
||||
|
||||
d) Convey the object code by offering access from a designated |
||||
place (gratis or for a charge), and offer equivalent access to the |
||||
Corresponding Source in the same way through the same place at no |
||||
further charge. You need not require recipients to copy the |
||||
Corresponding Source along with the object code. If the place to |
||||
copy the object code is a network server, the Corresponding Source |
||||
may be on a different server (operated by you or a third party) |
||||
that supports equivalent copying facilities, provided you maintain |
||||
clear directions next to the object code saying where to find the |
||||
Corresponding Source. Regardless of what server hosts the |
||||
Corresponding Source, you remain obligated to ensure that it is |
||||
available for as long as needed to satisfy these requirements. |
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided |
||||
you inform other peers where the object code and Corresponding |
||||
Source of the work are being offered to the general public at no |
||||
charge under subsection 6d. |
||||
|
||||
A separable portion of the object code, whose source code is excluded |
||||
from the Corresponding Source as a System Library, need not be |
||||
included in conveying the object code work. |
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any |
||||
tangible personal property which is normally used for personal, family, |
||||
or household purposes, or (2) anything designed or sold for incorporation |
||||
into a dwelling. In determining whether a product is a consumer product, |
||||
doubtful cases shall be resolved in favor of coverage. For a particular |
||||
product received by a particular user, "normally used" refers to a |
||||
typical or common use of that class of product, regardless of the status |
||||
of the particular user or of the way in which the particular user |
||||
actually uses, or expects or is expected to use, the product. A product |
||||
is a consumer product regardless of whether the product has substantial |
||||
commercial, industrial or non-consumer uses, unless such uses represent |
||||
the only significant mode of use of the product. |
||||
|
||||
"Installation Information" for a User Product means any methods, |
||||
procedures, authorization keys, or other information required to install |
||||
and execute modified versions of a covered work in that User Product from |
||||
a modified version of its Corresponding Source. The information must |
||||
suffice to ensure that the continued functioning of the modified object |
||||
code is in no case prevented or interfered with solely because |
||||
modification has been made. |
||||
|
||||
If you convey an object code work under this section in, or with, or |
||||
specifically for use in, a User Product, and the conveying occurs as |
||||
part of a transaction in which the right of possession and use of the |
||||
User Product is transferred to the recipient in perpetuity or for a |
||||
fixed term (regardless of how the transaction is characterized), the |
||||
Corresponding Source conveyed under this section must be accompanied |
||||
by the Installation Information. But this requirement does not apply |
||||
if neither you nor any third party retains the ability to install |
||||
modified object code on the User Product (for example, the work has |
||||
been installed in ROM). |
||||
|
||||
The requirement to provide Installation Information does not include a |
||||
requirement to continue to provide support service, warranty, or updates |
||||
for a work that has been modified or installed by the recipient, or for |
||||
the User Product in which it has been modified or installed. Access to a |
||||
network may be denied when the modification itself materially and |
||||
adversely affects the operation of the network or violates the rules and |
||||
protocols for communication across the network. |
||||
|
||||
Corresponding Source conveyed, and Installation Information provided, |
||||
in accord with this section must be in a format that is publicly |
||||
documented (and with an implementation available to the public in |
||||
source code form), and must require no special password or key for |
||||
unpacking, reading or copying. |
||||
|
||||
7. Additional Terms. |
||||
|
||||
"Additional permissions" are terms that supplement the terms of this |
||||
License by making exceptions from one or more of its conditions. |
||||
Additional permissions that are applicable to the entire Program shall |
||||
be treated as though they were included in this License, to the extent |
||||
that they are valid under applicable law. If additional permissions |
||||
apply only to part of the Program, that part may be used separately |
||||
under those permissions, but the entire Program remains governed by |
||||
this License without regard to the additional permissions. |
||||
|
||||
When you convey a copy of a covered work, you may at your option |
||||
remove any additional permissions from that copy, or from any part of |
||||
it. (Additional permissions may be written to require their own |
||||
removal in certain cases when you modify the work.) You may place |
||||
additional permissions on material, added by you to a covered work, |
||||
for which you have or can give appropriate copyright permission. |
||||
|
||||
Notwithstanding any other provision of this License, for material you |
||||
add to a covered work, you may (if authorized by the copyright holders of |
||||
that material) supplement the terms of this License with terms: |
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the |
||||
terms of sections 15 and 16 of this License; or |
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or |
||||
author attributions in that material or in the Appropriate Legal |
||||
Notices displayed by works containing it; or |
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or |
||||
requiring that modified versions of such material be marked in |
||||
reasonable ways as different from the original version; or |
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or |
||||
authors of the material; or |
||||
|
||||
e) Declining to grant rights under trademark law for use of some |
||||
trade names, trademarks, or service marks; or |
||||
|
||||
f) Requiring indemnification of licensors and authors of that |
||||
material by anyone who conveys the material (or modified versions of |
||||
it) with contractual assumptions of liability to the recipient, for |
||||
any liability that these contractual assumptions directly impose on |
||||
those licensors and authors. |
||||
|
||||
All other non-permissive additional terms are considered "further |
||||
restrictions" within the meaning of section 10. If the Program as you |
||||
received it, or any part of it, contains a notice stating that it is |
||||
governed by this License along with a term that is a further |
||||
restriction, you may remove that term. If a license document contains |
||||
a further restriction but permits relicensing or conveying under this |
||||
License, you may add to a covered work material governed by the terms |
||||
of that license document, provided that the further restriction does |
||||
not survive such relicensing or conveying. |
||||
|
||||
If you add terms to a covered work in accord with this section, you |
||||
must place, in the relevant source files, a statement of the |
||||
additional terms that apply to those files, or a notice indicating |
||||
where to find the applicable terms. |
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the |
||||
form of a separately written license, or stated as exceptions; |
||||
the above requirements apply either way. |
||||
|
||||
8. Termination. |
||||
|
||||
You may not propagate or modify a covered work except as expressly |
||||
provided under this License. Any attempt otherwise to propagate or |
||||
modify it is void, and will automatically terminate your rights under |
||||
this License (including any patent licenses granted under the third |
||||
paragraph of section 11). |
||||
|
||||
However, if you cease all violation of this License, then your |
||||
license from a particular copyright holder is reinstated (a) |
||||
provisionally, unless and until the copyright holder explicitly and |
||||
finally terminates your license, and (b) permanently, if the copyright |
||||
holder fails to notify you of the violation by some reasonable means |
||||
prior to 60 days after the cessation. |
||||
|
||||
Moreover, your license from a particular copyright holder is |
||||
reinstated permanently if the copyright holder notifies you of the |
||||
violation by some reasonable means, this is the first time you have |
||||
received notice of violation of this License (for any work) from that |
||||
copyright holder, and you cure the violation prior to 30 days after |
||||
your receipt of the notice. |
||||
|
||||
Termination of your rights under this section does not terminate the |
||||
licenses of parties who have received copies or rights from you under |
||||
this License. If your rights have been terminated and not permanently |
||||
reinstated, you do not qualify to receive new licenses for the same |
||||
material under section 10. |
||||
|
||||
9. Acceptance Not Required for Having Copies. |
||||
|
||||
You are not required to accept this License in order to receive or |
||||
run a copy of the Program. Ancillary propagation of a covered work |
||||
occurring solely as a consequence of using peer-to-peer transmission |
||||
to receive a copy likewise does not require acceptance. However, |
||||
nothing other than this License grants you permission to propagate or |
||||
modify any covered work. These actions infringe copyright if you do |
||||
not accept this License. Therefore, by modifying or propagating a |
||||
covered work, you indicate your acceptance of this License to do so. |
||||
|
||||
10. Automatic Licensing of Downstream Recipients. |
||||
|
||||
Each time you convey a covered work, the recipient automatically |
||||
receives a license from the original licensors, to run, modify and |
||||
propagate that work, subject to this License. You are not responsible |
||||
for enforcing compliance by third parties with this License. |
||||
|
||||
An "entity transaction" is a transaction transferring control of an |
||||
organization, or substantially all assets of one, or subdividing an |
||||
organization, or merging organizations. If propagation of a covered |
||||
work results from an entity transaction, each party to that |
||||
transaction who receives a copy of the work also receives whatever |
||||
licenses to the work the party's predecessor in interest had or could |
||||
give under the previous paragraph, plus a right to possession of the |
||||
Corresponding Source of the work from the predecessor in interest, if |
||||
the predecessor has it or can get it with reasonable efforts. |
||||
|
||||
You may not impose any further restrictions on the exercise of the |
||||
rights granted or affirmed under this License. For example, you may |
||||
not impose a license fee, royalty, or other charge for exercise of |
||||
rights granted under this License, and you may not initiate litigation |
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that |
||||
any patent claim is infringed by making, using, selling, offering for |
||||
sale, or importing the Program or any portion of it. |
||||
|
||||
11. Patents. |
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this |
||||
License of the Program or a work on which the Program is based. The |
||||
work thus licensed is called the contributor's "contributor version". |
||||
|
||||
A contributor's "essential patent claims" are all patent claims |
||||
owned or controlled by the contributor, whether already acquired or |
||||
hereafter acquired, that would be infringed by some manner, permitted |
||||
by this License, of making, using, or selling its contributor version, |
||||
but do not include claims that would be infringed only as a |
||||
consequence of further modification of the contributor version. For |
||||
purposes of this definition, "control" includes the right to grant |
||||
patent sublicenses in a manner consistent with the requirements of |
||||
this License. |
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free |
||||
patent license under the contributor's essential patent claims, to |
||||
make, use, sell, offer for sale, import and otherwise run, modify and |
||||
propagate the contents of its contributor version. |
||||
|
||||
In the following three paragraphs, a "patent license" is any express |
||||
agreement or commitment, however denominated, not to enforce a patent |
||||
(such as an express permission to practice a patent or covenant not to |
||||
sue for patent infringement). To "grant" such a patent license to a |
||||
party means to make such an agreement or commitment not to enforce a |
||||
patent against the party. |
||||
|
||||
If you convey a covered work, knowingly relying on a patent license, |
||||
and the Corresponding Source of the work is not available for anyone |
||||
to copy, free of charge and under the terms of this License, through a |
||||
publicly available network server or other readily accessible means, |
||||
then you must either (1) cause the Corresponding Source to be so |
||||
available, or (2) arrange to deprive yourself of the benefit of the |
||||
patent license for this particular work, or (3) arrange, in a manner |
||||
consistent with the requirements of this License, to extend the patent |
||||
license to downstream recipients. "Knowingly relying" means you have |
||||
actual knowledge that, but for the patent license, your conveying the |
||||
covered work in a country, or your recipient's use of the covered work |
||||
in a country, would infringe one or more identifiable patents in that |
||||
country that you have reason to believe are valid. |
||||
|
||||
If, pursuant to or in connection with a single transaction or |
||||
arrangement, you convey, or propagate by procuring conveyance of, a |
||||
covered work, and grant a patent license to some of the parties |
||||
receiving the covered work authorizing them to use, propagate, modify |
||||
or convey a specific copy of the covered work, then the patent license |
||||
you grant is automatically extended to all recipients of the covered |
||||
work and works based on it. |
||||
|
||||
A patent license is "discriminatory" if it does not include within |
||||
the scope of its coverage, prohibits the exercise of, or is |
||||
conditioned on the non-exercise of one or more of the rights that are |
||||
specifically granted under this License. You may not convey a covered |
||||
work if you are a party to an arrangement with a third party that is |
||||
in the business of distributing software, under which you make payment |
||||
to the third party based on the extent of your activity of conveying |
||||
the work, and under which the third party grants, to any of the |
||||
parties who would receive the covered work from you, a discriminatory |
||||
patent license (a) in connection with copies of the covered work |
||||
conveyed by you (or copies made from those copies), or (b) primarily |
||||
for and in connection with specific products or compilations that |
||||
contain the covered work, unless you entered into that arrangement, |
||||
or that patent license was granted, prior to 28 March 2007. |
||||
|
||||
Nothing in this License shall be construed as excluding or limiting |
||||
any implied license or other defenses to infringement that may |
||||
otherwise be available to you under applicable patent law. |
||||
|
||||
12. No Surrender of Others' Freedom. |
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or |
||||
otherwise) that contradict the conditions of this License, they do not |
||||
excuse you from the conditions of this License. If you cannot convey a |
||||
covered work so as to satisfy simultaneously your obligations under this |
||||
License and any other pertinent obligations, then as a consequence you may |
||||
not convey it at all. For example, if you agree to terms that obligate you |
||||
to collect a royalty for further conveying from those to whom you convey |
||||
the Program, the only way you could satisfy both those terms and this |
||||
License would be to refrain entirely from conveying the Program. |
||||
|
||||
13. Use with the GNU Affero General Public License. |
||||
|
||||
Notwithstanding any other provision of this License, you have |
||||
permission to link or combine any covered work with a work licensed |
||||
under version 3 of the GNU Affero General Public License into a single |
||||
combined work, and to convey the resulting work. The terms of this |
||||
License will continue to apply to the part which is the covered work, |
||||
but the special requirements of the GNU Affero General Public License, |
||||
section 13, concerning interaction through a network will apply to the |
||||
combination as such. |
||||
|
||||
14. Revised Versions of this License. |
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of |
||||
the GNU General Public License from time to time. Such new versions will |
||||
be similar in spirit to the present version, but may differ in detail to |
||||
address new problems or concerns. |
||||
|
||||
Each version is given a distinguishing version number. If the |
||||
Program specifies that a certain numbered version of the GNU General |
||||
Public License "or any later version" applies to it, you have the |
||||
option of following the terms and conditions either of that numbered |
||||
version or of any later version published by the Free Software |
||||
Foundation. If the Program does not specify a version number of the |
||||
GNU General Public License, you may choose any version ever published |
||||
by the Free Software Foundation. |
||||
|
||||
If the Program specifies that a proxy can decide which future |
||||
versions of the GNU General Public License can be used, that proxy's |
||||
public statement of acceptance of a version permanently authorizes you |
||||
to choose that version for the Program. |
||||
|
||||
Later license versions may give you additional or different |
||||
permissions. However, no additional obligations are imposed on any |
||||
author or copyright holder as a result of your choosing to follow a |
||||
later version. |
||||
|
||||
15. Disclaimer of Warranty. |
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY |
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT |
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY |
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, |
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM |
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF |
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION. |
||||
|
||||
16. Limitation of Liability. |
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS |
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY |
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE |
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF |
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD |
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), |
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF |
||||
SUCH DAMAGES. |
||||
|
||||
17. Interpretation of Sections 15 and 16. |
||||
|
||||
If the disclaimer of warranty and limitation of liability provided |
||||
above cannot be given local legal effect according to their terms, |
||||
reviewing courts shall apply local law that most closely approximates |
||||
an absolute waiver of all civil liability in connection with the |
||||
Program, unless a warranty or assumption of liability accompanies a |
||||
copy of the Program in return for a fee. |
||||
|
||||
END OF TERMS AND CONDITIONS |
||||
|
||||
How to Apply These Terms to Your New Programs |
||||
|
||||
If you develop a new program, and you want it to be of the greatest |
||||
possible use to the public, the best way to achieve this is to make it |
||||
free software which everyone can redistribute and change under these terms. |
||||
|
||||
To do so, attach the following notices to the program. It is safest |
||||
to attach them to the start of each source file to most effectively |
||||
state the exclusion of warranty; and each file should have at least |
||||
the "copyright" line and a pointer to where the full notice is found. |
||||
|
||||
<one line to give the program's name and a brief idea of what it does.> |
||||
Copyright (C) <year> <name of author> |
||||
|
||||
This program is free software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
|
||||
Also add information on how to contact you by electronic and paper mail. |
||||
|
||||
If the program does terminal interaction, make it output a short |
||||
notice like this when it starts in an interactive mode: |
||||
|
||||
<program> Copyright (C) <year> <name of author> |
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
||||
This is free software, and you are welcome to redistribute it |
||||
under certain conditions; type `show c' for details. |
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate |
||||
parts of the General Public License. Of course, your program's commands |
||||
might be different; for a GUI interface, you would use an "about box". |
||||
|
||||
You should also get your employer (if you work as a programmer) or school, |
||||
if any, to sign a "copyright disclaimer" for the program, if necessary. |
||||
For more information on this, and how to apply and follow the GNU GPL, see |
||||
<http://www.gnu.org/licenses/>. |
||||
|
||||
The GNU General Public License does not permit incorporating your program |
||||
into proprietary programs. If your program is a subroutine library, you |
||||
may consider it more useful to permit linking proprietary applications with |
||||
the library. If this is what you want to do, use the GNU Lesser General |
||||
Public License instead of this License. But first, please read |
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>. |
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
<html> |
||||
<head> |
||||
<title>Turkey Cooking Simulator</title> |
||||
<style type="text/css"> |
||||
</style> |
||||
</head> |
||||
<body bgcolor="#250c00"> |
||||
|
||||
<center> |
||||
<div class="canvasContainer"> |
||||
<canvas id="demoCanvas" width="800" height="600" style="border:1px solid #000000"></canvas> |
||||
</div> |
||||
</center> |
||||
</body> |
||||
<script src="//code.createjs.com/createjs-2013.09.25.min.js"></script> |
||||
<script src="js/model.js"></script> |
||||
<script src="js/soundmanager.js"></script> |
||||
<script src="js/stories.js"></script> |
||||
<script src="js/dialogue.js"></script> |
||||
<script src="js/ui.js"></script> |
||||
<script src="js/screens.js"></script> |
||||
<script src="js/main.js"></script> |
||||
<script> |
||||
new GameState(); |
||||
</script> |
||||
<!-- Load all the things! --> |
||||
</html> |
@ -0,0 +1,230 @@
@@ -0,0 +1,230 @@
|
||||
function DialogueSequence( sequence ){ |
||||
|
||||
var targetStory = story[sequence] ? story[sequence].slice(0) : ( messages[sequence] ? messages[sequence].slice(0) : [] ); |
||||
|
||||
return { |
||||
next: function(){ |
||||
return targetStory.shift().split(": "); |
||||
}, |
||||
more: function(){ |
||||
return targetStory.length > 0; |
||||
} |
||||
} |
||||
} |
||||
|
||||
function DialogUI( stage, gameState ){ |
||||
var that = this; |
||||
// Dialog States
|
||||
var DIALOG_RECEDING = 0; |
||||
var DIALOG_SHOWING = 1; |
||||
var DIALOG_PAUSING = 2; |
||||
var MILLIS_PER_CHAR = 100; |
||||
|
||||
var peopleImg = { |
||||
"Boyfriend": new createjs.Bitmap("res/people/Boyfriend.png"), |
||||
"Brother": new createjs.Bitmap("res/people/Brother.png"), |
||||
"Cat": new createjs.Bitmap("res/people/Cat.png"), |
||||
"Dad": new createjs.Bitmap("res/people/Dad.png"), |
||||
"Girlfriend": new createjs.Bitmap("res/people/Girlfriend.png"), |
||||
"Grandma": new createjs.Bitmap("res/people/Grandma.png"), |
||||
"Grandpa": new createjs.Bitmap("res/people/Grandpa.png"), |
||||
"Mom": new createjs.Bitmap("res/people/Mom.png"), |
||||
"Female": new createjs.Bitmap("res/people/PlayerFemale.png"), |
||||
"Male": new createjs.Bitmap("res/people/PlayerMale.png"), |
||||
"Turkey": new createjs.Bitmap("res/people/TurkeyGhost.png") |
||||
}; |
||||
|
||||
var dialogueList = Object.keys(story); |
||||
|
||||
this.dialogSpeed = 30; |
||||
this.dialogState = DIALOG_PAUSING; |
||||
|
||||
this.dialogMotionQueue = [DIALOG_RECEDING]; |
||||
this.currDialogueSeq = new DialogueSequence("Null"); |
||||
dialogQueue = []; |
||||
|
||||
this.dialogBox = new createjs.Bitmap("res/screens/GUI/DialogueBox.png"); |
||||
this.dialogBox.x = 0; |
||||
this.dialogBox.y = 250; |
||||
|
||||
this.currentFace = peopleImg["Male"]; |
||||
this.currentFace.x = 0; |
||||
|
||||
this.textContent = new createjs.Text( "", "24px Arial", "black" ); |
||||
this.textContent.x = 205; |
||||
this.textContent.y = 705; |
||||
this.textContent.lineWidth = 565; |
||||
this.textContent.lineHeight = 30; |
||||
this.textContent.textBaseline = "alphabetic"; |
||||
|
||||
this.dialogBox.addEventListener( "mouseover", function(){ document.body.style.cursor='pointer'; } ); |
||||
this.dialogBox.addEventListener( "mouseout", function(){ document.body.style.cursor='default'; } ); |
||||
this.dialogBox.addEventListener( "click", function(){ setTimeout( clickEvent, 100); }); |
||||
|
||||
this.textContent.addEventListener( "mouseover", function(){ document.body.style.cursor='pointer'; } ); |
||||
this.textContent.addEventListener( "mouseout", function(){ document.body.style.cursor='default'; } ); |
||||
this.textContent.addEventListener( "click", function(){ setTimeout( clickEvent, 100); }); |
||||
|
||||
// negate double setTimeout if clicked
|
||||
var oldTime = new Date().getTime(); |
||||
var delayCounter = 0; |
||||
|
||||
this.endFunc = function(){}; |
||||
|
||||
this.showDialog= function( textSeq ){ |
||||
if(DEBUG) console.log("showing"+ textSeq); |
||||
if( !peopleImg["Me"] ){ |
||||
peopleImg["Me"] = peopleImg[gameState.gender]; |
||||
} |
||||
|
||||
if( !peopleImg["Spouse"] ){ |
||||
if( gameState.gender == "Male" ){ |
||||
peopleImg["Spouse"] = peopleImg["Girlfriend"] ; |
||||
}else{ |
||||
peopleImg["Spouse"] = peopleImg["Boyfriend"] ; |
||||
} |
||||
} |
||||
|
||||
if( textSeq.seq == "custom" ){ |
||||
messages["custom"] = ["Me: " + textSeq.customText ]; |
||||
} |
||||
|
||||
|
||||
if( textSeq.random ){ |
||||
that.showRandomConvo(); |
||||
return; |
||||
} |
||||
delayCounter = 0; |
||||
oldTime = new Date().getTime(); |
||||
that.currDialogueSeq = new DialogueSequence( textSeq.seq ); |
||||
var nextDialogue = that.currDialogueSeq.next(); |
||||
|
||||
that.endFunc = textSeq.endFunc || function(){}; |
||||
|
||||
that.textContent.text=nextDialogue[1].replace(/\[GenderPronoun\]/g, gameState.pronoun ).replace(/\[Player\]/g, gameState.name || "Sam" ); |
||||
|
||||
that.currentFace.y = 250; |
||||
that.currentFace = peopleImg[nextDialogue[0]] || that.currentFace; |
||||
that.autoAdvance = textSeq.autoAdvance; |
||||
that.dialogMotionQueue = [DIALOG_SHOWING]; |
||||
} |
||||
|
||||
this.showRandomConvo = function(){ |
||||
// No more stories, thanks for playing
|
||||
if( dialogueList.length == 0 ) return; |
||||
|
||||
dialogueList = Object.keys(story); |
||||
var randomKey = UtilityFunctions.randRange(0, dialogueList.length); |
||||
|
||||
// check if there is something going on
|
||||
if( !that.currDialogueSeq.more() ){ |
||||
if(DEBUG) console.log("random story"); |
||||
this.showDialog( {seq: dialogueList[ randomKey ] || "Dad Tells a bad Joke", autoAdvance:true } ); |
||||
delete story[ dialogueList[ randomKey ] ]; |
||||
gameState.dialogueHeard++; |
||||
} |
||||
} |
||||
|
||||
gameState.pubsub.subscribe( "ShowDialog", this.showDialog ); |
||||
|
||||
var clickEvent = function( timer ){ |
||||
|
||||
if( !peopleImg["Me"] ){ |
||||
peopleImg["Me"] = peopleImg[gameState.gender]; |
||||
} |
||||
|
||||
// if there is more dialogue text, then keep going, otherwise, recede
|
||||
if( that.currDialogueSeq.more() ){ |
||||
var nextDialogue = that.currDialogueSeq.next(); |
||||
|
||||
that.dialogMotionQueue.push(DIALOG_SHOWING); |
||||
that.textContent.text=nextDialogue[1].replace(/\[GenderPronoun\]/g, gameState.pronoun ).replace(/\[Player\]/g, gameState.name || "Sam" ); |
||||
if(DEBUG) console.log("showing face:" +nextDialogue[0] ); |
||||
|
||||
// swap out face immediately
|
||||
that.currentFace.y = 250; |
||||
that.currentFace = peopleImg[nextDialogue[0]] || that.currentFace; |
||||
that.currentFace.y = 0; |
||||
}else{ |
||||
// pause and close dialog
|
||||
setTimeout( function(){ |
||||
that.dialogMotionQueue.push(DIALOG_RECEDING); |
||||
if( that.endFunc ) |
||||
that.endFunc(); |
||||
}, 250 ); |
||||
} |
||||
delayCounter = 0; |
||||
oldTime = new Date().getTime(); |
||||
} |
||||
|
||||
stage.addChild( this.dialogBox ); |
||||
stage.addChild( this.textContent ); |
||||
|
||||
for(var i in peopleImg ){ |
||||
peopleImg[i].alpha = 1; |
||||
peopleImg[i].y = 250; |
||||
stage.addChild( peopleImg[i] ); |
||||
} |
||||
|
||||
return { |
||||
tick: function(){ |
||||
|
||||
if( that.autoAdvance == true && that.dialogBox.y ==0 && delayCounter > ( (that.textContent.text.length * MILLIS_PER_CHAR) < 2000 ? 2000 : (that.textContent.text.length * MILLIS_PER_CHAR) ) ){ |
||||
clickEvent(); |
||||
} |
||||
|
||||
if( that.dialogState == DIALOG_RECEDING ){ |
||||
that.dialogBox.y+=that.dialogSpeed; |
||||
that.textContent.y += that.dialogSpeed; |
||||
that.currentFace.y += that.dialogSpeed; |
||||
//if(DEBUG) console.log( "Receding" + that.dialogBox.y );
|
||||
} |
||||
if( that.dialogState == DIALOG_SHOWING ){ |
||||
that.dialogBox.y-=that.dialogSpeed; |
||||
that.textContent.y -= that.dialogSpeed; |
||||
that.currentFace.y -= that.dialogSpeed; |
||||
//if(DEBUG) console.log( "Advancing" + that.dialogBox.y );
|
||||
} |
||||
|
||||
// toggle states
|
||||
if( that.dialogBox.y > 250 && that.dialogState == DIALOG_RECEDING ){ |
||||
that.dialogBox.y = 250; |
||||
that.textContent.y = 735; |
||||
that.currentFace.y = 250; |
||||
that.dialogState = DIALOG_PAUSING; |
||||
//if(DEBUG) console.log( "Pausing on recede" + that.dialogBox.y );
|
||||
|
||||
} |
||||
if( that.dialogBox.y < 0 && that.dialogState == DIALOG_SHOWING ){ |
||||
that.dialogBox.y = 0; |
||||
that.textContent.y = 480; |
||||
that.currentFace.y = 0; |
||||
that.dialogState = DIALOG_PAUSING; |
||||
//if(DEBUG) console.log( "Pausing on showing" + that.dialogBox.y );
|
||||
} |
||||
|
||||
/* next states if there are any on the queue */ |
||||
if( that.dialogMotionQueue.length > 0 && that.dialogState == DIALOG_PAUSING ){ |
||||
that.dialogState = that.dialogMotionQueue.shift(); |
||||
} |
||||
delayCounter = new Date().getTime() - oldTime; |
||||
}, |
||||
|
||||
minDialog: function(){ |
||||
that.dialogMotionQueue.push( DIALOG_RECEDING ); |
||||
}, |
||||
|
||||
maxDialog: function(){ |
||||
that.dialogMotionQueue.push( DIALOG_SHOWING ); |
||||
}, |
||||
render: function(){ |
||||
stage.addChild( that.dialogBox ); |
||||
stage.addChild( that.textContent ); |
||||
|
||||
for(var i in peopleImg ){ |
||||
peopleImg[i].alpha = 1; |
||||
stage.addChild( peopleImg[i] ); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,485 @@
@@ -0,0 +1,485 @@
|
||||
// Robert- Here be dragons
|
||||
|
||||
var DEBUG = 1; |
||||
|
||||
function GameState(){ |
||||
var that = this; |
||||
|
||||
this.pubsub = {}; |
||||
BindPubSub( this.pubsub ); |
||||
this.currentTime = Date.now(); //new Date().getTime();
|
||||
this.startTime = Date.now();//new Date().getTime()
|
||||
this.oldTime = Date.now();// new Date().getTime();
|
||||
this.oldDialogueTime = Date.now();//new Date().getTime();
|
||||
|
||||
this.gameStarted = false; |
||||
this.name = ""; |
||||
this.gender = "Male"; |
||||
this.pronoun = "he"; |
||||
this.wallet = 45.00; |
||||
this.hard = false; |
||||
this.boughtOvenLight = false; |
||||
this.turkeyWeight = 8; |
||||
this.peekRecords = []; |
||||
this.turkeyCooking = false; |
||||
this.turkeyType = ""; |
||||
this.alarmTimer = 0; |
||||
this.alarmBought = false; |
||||
this.alarmActivated = false; |
||||
this.turkeyCookCounter = 0; |
||||
|
||||
// stats
|
||||
this.storeVisits = 0; |
||||
this.dialogueHeard = 0; |
||||
this.ovenOpened = 0; |
||||
|
||||
// modifiers
|
||||
this.turkeyTypeModifier = 1; |
||||
this.stuffingTypeModifier = 1; |
||||
this.frillsModifier = 1; |
||||
this.hardcoreModifier = 1; |
||||
|
||||
// Game State flags
|
||||
this.turkeyBought = false; |
||||
var randomWeight = [ (UtilityFunctions.randRange(10,22)+"."+UtilityFunctions.randRange(10,99)), |
||||
(UtilityFunctions.randRange(10,22)+"."+UtilityFunctions.randRange(10,99)), |
||||
(UtilityFunctions.randRange(10,22)+"."+UtilityFunctions.randRange(10,99)), |
||||
(UtilityFunctions.randRange(10,22)+"."+UtilityFunctions.randRange(10,99)), |
||||
(UtilityFunctions.randRange(10,22)+"."+UtilityFunctions.randRange(10,99)) |
||||
]; |
||||
|
||||
// Load all our resources:
|
||||
var queue = new createjs.LoadQueue(true); |
||||
queue.addEventListener("progress", function(event){ |
||||
that.pubsub.publish("Load", (event.progress*100/25)); |
||||
}); |
||||
|
||||
that.mainUI = new GameUI( "demoCanvas", that ); |
||||
createjs.Ticker.addEventListener( "tick", gameLoop ); |
||||
queue.addEventListener("complete", function(event){ |
||||
// Finished loading
|
||||
}); |
||||
queue.installPlugin(createjs.Sound); |
||||
|
||||
//
|
||||
queue.loadFile( {id: "DialogueBoxFile", src:"res/screens/GUI/DialogueBox.png"} ); |
||||
/*queue.loadFile( {id:"res/screens/LoadingScreen/Turkey0.png", src: "res/screens/LoadingScreen/Turkey0.png"} ); |
||||
queue.loadFile( {id:"res/screens/LoadingScreen/Turkey25.png", src: "res/screens/LoadingScreen/Turkey25.png"} ); |
||||
queue.loadFile( {id:"res/screens/LoadingScreen/Turkey50.png", src: "res/screens/LoadingScreen/Turkey50.png"} ); |
||||
queue.loadFile( {id:"res/screens/LoadingScreen/Turkey75.png", src: "res/screens/LoadingScreen/Turkey75.png"} ); |
||||
queue.loadFile( {id:"res/screens/LoadingScreen/TurkeyDone.png", src: "res/screens/LoadingScreen/TurkeyDone.png"} );*/ |
||||
|
||||
// Screens
|
||||
queue.loadFile( {id: "res/screens/DifficultyScreen/Difficulty-Selection.png", src:"res/screens/DifficultyScreen/Difficulty-Selection.png"} ); |
||||
queue.loadFile( {id: "res/screens/DifficultyScreen/ButtonsandText.png", src:"res/screens/DifficultyScreen/ButtonsandText.png"} ); |
||||
queue.loadFile( {id: "res/screens/DifficultyScreen/ButtonMale.png", src:"res/screens/DifficultyScreen/ButtonMale.png"} ); |
||||
queue.loadFile( {id: "res/screens/DifficultyScreen/ButtonFemale.png", src:"res/screens/DifficultyScreen/ButtonFemale.png"} ); |
||||
|
||||
// Load image assets
|
||||
queue.loadFile( {id: "TurkeySpriteFile", src:"res/screens/MainScreen/TurkeySprite.png"} ); |
||||
queue.loadFile( {id: "MainBackgroundFile", src:"res/screens/MainScreen/Main-Screen.png"} ); |
||||
queue.loadFile( {id: "OverlayGrassFile", src:"res/screens/MainScreen/Grass.png"} ); |
||||
queue.loadFile( {id: "StartButtonFile", src:"res/screens/MainScreen/ButtonStart.png"} ); |
||||
queue.loadFile( {id: "HelpButtonFile", src:"res/screens/MainScreen/ButtonHelp.png"} ); |
||||
queue.loadFile( {id: "CreditsButtonFile", src:"res/screens/MainScreen/ButtonCredits.png"} ); |
||||
|
||||
queue.loadFile( {id: "CreditsScreenFile", src:"res/screens/HelpCreditsScreen/Credits.png" } ); |
||||
queue.loadFile( {id: "HelpP1P2", src:"res/screens/HelpCreditsScreen/HelpP1P2.png" } ); |
||||
queue.loadFile( {id: "HelpP3P4", src:"res/screens/HelpCreditsScreen/HelpP3P4.png" } ); |
||||
queue.loadFile( {id: "HelpP5P6", src:"res/screens/HelpCreditsScreen/HelpP5P6.png" } ); |
||||
queue.loadFile( {id: "HelpP7P8", src:"res/screens/HelpCreditsScreen/HelpP7P8.png" } ); |
||||
queue.loadFile( {id: "HelpP9P10", src:"res/screens/HelpCreditsScreen/HelpP9P10.png" } ); |
||||
|
||||
|
||||
queue.loadFile( {id: "ScoreScreenFile", src:"res/screens/ScoreScreen/Score-Evaluation-1.png" } ); |
||||
queue.loadFile( {id: "ScoreScreenFile", src:"res/screens/ScoreScreen/Score-Evaluation-2.png" } ); |
||||
|
||||
queue.loadFile( {id: "MarketScreenfile", src:"res/screens/MarketScreen/MarketScreen.png"} ); |
||||
|
||||
// Load sound assets
|
||||
queue.loadFile( {id: "TitleMusicFile", src:"res/sound/turkey_in_the_straw.mp3"} ); |
||||
queue.loadFile( {id: "MarketSoundFile", src:"res/sound/Store/Waterford.mp3"} ); |
||||
|
||||
// UI sounds
|
||||
queue.loadFile( {id: "UIClickFile", src:"res/sound/GUI/click.mp3"} ); |
||||
queue.loadFile( {id: "UIBuzzFile", src:"res/sound/GUI/buzz.mp3"} ); |
||||
queue.loadFile( {id: "UIDingFile", src:"res/sound/GUI/ding.mp3"} ); |
||||
|
||||
// Kitchen Items
|
||||
queue.loadFile( {id: "res/screens/KitchenScreen/KitchenScreen.png", src:"res/screens/KitchenScreen/KitchenScreen.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/FinalConfirmation.png", src:"res/screens/KitchenScreen/FinalConfirmation.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/TurkeyState1Small.png", src:"res/screens/KitchenScreen/TurkeyState1Small.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/TurkeyState2Small.png", src:"res/screens/KitchenScreen/TurkeyState2Small.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/TurkeyState3Small.png", src:"res/screens/KitchenScreen/TurkeyState3Small.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/TurkeyState4Small.png", src:"res/screens/KitchenScreen/TurkeyState4Small.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/TurkeyState5Small.png", src:"res/screens/KitchenScreen/TurkeyState5Small.png"}); |
||||
|
||||
queue.loadFile( {id: "res/screens/KitchenScreen/CookbookKitchenGlow.png", src:"res/screens/KitchenScreen/CookbookKitchenGlow.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/CookbookKitchen.png", src:"res/screens/KitchenScreen/CookbookKitchen.png"}); |
||||
|
||||
queue.loadFile( {id: "res/screens/KitchenScreen/AlarmKitchenGlow.png", src:"res/screens/KitchenScreen/AlarmKitchenGlow.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/AlarmKitchen.png", src:"res/screens/KitchenScreen/AlarmKitchen.png"}); |
||||
|
||||
queue.loadFile( {id: "res/screens/KitchenScreen/TempProbeKitchenGlow.png", src:"res/screens/KitchenScreen/TempProbeKitchenGlow.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/TempProbeKitchen.png", src:"res/screens/KitchenScreen/TempProbeKitchen.png"}); |
||||
|
||||
queue.loadFile( {id: "res/screens/KitchenScreen/StuffingSpecialKitchenGlow.png", src:"res/screens/KitchenScreen/StuffingSpecialKitchenGlow.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/StuffingSpecialKitchen.png", src:"res/screens/KitchenScreen/StuffingSpecialKitchen.png"}); |
||||
|
||||
queue.loadFile( {id: "res/screens/KitchenScreen/StuffingRepurposedKitchenGlow.png", src:"res/screens/KitchenScreen/StuffingRepurposedKitchenGlow.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/StuffingRepurposedKitchen.png", src:"res/screens/KitchenScreen/StuffingRepurposedKitchen.png"}); |
||||
|
||||
queue.loadFile( {id: "res/screens/KitchenScreen/StuffingExquisiteKitchenGlow.png", src:"res/screens/KitchenScreen/StuffingExquisiteKitchenGlow.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/StuffingExquisiteKitchen.png", src:"res/screens/KitchenScreen/StuffingExquisiteKitchen.png"}); |
||||
|
||||
queue.loadFile( {id: "res/screens/KitchenScreen/StoreBrochureGlow.png", src:"res/screens/KitchenScreen/StoreBrochureGlow.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/StoreBrochure.png", src:"res/screens/KitchenScreen/StoreBrochure.png"}); |
||||
|
||||
queue.loadFile( {id: "res/screens/KitchenScreen/FrillsBoxKitchenGlow.png", src:"res/screens/KitchenScreen/FrillsBoxKitchenGlow.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/FrillsBoxKitchen.png", src:"res/screens/KitchenScreen/FrillsBoxKitchen.png"}); |
||||
|
||||
queue.loadFile( {id: "res/screens/KitchenScreen/DoorPeekLightOn.png", src:"res/screens/KitchenScreen/DoorPeekLightOn.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/DoorPeekLightOff.png", src:"res/screens/KitchenScreen/DoorPeekLightOff.png"}); |
||||
|
||||
queue.loadFile( {id: "res/screens/KitchenScreen/DoorOpen.png", src:"res/screens/KitchenScreen/DoorOpen.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/DoorClosedLightOn.png", src:"res/screens/KitchenScreen/DoorClosedLightOn.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/DoorClosedLightOff.png", src:"res/screens/KitchenScreen/DoorClosedLightOff.png"}); |
||||
|
||||
queue.loadFile( {id: "res/screens/KitchenScreen/PanFront.png", src:"res/screens/KitchenScreen/PanFront.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/OvenTurnRedState.png", src:"res/screens/KitchenScreen/OvenTurnRedState.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/LightButtonDepressed.png", src:"res/screens/KitchenScreen/LightButtonDepressed.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/Cookbook-Open.png", src:"res/screens/KitchenScreen/Cookbook-Open.png"}); |
||||
queue.loadFile( {id: "res/screens/KitchenScreen/Explosion_AnimationLowRes.png", src:"res/screens/KitchenScreen/Explosion_AnimationLowRes.png"}); |
||||
|
||||
|
||||
// Kitchen Sounds
|
||||
queue.loadFile( {id: "res/sound/Kitchen/Oven_Door_Full_Open.mp3", src:"res/sound/Kitchen/Oven_Door_Full_Open.mp3"}); |
||||
queue.loadFile( {id: "res/sound/Kitchen/Oven_Door_Full_Close.mp3", src:"res/sound/Kitchen/Oven_Door_Full_Close.mp3"}); |
||||
queue.loadFile( {id: "res/sound/Kitchen/Oven_Door_Peek_Close.mp3", src:"res/sound/Kitchen/Oven_Door_Peek_Close.mp3"}); |
||||
queue.loadFile( {id: "res/sound/Kitchen/Oven_Door_Peek_Open.mp3", src:"res/sound/Kitchen/Oven_Door_Peek_Open.mp3"}); |
||||
queue.loadFile( {id: "res/sound/Kitchen/Close_Cookbook.mp3", src:"res/sound/Kitchen/Close_Cookbook.mp3"}); |
||||
queue.loadFile( {id: "res/sound/Kitchen/Open_Cookbook.mp3", src:"res/sound/Kitchen/Open_Cookbook.mp3"}); |
||||
queue.loadFile( {id: "res/sound/Kitchen/Explosion_Sound.mp3", src:"res/sound/Kitchen/Explosion_Sound.mp3"} ); |
||||
queue.loadFile( {id: "res/sound/Kitchen/Double_Beep.mp3", src:"res/sound/Kitchen/Double_Beep.mp3"} ); |
||||
|
||||
// Market Items
|
||||
queue.loadFile( {id: "res/screens/MarketScreen/MarketTopShelf.png", src:"res/screens/MarketScreen/MarketTopShelf.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/Clipboard.png", src:"res/items/Clipboard.png"}); |
||||
queue.loadFile( {id: "res/items/Wallet.png", src:"res/items/Wallet.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/FrillsBox.png", src:"res/items/ExitSign.png"}); |
||||
queue.loadFile( {id: "res/items/FrillsBoxGlow.png", src:"res/items/ExitGlow.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/FrillsBox.png", src:"res/items/FrillsBox.png"}); |
||||
queue.loadFile( {id: "res/items/FrillsBoxGlow.png", src:"res/items/FrillsBoxGlow.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/TempProbe.png", src:"res/items/TempProbe.png"}); |
||||
queue.loadFile( {id: "res/items/TempProbeGlow.png", src:"res/items/TempProbeGlow.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/OvenLightBox.png", src:"res/items/OvenLightBox.png"}); |
||||
queue.loadFile( {id: "res/items/OvenLightBoxGlow.png", src:"res/items/OvenLightBoxGlow.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/Alarm.png", src:"res/items/Alarm.png"}); |
||||
queue.loadFile( {id: "res/items/AlarmGlow.png", src:"res/items/AlarmGlow.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/Cookbook1.png", src:"res/items/Cookbook1.png"}); |
||||
queue.loadFile( {id: "res/items/Cookbook1Glow.png", src:"res/items/Cookbook1Glow.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/StuffingRepurposed.png", src:"res/items/StuffingRepurposed.png"}); |
||||
queue.loadFile( {id: "res/items/StuffingRepurposedGlow.png", src:"res/items/StuffingRepurposedGlow.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/StuffingExquisite.png", src:"res/items/StuffingExquisite.png"}); |
||||
queue.loadFile( {id: "res/items/StuffingExquisiteGlow.png", src:"res/items/StuffingExquisiteGlow.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/StuffingSpecial.png", src:"res/items/StuffingSpecial.png"}); |
||||
queue.loadFile( {id: "res/items/StuffingSpecialGlow.png", src:"res/items/StuffingSpecialGlow.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/Turkey5.png", src:"res/items/Turkey5.png"}); |
||||
queue.loadFile( {id: "res/items/Turkey5Glow.png", src:"res/items/Turkey5Glow.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/Turkey4.png", src:"res/items/Turkey4.png"}); |
||||
queue.loadFile( {id: "res/items/Turkey4Glow.png", src:"res/items/Turkey4Glow.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/Turkey3.png", src:"res/items/Turkey3.png"}); |
||||
queue.loadFile( {id: "res/items/Turkey3Glow.png", src:"res/items/Turkey3Glow.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/Turkey2.png", src:"res/items/Turkey2.png"}); |
||||
queue.loadFile( {id: "res/items/Turkey2Glow.png", src:"res/items/Turkey2Glow.png"}); |
||||
|
||||
queue.loadFile( {id: "res/items/Turkey1.png", src:"res/items/Turkey1.png"}); |
||||
queue.loadFile( {id: "res/items/Turkey1Glow.png", src:"res/items/Turkey1Glow.png"}); |
||||
|
||||
// People photos
|
||||
queue.loadFile( {id: "res/people/Boyfriend.png", src:"res/people/Boyfriend.png"}); |
||||
queue.loadFile( {id: "res/people/Brother.png", src:"res/people/Brother.png"}); |
||||
queue.loadFile( {id: "res/people/Cat.png", src:"res/people/Cat.png"}); |
||||
queue.loadFile( {id: "res/people/Dad.png", src:"res/people/Dad.png"}); |
||||
queue.loadFile( {id: "res/people/Girlfriend.png", src:"res/people/Girlfriend.png"}); |
||||
queue.loadFile( {id: "res/people/Grandma.png", src:"res/people/Grandma.png"}); |
||||
queue.loadFile( {id: "res/people/Grandpa.png", src:"res/people/Grandpa.png"}); |
||||
queue.loadFile( {id: "res/people/Mom.png", src:"res/people/Mom.png"}); |
||||
queue.loadFile( {id: "res/people/PlayerFemale.png", src:"res/people/PlayerFemale.png"}); |
||||
queue.loadFile( {id: "res/people/PlayerMale.png", src:"res/people/PlayerMale.png"}); |
||||
queue.loadFile( {id: "res/people/TurkeyGhost.png", src:"res/people/TurkeyGhost.png"}); |
||||
|
||||
// Load Window elements
|
||||
queue.loadFile( {id: "res/screens/Window/Door1.png", src:"res/screens/Window/Door1.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Door2.png", src:"res/screens/Window/Door2.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Ground.png", src:"res/screens/Window/Ground.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Housefar.png", src:"res/screens/Window/Housefar.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Small1.png", src:"res/screens/Window/Small1.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Small2.png", src:"res/screens/Window/Small2.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Small3.png", src:"res/screens/Window/Small3.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Small4.png", src:"res/screens/Window/Small4.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Small5.png", src:"res/screens/Window/Small5.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/StreetlightGlow.png", src:"res/screens/Window/StreetlightGlow.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Win1.png", src:"res/screens/Window/Win1.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Win2.png", src:"res/screens/Window/Win2.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Win3.png", src:"res/screens/Window/Win3.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Win4.png", src:"res/screens/Window/Win4.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Win5.png", src:"res/screens/Window/Win5.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Win6.png", src:"res/screens/Window/Win6.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Win7.png", src:"res/screens/Window/Win7.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Win8.png", src:"res/screens/Window/Win8.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Win9.png", src:"res/screens/Window/Win9.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Win10.png", src:"res/screens/Window/Win10.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Win11.png", src:"res/screens/Window/Win11.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Tree_Animation.png", src:"res/screens/Window/Tree_Animation.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Test4TransparencyFull.png", src:"res/screens/Window/Test4TransparencyFull.png"}); |
||||
queue.loadFile( {id: "res/screens/Window/Stars.png", src:"res/screens/Window/Stars.png"}); |
||||
|
||||
|
||||
|
||||
this.screenState = 0; |
||||
this.newScreen = ""; |
||||
|
||||
this.marketItems = { |
||||
"Frills Box" : new MarketItem( this, "Frills Box", 133,92, 3.00, "res/items/FrillsBox.png", "res/items/FrillsBoxGlow.png", "res/screens/KitchenScreen/FrillsBoxKitchen.png", "res/screens/KitchenScreen/FrillsBoxKitchenGlow.png", |
||||
"Some people dress up their dogs. Others dress up their house. Why not dress up your turkey?" ), |
||||
|
||||
|
||||
"Temperature Probe" : new MarketItem( this, "Temperature Probe", 200, 57, 9.00, "res/items/TempProbe.png", "res/items/TempProbeGlow.png", "res/screens/KitchenScreen/TempProbeKitchen.png", "res/screens/KitchenScreen/TempProbeKitchenGlow.png", "Ensure your food is cooked with this handy thermometer. Now with easy to read LED display" ), |
||||
"Oven Light in a Box" : new MarketItem( this, "Oven Light in a Box", 131,222, 15.00, "res/items/OvenLightBox.png", "res/items/OvenLightBoxGlow.png", null,null, "This will allow checking on your turkey without letting the heat out." ), |
||||
|
||||
"Alarm Clock" : new MarketItem( this, "Alarm Clock", 173,248, 6.00, "res/items/Alarm.png", "res/items/AlarmGlow.png", "res/screens/KitchenScreen/AlarmKitchen.png", "res/screens/KitchenScreen/AlarmKitchenGlow.png", "Have you ever wanted to control time? Now you can. Digital readout counts down until time of choice. Audible alarm" ), |
||||
"Cookbook" : new MarketItem( this, "Cookbook", 283,203, 3.00, "res/items/Cookbook1.png", "res/items/Cookbook1Glow.png","res/screens/KitchenScreen/CookbookKitchen.png", "res/screens/KitchenScreen/CookbookKitchenGlow.png", "How do I cook turkey? Handy note space included for writing down temperature measurements" ), |
||||
"Repurposed Stuffing" : new MarketItem( this, "Repurposed Stuffing", 510,197, 2.00, "res/items/StuffingRepurposed.png", "res/items/StuffingRepurposedGlow.png", "res/screens/KitchenScreen/StuffingRepurposedKitchen.png", "res/screens/KitchenScreen/StuffingRepurposedKitchenGlow.png","At least 80% original breadcrumb. Guaranteed to contain no avian products" ), |
||||
"Exquisite Stuffing" : new MarketItem( this, "Exquisite Stuffing", 458,210, 3.00, "res/items/StuffingExquisite.png", "res/items/StuffingExquisiteGlow.png", "res/screens/KitchenScreen/StuffingExquisiteKitchen.png","res/screens/KitchenScreen/StuffingExquisiteKitchenGlow.png", "Colonial merchants once traveled the four reaches of the Earth to bring back the ingredients contained in this very box" ), |
||||
|
||||
"Special Stuffing" : new MarketItem( this, "Special Stuffing", 390,220, 6.00, "res/items/StuffingSpecial.png", "res/items/StuffingSpecialGlow.png", |
||||
"res/screens/KitchenScreen/StuffingSpecialKitchen.png","res/screens/KitchenScreen/StuffingSpecialKitchenGlow.png", |
||||
"Once rated as the most handsome man in the universe. Scott and his patented special stuffing will set you on the path to food heaven" ), |
||||
|
||||
"Organic Turkey" : new MarketItem( this, "Organic Turkey", 180,360, randomWeight[0]*1.2, "res/items/Turkey5.png", "res/items/Turkey5Glow.png",null,null, "All natural. No hormones. No antibiotics. Free Range. Lead Free", parseFloat(randomWeight[0]) ), |
||||
"Free Range Turkey": new MarketItem( this, "Free Range Turkey", 540,320, randomWeight[1]*1.00, "res/items/Turkey4.png", "res/items/Turkey4Glow.png",null,null, "Our turkeys have wide open spaces to roam and are fed with only the highest quality feed.", parseFloat(randomWeight[1]) ), |
||||
"Sunny Farms Turkey" : new MarketItem( this, "Sunny Farms Turkey", 265,415, randomWeight[2]*0.60, "res/items/Turkey3.png", "res/items/Turkey3Glow.png",null,null, "100% Turkey product from Sunny Farms Heavy Industries, Ltd.", parseFloat(randomWeight[2]) ), |
||||
"Pastured Turkey": new MarketItem( this, "Pastured Turkey", 474,357, randomWeight[3]*1.4, "res/items/Turkey2.png", "res/items/Turkey2Glow.png",null,null, "Grassy fields and natural ingredients allow our turkeys to have a better life, and taste great.", parseFloat(randomWeight[3]) ), |
||||
"General Turkey": new MarketItem( this, "General Turkey", 378,426, randomWeight[4]*0.80, "res/items/Turkey1.png", "res/items/Turkey1Glow.png",null,null, "100% General Satisfaction Guaranteed", parseFloat(randomWeight[4]) ) |
||||
}; |
||||
|
||||
// Important Model, dummy placeholder
|
||||
this.ovenModel = { secondTick:function(){}, setRawTemp:function(){}, getRawTemp:function(){}, getCookTime:function(){return 1000;} }; |
||||
|
||||
|
||||
/* all turkeys */ |
||||
this.turkeyStates = [ |
||||
new createjs.Bitmap( "res/screens/KitchenScreen/TurkeyState1Small.png" ), |
||||
new createjs.Bitmap( "res/screens/KitchenScreen/TurkeyState2Small.png" ), |
||||
new createjs.Bitmap( "res/screens/KitchenScreen/TurkeyState3Small.png" ), |
||||
new createjs.Bitmap( "res/screens/KitchenScreen/TurkeyState4Small.png" ), |
||||
new createjs.Bitmap( "res/screens/KitchenScreen/TurkeyState5Small.png" ) |
||||
]; |
||||
|
||||
this.purchasedItems = []; |
||||
|
||||
// did we already show the player the kitchen intro?
|
||||
this.kitchenIntro = false; |
||||
|
||||
this.addRecord = function( record ){ |
||||
that.peekRecords.push( new Record( record.type, that.currentTime, record.text ) ); |
||||
} |
||||
that.pubsub.subscribe( "AddRecord", this.addRecord ); |
||||
|
||||
|
||||
function addHighScore(name, turkeyPoundage, cookTime, score){ |
||||
var scores = {}; |
||||
var now = new Date(); |
||||
if( !localStorage.getItem("highScores") ){ |
||||
scores = JSON.parse( localStorage.getItem("highScores") ); |
||||
} |
||||
|
||||
scores[now.getYear()+"/"+now.getMonth()+"/"+now.getDay()] = { |
||||
"name" : name, |
||||
"weight" : turkeyPoundage, |
||||
"cookTime" : cookTime, |
||||
"score" : score |
||||
}; |
||||
|
||||
localStorage.setItem("highScores", JSON.stringfy(scores)); |
||||
} |
||||
|
||||
function gameLoop(){ |
||||
that.mainUI.draw(); |
||||
} |
||||
|
||||
return { |
||||
// "main": this
|
||||
} |
||||
} |
||||
|
||||
function GameUI( canvasElem, gameState ){ |
||||
var that = this; |
||||
|
||||
var SCREEN_OUT = 1; |
||||
var SCREEN_IN = 2; |
||||
var SCREEN_STABLE = 0; |
||||
|
||||
this.stage = new createjs.Stage( canvasElem ); |
||||
this.stage.enableMouseOver(25); |
||||
|
||||
this.activeScreenName = "EndingScreen"; |
||||
this.activeScreenObj = {}; |
||||
|
||||
/* Initialize All Screens */ |
||||
this.screens = { |
||||
"LoadingScreen" : LoadingScreen, |
||||
"MainScreen" : MainScreen, |
||||
"DifficultyScreen" : DifficultyScreen, |
||||
"KitchenScreen" : KitchenScreen, |
||||
"MarketScreen" : MarketScreen, |
||||
"ScoreScreen" : ScoreScreen, |
||||
"CreditsScreen" : CreditsScreen |
||||
} |
||||
|
||||
var soundManager = new SoundManager( gameState ); |
||||
|
||||
this.activeScreenObj = new LoadingScreen( this.stage, gameState ); |
||||
var textContent = new createjs.Text( "", "20px Arial", "white" ); |
||||
textContent.x = 750; |
||||
textContent.y = 30; |
||||
//this.stage.addChild( textContent);
|
||||
var overlay = new createjs.Shape(); |
||||
overlay.graphics.beginFill("#fffffff").drawRect(0, 0, 800, 600 ); |
||||
overlay.alpha = 0; |
||||
this.stage.addChild(overlay); |
||||
|
||||
var dialogManager = new DialogUI( this.stage, gameState ); |
||||
|
||||
// delay for fade in and fade-out
|
||||
this.switchScreen = function( screenName ){ |
||||
gameState.screenState = SCREEN_OUT; |
||||
dialogManager.minDialog(); |
||||
if(DEBUG) console.log("Switch screen called with" + screenName); |
||||
gameState.newScreen = screenName; |
||||
}; |
||||
this.actuallySwitchScreen = function( screenName ){ |
||||
that.stage.removeAllChildren(); |
||||
that.activeScreenObj = new that.screens[ screenName ]( that.stage, gameState ); |
||||
//that.stage.addChild( textContent );
|
||||
that.stage.addChild( overlay ); |
||||
dialogManager.render(); |
||||
}; |
||||
new HelpUI(this.stage, gameState); |
||||
|
||||
gameState.pubsub.subscribe( "SwitchScreen", this.switchScreen ); |
||||
gameState.pubsub.subscribe( "ActuallySwitchScreen", this.actuallySwitchScreen ); |
||||
|
||||
// Allow items to be removed if they don't have access to stage
|
||||
gameState.pubsub.subscribe( "RemoveItems", function(items){ |
||||
for (var index in items ){ |
||||
that.stage.removeChild(items[index]); |
||||
} |
||||
}); |
||||
|
||||
return { |
||||
draw : function(){ |
||||
if( gameState.screenState == SCREEN_OUT ){ |
||||
overlay.alpha +=0.3; |
||||
} |
||||
if( gameState.screenState == SCREEN_IN ){ |
||||
overlay.alpha -=0.3; |
||||
} |
||||
if( overlay.alpha > 1.0 ){ |
||||
gameState.screenState = SCREEN_IN; |
||||
overlay.alpha = 1; |
||||
gameState.pubsub.publish( "ActuallySwitchScreen", gameState.newScreen ); |
||||
} |
||||
if( overlay.alpha < 0.0 ){ |
||||
gameState.screenState = SCREEN_STABLE; |
||||
overlay.alpha = 0; |
||||
} |
||||
soundManager.tick(); |
||||
that.activeScreenObj.blit(); |
||||
dialogManager.tick(); |
||||
textContent.text = createjs.Ticker.getMeasuredFPS().toFixed(1); |
||||
that.stage.update(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
function Record( type, dateTime, record ){ |
||||
return { |
||||
getTime: function(){ |
||||
return dateTime; |
||||
}, |
||||
getContent: function(){ |
||||
return record; |
||||
}, |
||||
getType: function(){ |
||||
return type; |
||||
} |
||||
} |
||||
} |
||||
|
||||
//"Turkey weight, "
|
||||
//"Opened oven for X seconds"
|
||||
//"Core temperature measured at "
|
||||
|
||||
|
||||
function BindPubSub( obj ){ |
||||
(function(q) { |
||||
var topics = {}, subUid = -1; |
||||
q.subscribe = function(topic, func) { |
||||
if (!topics[topic]) { |
||||
topics[topic] = []; |
||||
} |
||||
var token = (++subUid).toString(); |
||||
topics[topic].push({ |
||||
token: token, |
||||
func: func |
||||
}); |
||||
return token; |
||||
}; |
||||
|
||||
q.publish = function(topic, args) { |
||||
if (!topics[topic]) { |
||||
return false; |
||||
} |
||||
setTimeout(function() { |
||||
var subscribers = topics[topic], |
||||
len = subscribers ? subscribers.length : 0; |
||||
|
||||
while (len--) { |
||||
subscribers[len].func(args); |
||||
} |
||||
}, 0); |
||||
return true; |
||||
|
||||
}; |
||||
|
||||
q.unsubscribe = function(token) { |
||||
for (var m in topics) { |
||||
if (topics[m]) { |
||||
for (var i = 0, j = topics[m].length; i < j; i++) { |
||||
if (topics[m][i].token === token) { |
||||
topics[m].splice(i, 1); |
||||
return token; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
return false; |
||||
}; |
||||
}(obj)); |
||||
} |
@ -0,0 +1,327 @@
@@ -0,0 +1,327 @@
|
||||
function TurkeyLayer( name, layerNumber1, turkeyModel, ovenModel ){ |
||||
var that = this; |
||||
|
||||
this.name = name; |
||||
this.layerNumber=layerNumber1; |
||||
this.waterLost = 0; |
||||
this.finalTemperature = 20; |
||||
this.cookCondition = "Raw"; |
||||
this.highestTemp = 0; |
||||
return { |
||||
updateTemperatureTick: function(){ |
||||
that.finalTemperature = turkeyModel.globTemp[that.layerNumber] |
||||
if(DEBUG) console.log(turkeyModel.globTemp); |
||||
that.highestTemp = that.finalTemperature > that.highestTemp ? that.finalTemperature : that.highestTemp; |
||||
that.waterLost = that.waterLost + UtilityFunctions.waterLoss( that.finalTemperature ); |
||||
that.cookCondition = UtilityFunctions.cookCondition(that.waterLost, that.name); |
||||
if(DEBUG) console.log( that.name + ": "+ that.waterLost + " " + that.cookCondition + " " + that.finalTemperature + " C" ); |
||||
}, |
||||
getCondition: function(){ |
||||
return that.cookCondition; |
||||
}, |
||||
getTemperature: function(){ |
||||
return that.finalTemperature; |
||||
}, |
||||
getHighestTemp: function(){ |
||||
return that.highestTemp; |
||||
} |
||||
|
||||
} |
||||
} |
||||
|
||||
|
||||
function TurkeyModel( weight, ovenModel ){ |
||||
this.density = 700; // kg/m3 Assuming Density of Water 1000 kg/m3
|
||||
this.cp = 2810; // 2810 J/kg K for Turkey. Extra is to semi-account for water evaporation energy
|
||||
this.heatConvection = 9; // W/m2 K Some Reasonable estimate for natural Convection. Change as needed. 5-25
|
||||
this.thermalConduct = 0.412; // W/m K // Chicken
|
||||
this.skin = {}; |
||||
this.body = {}; |
||||
this.core = {}; |
||||
this.splitsNum = 20; |
||||
console.log(UtilityFunctions.lbs2kgs(weight)) |
||||
this.totalRadius = UtilityFunctions.calculateRadius( UtilityFunctions.lbs2kgs(weight), this.density ); |
||||
|
||||
|
||||
this.totalLayers = [ new TurkeyLayer("Skin", this.splitsNum-1, this, ovenModel ), |
||||
new TurkeyLayer("Body", this.splitsNum-10, this, ovenModel ), |
||||
new TurkeyLayer("Core", 1, this, ovenModel ) ]; |
||||
|
||||
// Whenever temperature is changed
|
||||
this.updateLayerTemps = function() { |
||||
this.globTemp = UtilityFunctions.transientSphereSeries( this.density, |
||||
this.thermalConduct, |
||||
this.heatConvection, |
||||
this.cp, |
||||
this.totalRadius, |
||||
ovenModel.tempInfini, |
||||
this.splitsNum, |
||||
this.deltar, |
||||
this.globTemp, |
||||
this.pointRadius |
||||
); |
||||
for (var i in this.totalLayers ){ |
||||
this.totalLayers[i].updateTemperatureTick(); |
||||
} |
||||
}; |
||||
|
||||
this.resetLayerTemps = function() { |
||||
for (var i in this.totalLayers ) { |
||||
this.totalLayers[i].resetLayerTemps(); |
||||
} |
||||
}; |
||||
|
||||
//Sheen Model Stuff
|
||||
this.globTemp=[]; |
||||
this.pointRadius = [] |
||||
this.splitsNum = 20; |
||||
this.deltar = this.totalRadius/this.splitsNum; //20 Data Points
|
||||
|
||||
this.initializePoints = function() { |
||||
var step = ( this.totalRadius - this.deltar ) / ( this.splitsNum - 1 ); |
||||
for (var i = 0; i<this.splitsNum ; i++ ) { |
||||
this.pointRadius.push(step*i+this.deltar); |
||||
this.globTemp.push(20+step*i); //Starts at 20 C for initilizating
|
||||
}
|
||||
}; |
||||
this.initializePoints() |
||||
|
||||
|
||||
} |
||||
|
||||
function OvenModel( turkeyWeight, gameState ) { |
||||
var that = this; |
||||
this.tempInfini=20; //C
|
||||
this.setTemp = 20; |
||||
this.globalTime = 0; |
||||
|
||||
var turkey = new TurkeyModel(turkeyWeight, this ); |
||||
var proportional = 0.004; // This value is arbitrary to how fast you want the temperatures to converge. (Or oscillate, which could be realistic as well)
|
||||
var errorTolerance = 10; //Stove is accurate to 1 degree Celcius Should hopefully oscillate below that value.
|
||||
// Equalize temp will need to be sent each time iteration
|
||||
this.equalizeTemp= function(){ |
||||
var error = Math.abs(this.setTemp-this.tempInfini); |
||||
if( this.setTemp>this.tempInfini ){ |
||||
this.tempInfini = this.tempInfini + error*proportional; |
||||
} |
||||
else if( this.setTemp<this.tempInfini ){ |
||||
this.tempInfini = this.tempInfini - error*proportional; |
||||
} |
||||
|
||||
if( error>errorTolerance ) { |
||||
return(true); |
||||
} |
||||
} |
||||
return { |
||||
getTurkeyState: function(){ |
||||
return { |
||||
"skin" : { |
||||
"temp": turkey.totalLayers[0].getTemperature(), |
||||
"cond": turkey.totalLayers[0].getCondition(), |
||||
"highest" : turkey.totalLayers[0].getHighestTemp() |
||||
}, |
||||
"body" : { |
||||
"temp": turkey.totalLayers[1].getTemperature(), |
||||
"cond": turkey.totalLayers[1].getCondition(), |
||||
"highest" : turkey.totalLayers[1].getHighestTemp() |
||||
}, |
||||
"core" : { |
||||
"temp": turkey.totalLayers[2].getTemperature(), |
||||
"cond": turkey.totalLayers[2].getCondition(), |
||||
"highest" : turkey.totalLayers[2].getHighestTemp() |
||||
} |
||||
}; |
||||
}, |
||||
changeTemp: function(setTemp){ |
||||
if(DEBUG) console.log("temp changed to " + setTemp); |
||||
that.setTemp = setTemp; |
||||
}, |
||||
// set the tempInfini
|
||||
setRawTemp: function(newTemp){ |
||||
if(DEBUG) console.log("raw temp changed to" + that.tempInfini); |
||||
that.tempInfini = newTemp; |
||||
}, |
||||
getRawTemp: function(){ |
||||
return that.tempInfini; |
||||
}, |
||||
getCookTime: function(){ |
||||
return that.globalTime; |
||||
}, |
||||
secondTick: function(){ |
||||
that.globalTime = that.globalTime + 1; |
||||
if ( that.equalizeTemp() ) { |
||||
|
||||
// Turn on oven light
|
||||
gameState.pubsub.publish( "OvenLight", "On" ); |
||||
} |
||||
else { |
||||
// Turn off oven light
|
||||
gameState.pubsub.publish( "OvenLight", "Off" ); |
||||
} |
||||
if(DEBUG) console.log("Oven Temp " + that.tempInfini ) |
||||
turkey.updateLayerTemps(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
UtilityFunctions = { |
||||
|
||||
// Cache the lambda if the Biot number does not change, to avoid expensive root-finding operations
|
||||
cachedBiot: null, |
||||
cachedLambda: null, |
||||
|
||||
// Using Ratios for a rectangular Box Turkey
|
||||
calculateRadius: function(weight, density) { |
||||
|
||||
var ratioLvG=1.4; //1.4, Turkey length vs shoulder girth
|
||||
var ratioLvH=2; //2, Turkey length vs height from resting position
|
||||
|
||||
var length = Math.pow(weight/((1/ratioLvG)*(1/ratioLvH)*density),(1/3)) |
||||
var depth = 1/(ratioLvG /length); |
||||
var height = 1/(ratioLvH /length); |
||||
var simpleRadius = length/2; //Doesn't take into account equal Volume
|
||||
|
||||
var rectangleVolume = depth*height*length; //m^3 Multiple by 1/4 to account for triangular shape and empty Space
|
||||
var complexRadius = Math.pow(rectangleVolume/((4/3)*Math.PI), 1/3); //Volume of 3D Box = 3D Sphere
|
||||
|
||||
//if(DEBUG) console.log("Simple Radius " + simpleRadius + " Meters")
|
||||
//if(DEBUG) console.log("Complex Radius " + complexRadius + " Meters")
|
||||
return complexRadius; |
||||
}, |
||||
|
||||
sphereVolume: function(radius) { |
||||
return((4/3)*Math.PI*Math.pow(radius,3)) |
||||
}, |
||||
|
||||
waterLoss: function(temperature) { |
||||
return (Math.pow(10,(temperature-20)/80)-1) |
||||
}, |
||||
|
||||
transientSphereSeries: function( density, thermalConduct, heatConvection, cp, rTotal, tempInfinity, splitsNum, deltar, globTemp,pointRadius) { |
||||
|
||||
//Not Global Stuff
|
||||
var r0 = rTotal; |
||||
var deltat = 0.1 |
||||
|
||||
var alpha = thermalConduct/(density*cp) |
||||
var h=heatConvection;
|
||||
|
||||
for (var j=0; j<(1/deltat); j++ ) { |
||||
var dTdr=[] |
||||
// globTemp[splitsNum-1] should be last entry in globtemp
|
||||
for (var k=0; k<splitsNum; k++){ |
||||
if (k==0) { |
||||
dTdr.push((globTemp[1] - globTemp[0])/deltar) } |
||||
else if (k==splitsNum-1) { |
||||
dTdr.push((globTemp[splitsNum-1] - globTemp[splitsNum-2])/deltar)} |
||||
else { |
||||
dTdr.push((globTemp[k+1] - globTemp[k-1])/(2*deltar))} |
||||
} |
||||
dTdr[splitsNum-1] = heatConvection*(tempInfinity-globTemp[splitsNum-1])/thermalConduct |
||||
|
||||
var parenthesis = [] |
||||
for (var k=0; k<splitsNum; k++){ |
||||
parenthesis.push(dTdr[k]*Math.pow(pointRadius[k],2)) |
||||
} |
||||
|
||||
dPdr = [] |
||||
for (var k=0; k<splitsNum; k++){ |
||||
if (k==0) { |
||||
dPdr.push((parenthesis[1] - parenthesis[0])/deltar) } |
||||
else if (k==splitsNum-1) { |
||||
dPdr.push((parenthesis[splitsNum-1] - parenthesis[splitsNum-2])/deltar)} |
||||
else { |
||||
dPdr.push((parenthesis[k+1] - parenthesis[k-1])/(2*deltar))} |
||||
} |
||||
|
||||
for (var k=0; k<splitsNum; k++){ |
||||
globTemp[k]=alpha*dPdr[k]/Math.pow(pointRadius[k],2)*deltat + globTemp[k] //dTdr * deltaT in one loop
|
||||
} |
||||
//dTdt(1)=dTdt(1)/2;
|
||||
} |
||||
|
||||
return(globTemp) |
||||
}, |
||||
|
||||
/* Utility Functions */ |
||||
C2F: function( celsius ){ |
||||
return ( (celsius*(9/5)) + 32 ); |
||||
}, |
||||
F2C: function( farenheit ) { |
||||
return ( (farenheit-32) *(5/9) ); |
||||
}, |
||||
lbs2kgs: function(pounds){ |
||||
return pounds * 0.453592 |
||||
}, |
||||
randRange: function(min, max){ |
||||
return Math.floor(Math.random()*(max-min+1))+min; |
||||
}, |
||||
cookCondition: function(cookValue, layerName){ |
||||
|
||||
if( layerName == "Skin" || layerName == "Body" ){ |
||||
var multiplier = 1; |
||||
if (cookValue>=multiplier*600000) { |
||||
return ["Fire", (cookValue)/(multiplier*700000),"fire"]; |
||||
} |
||||
else if(cookValue>=multiplier*400000) { |
||||
return ["Burnt", (cookValue)/(multiplier*600000), "burnt"]; |
||||
} |
||||
else if (cookValue>=multiplier*300000) { |
||||
return ["Dry", (cookValue)/(multiplier*350000), "dry"]; |
||||
} |
||||
else if (cookValue>=multiplier*250000){ // >250000
|
||||
return ["Cooked", (cookValue)/(multiplier*300000), "overcooked"]; |
||||
} |
||||
else if (cookValue>=multiplier*80000) { // >50000
|
||||
return ["Cooked", (cookValue)/(multiplier*250000), "cooked"]; |
||||
} |
||||
else if (cookValue>=multiplier*50000){ |
||||
return ["Undercooked", (cookValue)/(multiplier*80000), "slightly cooked"]; |
||||
} |
||||
else if (cookValue>=multiplier*25000) { //
|
||||
return ["Undercooked", (cookValue)/(multiplier*50000), "undercooked"]; |
||||
} |
||||
else { |
||||
return ["Raw", 1, "raw"]; |
||||
} |
||||
} |
||||
else{ |
||||
var multiplier = 1; |
||||
if (cookValue>=multiplier*45000) { //
|
||||
return ["Fire", (cookValue)/(multiplier*600000),"fire"]; |
||||
} |
||||
else if(cookValue>=multiplier*35000){//
|
||||
return ["Burnt", (cookValue)/(multiplier*45000), "burnt"]; |
||||
} |
||||
else if (cookValue>=multiplier*25000){ //
|
||||
return ["Dry", (cookValue)/(multiplier*35000), "dry"]; |
||||
} |
||||
else if (cookValue>=multiplier*22000){ //
|
||||
return ["Cooked", (cookValue)/(multiplier*25000), "overcooked"]; |
||||
} |
||||
else if (cookValue>=multiplier*12000){ //
|
||||
return ["Cooked", (cookValue)/(multiplier*22000), "cooked"]; |
||||
} |
||||
else if (cookValue>=multiplier*7000){ //
|
||||
return ["Undercooked", (cookValue)/(multiplier*12000), "slightly cooked"]; |
||||
} |
||||
else if (cookValue>=multiplier*3000) { |
||||
return ["Undercooked", (cookValue)/(multiplier*7000), "undercooked"]; |
||||
} |
||||
else { |
||||
return ["Raw", 1, "raw"]; |
||||
} |
||||
|
||||
} |
||||
} |
||||
} |
||||
|
||||
//Running the Program Stuff
|
||||
/* |
||||
var ovenObject = new OvenModel(); |
||||
var turkey = new TurkeyModel(9, ovenObject); |
||||
|
||||
globalTime=0; |
||||
setInterval(function(){ovenObject.secondTick();},1000); |
||||
*/ |
@ -0,0 +1,655 @@
@@ -0,0 +1,655 @@
|
||||
/* Screens, inheritance would be nice */ |
||||
function LoadingScreen( stage, gameState ){ |
||||
var that = this; |
||||
this.lastPercent = -1; |
||||
this.picture = new createjs.Bitmap( "res/screens/LoadingScreen/Loading-Title.png" ); |
||||
this.pictureFront = new createjs.Bitmap( "res/screens/LoadingScreen/PanFront.png" ); |
||||
this.cooking = new createjs.Bitmap( "res/screens/LoadingScreen/TextCooking.png" ); |
||||
this.done = new createjs.Bitmap( "res/screens/LoadingScreen/TextDone.png" ); |
||||
this.turkeyState = [ new createjs.Bitmap( "res/screens/LoadingScreen/Turkey0.png" ), |
||||
new createjs.Bitmap( "res/screens/LoadingScreen/Turkey25.png" ), |
||||
new createjs.Bitmap( "res/screens/LoadingScreen/Turkey50.png" ), |
||||
new createjs.Bitmap( "res/screens/LoadingScreen/Turkey75.png" ), |
||||
new createjs.Bitmap( "res/screens/LoadingScreen/TurkeyDone.png" ) ]; |
||||
|
||||
this.done.alpha= 0; |
||||
stage.addChild( this.picture ); |
||||
stage.addChild( this.cooking ); |
||||
stage.addChild( this.turkeyState[0] ); |
||||
|
||||
var textContent = new createjs.Text( "0 %", "25px Arial", "black" ); |
||||
textContent.x = 500; |
||||
textContent.y = 20; |
||||
stage.addChild( textContent); |
||||
|
||||
gameState.pubsub.subscribe( "Load", function(percent){ |
||||
textContent.text = (percent * 25).toFixed(2) + " %"; |
||||
var wholeNum = Math.floor(percent); |
||||
if( that.lastPercent != percent){ |
||||
that.lastPercent = percent; |
||||
stage.addChild( that.turkeyState[wholeNum] ); |
||||
stage.addChild( that.pictureFront ); |
||||
} |
||||
|
||||
//If we're still on image one, don't fade it out, it's the base image!
|
||||
if( wholeNum != 0 ) |
||||
that.turkeyState[wholeNum].alpha = percent.toFixed(2) - wholeNum; |
||||
|
||||
// Done!
|
||||
if( wholeNum == 4 ){ |
||||
that.turkeyState[4].alpha = 1; |
||||
that.cooking.alpha=0; |
||||
that.done.alpha = 1; |
||||
|
||||
that.done.addEventListener( "mouseover", function(){ document.body.style.cursor='pointer'; } ); |
||||
that.done.addEventListener( "mouseout", function(){ document.body.style.cursor='default'; } ); |
||||
that.done.addEventListener( "click", function(){ gameState.pubsub.publish("SwitchScreen", "MainScreen"); }); |
||||
|
||||
that.turkeyState[4].addEventListener( "mouseover", function(){ document.body.style.cursor='pointer'; } ); |
||||
that.turkeyState[4].addEventListener( "mouseout", function(){ document.body.style.cursor='default'; } ); |
||||
that.turkeyState[4].addEventListener( "click", function(){ gameState.pubsub.publish("SwitchScreen", "MainScreen"); }); |
||||
} |
||||
}); |
||||
|
||||
stage.addChild( this.done ); |
||||
stage.addChild( this.pictureFront ); |
||||
|
||||
return { |
||||
blit : function(){ |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
function MainScreen( stage, gameState ){ |
||||
var that = this; |
||||
|
||||
this.background = new createjs.Bitmap( "res/screens/MainScreen/Main-Screen.png" ); |
||||
stage.addChild( this.background ); |
||||
|
||||
var turkeyAnimations = { peck:[14,24,"peck"], ruffle:[0,13,"ruffle"], stare:[25,35,"stare"] }; |
||||
var data = { |
||||
images: ["res/screens/MainScreen/TurkeySprite.png"], |
||||
frames: { width:400, height:350 }, |
||||
animations: turkeyAnimations |
||||
}; |
||||
|
||||
var spriteSheet = new createjs.SpriteSheet(data); |
||||
var animation = new createjs.Sprite(spriteSheet, "stare"); |
||||
animation.x = 140; |
||||
animation.y = 210; |
||||
|
||||
animation.addEventListener("tick", handleTick); |
||||
function handleTick(event){ |
||||
if ( turkeyAnimations[event.currentTarget.currentAnimation][1] == event.currentTarget.currentFrame ){ |
||||
event.currentTarget.paused = true; |
||||
} |
||||
// Click happened.
|
||||
} |
||||
stage.addChild(animation); |
||||
|
||||
this.grassLayer = new createjs.Bitmap( "res/screens/MainScreen/Grass.png" ); |
||||
this.grassLayer.x = -60; |
||||
stage.addChild( this.grassLayer ); |
||||
|
||||
// buttons info/credits/start
|
||||
new ImgButton( stage, gameState, 571,527, "res/screens/MainScreen/ButtonStart.png", "res/screens/MainScreen/ButtonStart.png","SwitchScreen", "DifficultyScreen", "Click" ); |
||||
new ImgButton( stage, gameState, 17,470, "res/screens/MainScreen/ButtonHelp.png", "res/screens/MainScreen/ButtonHelp.png",null, null, "Click", function(){ gameState.pubsub.publish("ShowHelp",""); } ); |
||||
new ImgButton( stage, gameState, 17,527, "res/screens/MainScreen/ButtonCredits.png", "res/screens/MainScreen/ButtonCredits.png","SwitchScreen", "CreditsScreen", "Click" ); |
||||
|
||||
gameState.pubsub.publish( "BackgroundLoop", {name:"TitleMusic", pos:5650, volume:0.7} ); |
||||
this.uiElems = []; |
||||
|
||||
return { |
||||
blit : function(){ |
||||
if( createjs.Ticker.getTicks() %50 == 0 ){ |
||||
|
||||
animation.gotoAndPlay(["peck", "ruffle", "stare"][UtilityFunctions.randRange(0,2)]); |
||||
} |
||||
// Draw all the uiElements
|
||||
for( var index in that.uiElems ){ |
||||
that.uiElems[ index ].tick(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
//start button
|
||||
} |
||||
|
||||
function DifficultyScreen( stage, gameState ){ |
||||
var that = this; |
||||
|
||||
this.background = new createjs.Bitmap( "res/screens/DifficultyScreen/Difficulty-Selection.png" ); |
||||
stage.addChild( this.background ); |
||||
|
||||
var turkeyAnimations = { peck:[14,24,"peck"], ruffle:[0,13,"ruffle"], stare:[25,35,"stare"] }; |
||||
var data = { |
||||
images: ["res/screens/MainScreen/TurkeySprite.png"], |
||||
frames: { width:400, height:350 }, |
||||
animations: turkeyAnimations |
||||
}; |
||||
|
||||
var spriteSheet = new createjs.SpriteSheet(data); |
||||
var animation = new createjs.Sprite(spriteSheet, "stare"); |
||||
animation.x = 140; |
||||
animation.y = 210; |
||||
|
||||
animation.addEventListener("tick", handleTick); |
||||
function handleTick(event) { |
||||
if ( turkeyAnimations[event.currentTarget.currentAnimation][1] == event.currentTarget.currentFrame ){ |
||||
event.currentTarget.paused = true; |
||||
} |
||||
// Click happened.
|
||||
} |
||||
stage.addChild(animation); |
||||
|
||||
this.grassLayer = new createjs.Bitmap( "res/screens/MainScreen/Grass.png" ); |
||||
this.grassLayer.x = -60; |
||||
stage.addChild( this.grassLayer ); |
||||
|
||||
// Difficulty selection UI
|
||||
this.buttonsAndText = new createjs.Bitmap( "res/screens/DifficultyScreen/ButtonsandText.png" ); |
||||
stage.addChild( this.buttonsAndText ); |
||||
|
||||
this.maleSelection = new createjs.Bitmap( "res/screens/DifficultyScreen/ButtonMale.png" ); |
||||
stage.addChild( this.maleSelection ); |
||||
|
||||
this.femaleSelection = new createjs.Bitmap( "res/screens/DifficultyScreen/ButtonFemale.png" ); |
||||
this.femaleSelection.alpha = 0; |
||||
stage.addChild( this.femaleSelection ); |
||||
|
||||
var nameInput = new createjs.Text( "", "48px Arial", "black" ); |
||||
nameInput.x = 47; |
||||
nameInput.y = 85; |
||||
nameInput.lineWidth = 175; |
||||
|
||||
stage.addChild( nameInput ); |
||||
|
||||
// handle keyboard typing
|
||||
document.onkeyup = function(event){ |
||||
// keycode
|
||||
var keynum = 48; |
||||
if(window.event){ // IE
|
||||
keynum = event.keyCode; |
||||
} |
||||
else{ |
||||
if(event.which){ // Netscape/Firefox/Opera
|
||||
keynum = event.which; |
||||
} |
||||
} |
||||
|
||||
if( keynum != 8 && keynum < 91 && keynum > 47 && nameInput.text.length < 22 ){ |
||||
nameInput.text += String.fromCharCode(keynum); |
||||
gameState.name = nameInput.text; |
||||
} |
||||
}; |
||||
|
||||
|
||||
// Backspace gets special treatment
|
||||
document.onkeydown = function(event){ |
||||
var keynum = 0; |
||||
if(window.event){ // IE
|
||||
keynum = event.keyCode; |
||||
} |
||||
else{ |
||||
if(event.which){ // Netscape/Firefox/Opera
|
||||
keynum = event.which; |
||||
} |
||||
} |
||||
|
||||
if(keynum == 8 && nameInput.text.length > 0 ){ |
||||
nameInput.text = nameInput.text.substr(0, nameInput.text.length-1); |
||||
gameState.name = nameInput.text; |
||||
} |
||||
event.preventDefault(); |
||||
} |
||||
|
||||
// Easy/Hard Button
|
||||
stage.addChild( new Button( stage, gameState, 500, 235, 100, 55, "ChangeGender", "Male" ) ); |
||||
stage.addChild( new Button( stage, gameState, 500, 300, 100, 55, "ChangeGender", "Female" ) ); |
||||
|
||||
stage.addChild( new Button( stage, gameState, 503, 370, 200, 55, null, null, function(){ document.onkeyup = function(){}; gameState.hard = false; gameState.gameStarted = true; gameState.hardcoreModifier=1; gameState.pubsub.publish("SwitchScreen", "KitchenScreen"); } ) ); |
||||
stage.addChild( new Button( stage, gameState, 500, 495, 205, 55, null, null, function(){ document.onkeydown = function(){}; gameState.hard = true; gameState.gameStarted = true; gameState.hardcoreModifier=20; gameState.pubsub.publish("SwitchScreen", "KitchenScreen"); } ) ); |
||||
|
||||
stage.addChild( new Button( stage, gameState, 35, 495, 85, 55, "SwitchScreen", "MainScreen" ) ); |
||||
|
||||
gameState.pubsub.subscribe( "ChangeGender", function(gender){ |
||||
gameState.gender=gender; |
||||
if( gender == "Male" ){ |
||||
that.maleSelection.alpha = 1; |
||||
that.femaleSelection.alpha = 0; |
||||
gameState.pronoun = "he"; |
||||
}else{ |
||||
that.maleSelection.alpha = 0; |
||||
that.femaleSelection.alpha = 1; |
||||
gameState.pronoun = "she"; |
||||
} |
||||
}) |
||||
return { |
||||
blit : function(){ |
||||
if( createjs.Ticker.getTicks() %50 == 0 ){ |
||||
animation.gotoAndPlay(["peck", "ruffle", "stare"][UtilityFunctions.randRange(0,2)]); |
||||
} |
||||
|
||||
// Draw all the uiElements
|
||||
for( var index in that.uiElems ){ |
||||
that.uiElems[ index ].tick(); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
function KitchenScreen( stage, gameState ){ |
||||
var that = this; |
||||
|
||||
// Fade out any other sounds
|
||||
gameState.pubsub.publish( "FadeOut", "" ); |
||||
|
||||
//gameState.pubsub.publish( "BackgroundLoop", {name:"Sizzle", pos:0, volume:0.5} );
|
||||
this.uiElems = []; |
||||
|
||||
this.uiElems.push( new WindowUI( stage, gameState ) ); |
||||
this.background = new createjs.Bitmap( "res/screens/KitchenScreen/KitchenScreen.png" ); |
||||
stage.addChild( this.background ); |
||||
if(DEBUG) console.log(gameState.purchasedItems); |
||||
if(DEBUG) console.log("KitchenScreen"); |
||||
for(var i in gameState.purchasedItems ){ |
||||
if(DEBUG) console.log(gameState.purchasedItems); |
||||
gameState.purchasedItems[i].draw( stage ); |
||||
} |
||||
|
||||
this.uiElems.push( gameState.ovenUI ? gameState.ovenUI.render() : ( gameState.ovenUI = new OvenUI( stage, gameState ) ).render() ); |
||||
this.uiElems.push( new ClockUI( stage, gameState ) ); |
||||
|
||||
if( gameState.alarmBought ) |
||||
this.uiElems.push( new AlarmUI(stage, gameState) ); |
||||
|
||||
|
||||
stage.addChild( new Button( stage, gameState, 14, 17, 73, 45, null,null, function(){ gameState.pubsub.publish("ShowHelp","");} ) ); |
||||
|
||||
new ImgButton( stage, gameState, 0,0, "res/screens/KitchenScreen/StoreBrochure.png", "res/screens/KitchenScreen/StoreBrochureGlow.png", null,null, "Click", function(){ |
||||
gameState.pubsub.publish("SwitchScreen", "MarketScreen"); |
||||
gameState.storeVisits++; |
||||
} ); |
||||
|
||||
// If player did not buy a turkey, tell them
|
||||
if( !gameState.turkeyBought ){ |
||||
gameState.pubsub.publish( "ShowDialog", {seq:"KitchenInitial", autoAdvance:false} ); |
||||
} |
||||
|
||||
|
||||
return { |
||||
blit : function(){ |
||||
|
||||
// Draw all the uiElements
|
||||
for( var index in that.uiElems ){ |
||||
that.uiElems[ index ].tick(); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
function MarketScreen( stage, gameState ){ |
||||
var that = this; |
||||
|
||||
this.background = new createjs.Bitmap( "res/screens/MarketScreen/MarketScreen.png" ); |
||||
var price = new createjs.Text( "", "16px Arial", "black" ); |
||||
price.x = 120; |
||||
price.y = 560; |
||||
|
||||
var wallet = new createjs.Text( "$" + parseFloat(gameState.wallet).toFixed(2), "20px Arial", "black" ); |
||||
wallet.x = 725; |
||||
wallet.y = 550; |
||||
|
||||
var walletTag = new createjs.Bitmap("res/items/Wallet.png"); |
||||
walletTag.x = 670; |
||||
walletTag.y = 535; |
||||
|
||||
var clipboardImg = new createjs.Bitmap("res/items/Clipboard.png"); |
||||
clipboardImg.x = 5; |
||||
clipboardImg.y = 315; |
||||
|
||||
var clipboardTitle = new createjs.Text( "Shopping List", "18px Arial", "black" ); |
||||
clipboardTitle.x = 25; |
||||
clipboardTitle.y = 385; |
||||
clipboardTitle.lineWidth = 175; |
||||
|
||||
var clipboardText = new createjs.Text( "Turkey", "16px Arial", "black" ); |
||||
clipboardText.x = 23; |
||||
clipboardText.y = 425; |
||||
clipboardText.lineWidth = 173; |
||||
|
||||
var clipboardWeight = new createjs.Text( "", "16px Arial", "black" ); |
||||
clipboardWeight.x = 120; |
||||
clipboardWeight.y = 540; |
||||
clipboardWeight.lineWidth = 175; |
||||
|
||||
// Play soundz
|
||||
gameState.pubsub.publish( "Play", {name:"Entrance", volume:0.3} ); |
||||
gameState.pubsub.publish( "BackgroundLoop", {name:"MarketMusic", volume:1} ); |
||||
gameState.pubsub.publish( "BackgroundLoop", {name:"MarketBackgroundSound", volume:0.4} ); |
||||
|
||||
stage.addChild(this.background); |
||||
|
||||
stage.addChild(wallet); |
||||
stage.addChild(walletTag); |
||||
stage.addChild(clipboardImg); |
||||
|
||||
stage.addChild(clipboardTitle); |
||||
stage.addChild(clipboardText); |
||||
stage.addChild(clipboardWeight); |
||||
stage.addChild(price); |
||||
|
||||
this.uiElems = []; |
||||
this.uiElems.push( new ImgButton( stage, gameState, 690,0, "res/items/ExitSign.png", "res/items/ExitGlow.png","SwitchScreen", "KitchenScreen", "Click" ) ); |
||||
|
||||
var marketItemKeys = Object.keys(gameState.marketItems); |
||||
for (var index in marketItemKeys ) { |
||||
gameState.marketItems[marketItemKeys[index]].draw( stage ); |
||||
} |
||||
|
||||
this.topground = new createjs.Bitmap( "res/screens/MarketScreen/MarketTopShelf.png" ); |
||||
stage.addChild( this.topground ); |
||||
|
||||
|
||||
this.showPrice = function( cost ){ |
||||
price.text = "$ " + ( cost == NaN ? "" : parseFloat(cost).toFixed(2) ); |
||||
} |
||||
|
||||
this.clearClipboard = function(){ |
||||
price.text = ""; |
||||
clipboardTitle.text = ""; |
||||
clipboardText.text = ""; |
||||
clipboardWeight.text = ""; |
||||
} |
||||
|
||||
this.showDesc = function( desc ){ |
||||
clipboardTitle.text = desc.title; |
||||
clipboardText.text = desc.desc; |
||||
if( desc.weight ){ |
||||
clipboardWeight.text = desc.weight.toFixed(2) + " lbs."; |
||||
} |
||||
} |
||||
|
||||
this.setWalletAmount = function(newAmount){ |
||||
wallet.text="$" + ( gameState.wallet=newAmount.toFixed(2) ); |
||||
} |
||||
|
||||
gameState.pubsub.subscribe("ShowDesc", this.showDesc); |
||||
gameState.pubsub.subscribe("ShowPrice", this.showPrice ); |
||||
gameState.pubsub.subscribe("WalletAmount", this.setWalletAmount); |
||||
gameState.pubsub.subscribe("ClearClipboard", this.clearClipboard); |
||||
|
||||
return { |
||||
blit : function(){ |
||||
|
||||
// Draw all the uiElements
|
||||
for( var index in that.uiElems ){ |
||||
that.uiElems[ index ].tick(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
} |
||||
|
||||
function ScoreScreen( stage, gameState ){ |
||||
var that = this; |
||||
|
||||
// All the text for the entries
|
||||
var totalCookTime = gameState.turkeyCookCounter; |
||||
var realTimeElapsed = Date.now() - gameState.startTime; |
||||
console.log("total cook time:"+ realTimeElapsed); |
||||
|
||||
var turkeyState = gameState.ovenModel.getTurkeyState(); |
||||
var totalScore = 0; |
||||
|
||||
var skinScoreChart = { |
||||
"raw": -1000, |
||||
"undercooked": -100, |
||||
"slightly cooked": 75, |
||||
"cooked": 500, |
||||
"overcooked": 200, |
||||
"dry": -300, |
||||
"burnt": -500 |
||||
}; |
||||
|
||||
var coreScoreChart = { |
||||
"raw": 0, |
||||
"undercooked": 125, |
||||
"slightly cooked": 600, |
||||
"cooked": 1000, |
||||
"overcooked": 750, |
||||
"dry": 400, |
||||
"burnt": 0 |
||||
}; |
||||
|
||||
var typeToMod = { |
||||
"Organic Turkey" : 1.03, |
||||
"Free Range Turkey" : 1.02, |
||||
"Sunny Farms Turkey" : 0.98, |
||||
"Pastured Turkey": 1.05, |
||||
"General Turkey": 1.00 |
||||
}; |
||||
// Optimal Temperature to be served at
|
||||
this.scoreDistribution= function(inputTemp, layer) { |
||||
desiredAverage = 165; |
||||
if(layer=="skin") desiredAverage = 260; |
||||
|
||||
variance = 1000; //Std Deviation 31.62
|
||||
return(Math.exp(-(Math.pow((inputTemp-desiredAverage),2)/(2*variance)))) |
||||
}; |
||||
|
||||
// Temperature Score
|
||||
var outerTemp = UtilityFunctions.C2F(turkeyState.skin.highest).toFixed(2); |
||||
var coreTemp = UtilityFunctions.C2F(turkeyState.core.temp).toFixed(2); |
||||
|
||||
var outerTempScore = that.scoreDistribution( outerTemp, "skin" ) * 200; |
||||
var coreTempScore = that.scoreDistribution( coreTemp ) * 200; |
||||
|
||||
totalScore += parseInt(skinScoreChart[ turkeyState.skin.cond[2]]); |
||||
totalScore += parseInt(coreScoreChart[ turkeyState.core.cond[2]]); |
||||
totalScore += parseInt(outerTempScore.toFixed(0)); |
||||
totalScore += parseInt(coreTempScore.toFixed(0)); |
||||
|
||||
resultsDialogue = []; |
||||
if (totalScore>=1800) { |
||||
randomDiag = perfect; |
||||
} |
||||
else if (totalScore>=1400) { |
||||
randomDiag = great; |
||||
} |
||||
else if (totalScore>=1000) { |
||||
randomDiag = average; |
||||
} |
||||
else if (totalScore>=400) { |
||||
randomDiag = subPar; |
||||
} |
||||
else { |
||||
randomDiag = terrible; |
||||
} |
||||
|
||||
for (var i = 0; i<=5; i++) { |
||||
resultsDialogue.push(randomString(randomDiag)); |
||||
} |
||||
messages["end"] = resultsDialogue; |
||||
|
||||
function randomString(stringArray) { |
||||
var index = UtilityFunctions.randRange(0, stringArray.length-1); |
||||
var stringResult = stringArray[index]; |
||||
stringArray.splice(index,1); |
||||
return (stringResult) |
||||
} |
||||
|
||||
gameState.pubsub.publish( "FadeOut", "" ); |
||||
|
||||
this.background = new createjs.Bitmap( "res/screens/ScoreScreen/Score-Evaluation-1.png" ); |
||||
this.background.alpha = 1; |
||||
stage.addChild( this.background ); |
||||
|
||||
background1 = new createjs.Bitmap( "res/screens/ScoreScreen/Score-Evaluation-2.png" ); |
||||
background1.alpha = 0; |
||||
stage.addChild( background1 ); |
||||
|
||||
for (i in gameState.turkeyStates){ |
||||
gameState.turkeyStates[i].scaleX = gameState.turkeyStates[i].scaleY = 1; |
||||
gameState.turkeyStates[i].x = 490; |
||||
gameState.turkeyStates[i].y = 110; |
||||
stage.addChild(gameState.turkeyStates[i]); |
||||
} |
||||
|
||||
gameState.pubsub.publish( "BackgroundLoop", {name:"TitleMusic", pos:5650, volume:0.7} ); |
||||
|
||||
gameState.pubsub.publish( "ShowDialog", {seq:"end", autoAdvance:true, endFunc:function(){ |
||||
background1.alpha=1; |
||||
|
||||
stage.addChild( new Button( stage, gameState, 590, 540, 190, 50, null, null, function(){ document.location.reload(); } ) ); |
||||
|
||||
// Cooking stats
|
||||
var hours = parseInt( totalCookTime / 3600 ) % 24; |
||||
var minutes = parseInt( totalCookTime / 60 ) % 60; |
||||
var seconds = totalCookTime % 60; |
||||
var timeText = ("00"+hours.toFixed(0)).slice(-2) + ":" + ("00"+minutes.toFixed(0)).slice(-2) + ":" + ("00"+seconds.toFixed(0)).slice(-2); |
||||
|
||||
var totalCookTimeText = new createjs.Text( timeText, "20px Arial", "black" ); |
||||
totalCookTimeText.x = 270; |
||||
totalCookTimeText.y = 107; |
||||
|
||||
realTimeElapsed = realTimeElapsed / 1000; |
||||
hours = parseInt( realTimeElapsed / 3600 ) % 24; |
||||
minutes = parseInt( realTimeElapsed / 60 ) % 60; |
||||
seconds = realTimeElapsed % 60; |
||||
timeText = ("00"+hours.toFixed(0)).slice(-2) + ":" + ("00"+minutes.toFixed(0)).slice(-2) + ":" + ("00"+seconds.toFixed(0)).slice(-2); |
||||
|
||||
var realtimeElapsedText = new createjs.Text( timeText, "20px Arial", "black" ); |
||||
realtimeElapsedText.x = 270; |
||||
realtimeElapsedText.y = 127; |
||||
|
||||
var ovenOpenedText = new createjs.Text( gameState.ovenOpened, "20px Arial", "black" ); |
||||
ovenOpenedText.x = 270; |
||||
ovenOpenedText.y = 147; |
||||
|
||||
var dialogueHeardText = new createjs.Text( gameState.dialogueHeard, "20px Arial", "black" ); |
||||
dialogueHeardText.x = 270; |
||||
dialogueHeardText.y = 167; |
||||
|
||||
stage.addChild( totalCookTimeText ); |
||||
stage.addChild( realtimeElapsedText ); |
||||
stage.addChild( ovenOpenedText ); |
||||
stage.addChild( dialogueHeardText ); |
||||
|
||||
// Cookedness Score
|
||||
|
||||
var outerConditionDesc = new createjs.Text( turkeyState.skin.cond[2], "20px Arial", "black" ); |
||||
outerConditionDesc.x = 150; |
||||
outerConditionDesc.y = 320; |
||||
|
||||
var coreConditionDesc = new createjs.Text( turkeyState.core.cond[2], "20px Arial", "black" ); |
||||
coreConditionDesc.x = 150; |
||||
coreConditionDesc.y = 340; |
||||
|
||||
var outerConditionText = new createjs.Text( skinScoreChart[ turkeyState.skin.cond[2] ], "20px Arial", "black" ); |
||||
outerConditionText.x = 310; |
||||
outerConditionText.y = 320; |
||||
|
||||
var coreConditionText = new createjs.Text( coreScoreChart[ turkeyState.core.cond[2] ], "20px Arial", "black" ); |
||||
coreConditionText.x = 310; |
||||
coreConditionText.y = 340; |
||||
|
||||
|
||||
stage.addChild( coreConditionText ); |
||||
stage.addChild( outerConditionText ); |
||||
|
||||
stage.addChild( coreConditionDesc ); |
||||
stage.addChild( outerConditionDesc ); |
||||
|
||||
// Temperature Score
|
||||
|
||||
var outerTemperatureText = new createjs.Text( outerTempScore.toFixed(0), "20px Arial", "black" ); |
||||
outerTemperatureText.x = 680; |
||||
outerTemperatureText.y = 320; |
||||
|
||||
var coreTemperatureText = new createjs.Text( coreTempScore.toFixed(0), "20px Arial", "black" ); |
||||
coreTemperatureText.x = 680; |
||||
coreTemperatureText.y = 340; |
||||
|
||||
var outerTemperatureDesc = new createjs.Text( outerTemp + " F", "20px Arial", "black" ); |
||||
outerTemperatureDesc.x = 530; |
||||
outerTemperatureDesc.y = 320; |
||||
|
||||
|
||||
|
||||
var coreTemperatureDesc = new createjs.Text( coreTemp + " F", "20px Arial", "black" ); |
||||
coreTemperatureDesc.x = 530; |
||||
coreTemperatureDesc.y = 340; |
||||
|
||||
|
||||
|
||||
stage.addChild( outerTemperatureText ); |
||||
stage.addChild( coreTemperatureText ); |
||||
|
||||
stage.addChild( coreTemperatureDesc ); |
||||
stage.addChild( outerTemperatureDesc ); |
||||
|
||||
// Modifiers
|
||||
var turkeyMod = typeToMod[gameState.turkeyType]; |
||||
var turkeyTypeModifierText = new createjs.Text( -1*((1-turkeyMod)*100).toFixed(0) + "%", "20px Arial", "black" ); |
||||
turkeyTypeModifierText.x = 310; |
||||
turkeyTypeModifierText.y = 437; |
||||
|
||||
totalScore *= turkeyMod; |
||||
|
||||
var stuffingTypeModifierText = new createjs.Text( -1*((1-gameState.stuffingTypeModifier)*100).toFixed(0)+"%" , "20px Arial", "black" ); |
||||
stuffingTypeModifierText.x = 310 |
||||
stuffingTypeModifierText.y = 457; |
||||
|
||||
totalScore *= gameState.stuffingTypeModifier; |
||||
|
||||
var frillsModifierText = new createjs.Text( "x"+gameState.frillsModifier, "20px Arial", "black" ); |
||||
frillsModifierText.x = 310 |
||||
frillsModifierText.y = 477; |
||||
|
||||
totalScore *= gameState.frillsModifier; |
||||
|
||||
var hardcoreModifierText = new createjs.Text( "x"+gameState.hardcoreModifier, "20px Arial", "black" ); |
||||
hardcoreModifierText.x = 310 |
||||
hardcoreModifierText.y = 497; |
||||
|
||||
totalScore *= gameState.hardcoreModifier; |
||||
|
||||
var totalText = new createjs.Text( totalScore.toFixed(0), "32px Arial", "black" ); |
||||
totalText.x = 250; |
||||
totalText.y = 550; |
||||
stage.addChild( totalText ); |
||||
|
||||
stage.addChild( stuffingTypeModifierText ); |
||||
stage.addChild( turkeyTypeModifierText ); |
||||
stage.addChild( frillsModifierText ); |
||||
stage.addChild( hardcoreModifierText ); |
||||
}} ); |
||||
|
||||
|
||||
return { |
||||
blit : function(){} |
||||
} |
||||
} |
||||
|
||||
function CreditsScreen( stage, gameState ){ |
||||
var that = this; |
||||
|
||||
this.background = new createjs.Bitmap( "res/screens/HelpCreditsScreen/Credits.png" ); |
||||
stage.addChild( this.background ); |
||||
stage.addChild( new Button( stage, gameState, 698, 533, 80, 50, "SwitchScreen", "MainScreen" ) ); |
||||
|
||||
this.uiElems = []; |
||||
return { |
||||
blit : function(){ |
||||
|
||||
// Draw all the uiElements
|
||||
for( var index in that.uiElems ){ |
||||
that.uiElems[ index ].tick(); |
||||
} |
||||
} |
||||
} |
||||
//
|
||||
} |
@ -0,0 +1,111 @@
@@ -0,0 +1,111 @@
|
||||
function SoundInstance( soundObj, loop ){ |
||||
this.soundObj = soundObj; |
||||
} |
||||
function SoundManager( gameState ){ |
||||
var that = this; |
||||
var soundCache = {}; |
||||
|
||||
var AUDIO_OUT = 1; |
||||
var AUDIO_IN = 2; |
||||
var AUDIO_STABLE = 0; |
||||
|
||||
this.audioState = AUDIO_STABLE; |
||||
|
||||
// Register all sounds loaded in gameState
|
||||
createjs.Sound.registerSound("res/sound/turkey_in_the_straw.mp3", "TitleMusic"); |
||||
createjs.Sound.registerSound("res/sound/Store/Waterford.mp3", "MarketMusic"); |
||||
createjs.Sound.registerSound("res/sound/GUI/click.mp3", "Click"); |
||||
createjs.Sound.registerSound("res/sound/GUI/buzz.mp3", "Error"); |
||||
createjs.Sound.registerSound("res/sound/Store/buy.mp3", "Buy"); |
||||
createjs.Sound.registerSound("res/sound/Store/entrance.mp3", "Entrance"); |
||||
createjs.Sound.registerSound("res/sound/GUI/ding.mp3", "Ding"); |
||||
createjs.Sound.registerSound("res/sound/Kitchen/Double_Beep.mp3", "BeepBeep"); |
||||
|
||||
// Kitchen sound
|
||||
createjs.Sound.registerSound("res/sound/Kitchen/Oven_Door_Full_Open.mp3", "Oven_Door_Full_Open"); |
||||
createjs.Sound.registerSound("res/sound/Kitchen/Oven_Door_Full_Close.mp3", "Oven_Door_Full_Close"); |
||||
createjs.Sound.registerSound("res/sound/Kitchen/Oven_Door_Peek_Close.mp3", "Oven_Door_Peek_Close"); |
||||
createjs.Sound.registerSound("res/sound/Kitchen/Oven_Door_Peek_Open.mp3", "Oven_Door_Peek_Open"); |
||||
createjs.Sound.registerSound("res/sound/Kitchen/Explosion_Sound.mp3", "Explosion"); |
||||
|
||||
createjs.Sound.registerSound("res/sound/Kitchen/Open_Cookbook.mp3", "Open_Cookbook"); |
||||
createjs.Sound.registerSound("res/sound/Kitchen/Close_Cookbook.mp3", "Close_Cookbook"); |
||||
|
||||
|
||||
this.backgroundSounds = []; |
||||
this.backgroundSoundsQueue = []; |
||||
this.fadeOut = function(){ |
||||
for ( var i in that.backgroundSounds ){ |
||||
that.backgroundSounds[i].audioState = AUDIO_OUT; |
||||
} |
||||
}; |
||||
this.play = function( soundName ){ |
||||
var channel = createjs.Sound.createInstance("Click"); |
||||
if( typeof soundName != "object" ){ |
||||
|
||||
channel = ( soundCache[soundName] ? soundCache[soundName] : soundCache[soundName] = createjs.Sound.createInstance(soundName) ); |
||||
channel.volume = 1; |
||||
} |
||||
else{ |
||||
channel = ( soundCache[soundName.name] ? soundCache[soundName.name] : soundCache[soundName.name] = createjs.Sound.createInstance(soundName.name) ); |
||||
channel.volume = soundName.volume; |
||||
} |
||||
channel.play(); |
||||
}; |
||||
|
||||
this.backgroundLoop = function( soundName ){ |
||||
var newBackgroundSound; |
||||
if( typeof soundName != "object" ){ |
||||
newBackgroundSound = soundCache[soundName] ? soundCache[soundName] : soundCache[soundName] = createjs.Sound.createInstance(soundName); |
||||
} |
||||
else{ |
||||
newBackgroundSound = soundCache[soundName.name] ? soundCache[soundName.name] : soundCache[soundName.name] = createjs.Sound.createInstance( soundName.name ); |
||||
newBackgroundSound.setPosition(soundName.pos || 0); |
||||
newBackgroundSound.volume = newBackgroundSound.desiredVolume = soundName.volume || 1; |
||||
newBackgroundSound.play(); |
||||
|
||||
// loop-de-loop
|
||||
newBackgroundSound.addEventListener("complete", function(){ |
||||
if( newBackgroundSound.volume == 0 ){ newBackgroundSound.stop(); return; } |
||||
newBackgroundSound.setPosition(soundName.pos || 0); |
||||
newBackgroundSound.volume = newBackgroundSound.desiredVolume = soundName.volume || 1; |
||||
newBackgroundSound.play(); |
||||
}); |
||||
} |
||||
that.backgroundSoundsQueue.push(newBackgroundSound); |
||||
}; |
||||
|
||||
gameState.pubsub.subscribe( "Play", this.play ); |
||||
gameState.pubsub.subscribe( "BackgroundLoop", this.backgroundLoop ); |
||||
gameState.pubsub.subscribe( "FadeOut", this.fadeOut ); |
||||
|
||||
return { |
||||
tick: function(){ |
||||
for ( var i in that.backgroundSounds ){ |
||||
if( that.backgroundSounds[i].audioState == AUDIO_OUT ){ |
||||
that.backgroundSounds[i].volume -=0.03; |
||||
} |
||||
if( that.backgroundSounds[i].audioState == AUDIO_IN ){ |
||||
that.backgroundSounds[i].volume +=0.03; |
||||
} |
||||
if( that.backgroundSounds[i].volume >= that.backgroundSounds[i].desiredVolume ){ |
||||
that.backgroundSounds[i].volume = that.backgroundSounds[i].desiredVolume; |
||||
} |
||||
if( that.backgroundSounds[i].volume <= 0.0 ){ |
||||
that.backgroundSounds[i].volume = 0; |
||||
that.backgroundSounds[i].stop(); |
||||
that.backgroundSounds.splice( i, 1 ); |
||||
} |
||||
} |
||||
if( that.backgroundSounds.length == 0 ){ |
||||
for ( var i in that.backgroundSoundsQueue ){ |
||||
var newSound = that.backgroundSoundsQueue[i]; |
||||
newSound.audioState = AUDIO_IN; |
||||
that.backgroundSounds.push( newSound ); |
||||
} |
||||
that.backgroundSoundsQueue = []; |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,664 @@
@@ -0,0 +1,664 @@
|
||||
var messages = { |
||||
"Null":["Me: "], |
||||
"KitchenInitial" : ["Me: I should run to the store and buy a delicious turkey!"], |
||||
"CannotBuyTurkey" : ["Me: I barely have time for ONE turkey, let alone TWO!"], |
||||
"NoMoney" : ["Me: I can't afford this!"], |
||||
"BuyTurkeyFirst" : ["Me: I should buy a turkey first!"], |
||||
"EmptyOven" : ["Me: I'll start cooking once I get a turkey."], |
||||
"OpenDoor" :["Me: I should probably try opening the oven door to measure the turkey's temperature."] |
||||
} |
||||
|
||||
//Terrible Results
|
||||
var terrible = [ |
||||
"Grandpa: Outrageous. I didn't fight for freedom for this kind of meal.", |
||||
"Grandpa: I could have cooked a better fowl with a flamethrower in Korea.", |
||||
"Grandma: My sister can make feast out of a potato. What is this?", |
||||
"Dad: Don't expect my blessing.", |
||||
"Mom: No thanks, I'm actually a vegetarian.", |
||||
"Brother: Who taught you how to cook?", |
||||
"Brother: What an awful turkey.", |
||||
"Spouse: I'm leaving you honey. It's not you, its the turkey.", |
||||
"Cat: Meow Meow (Get out of my house!)"]; |
||||
|
||||
//Subpar Results
|
||||
var subPar = [ |
||||
"Grandpa: My fake teeth can't chew through this tough turkey.", |
||||
"Grandpa: Treat the turkey with respect next time.", |
||||
"Grandma: Dear grandchild, next year let Grandmother do cooking.", |
||||
"Dad: I had high expectations from you.", |
||||
"Dad: You've brought shame to your family.", |
||||
"Dad: Not bad, but it could have been better.", |
||||
"Mom: Remember, it is the thought that matters.", |
||||
"Mom: You are welcome here no matter how well you cook.", |
||||
"Mom: Honey, I think this turkey could have turned out better.", |
||||
"Brother: Uhh, What's for dessert?", |
||||
"Brother: We should get a pre-baked turkey next time.", |
||||
"Spouse: Hey, the cat seems to like it.", |
||||
"Spouse: We'll have to go to some cooking classes together.", |
||||
"Cat: Hisssssss"]; |
||||
|
||||
//Average Results
|
||||
var average = [ |
||||
"Grandpa: Hmm. Passable.", |
||||
"Grandma: This turkey tastes good, you have done well.", |
||||
"Dad: Pretty decent turkey have you cooked here.", |
||||
"Mom: Tastes better than store cooked turkeys.", |
||||
"Brother: This is way better than I expected.", |
||||
"Spouse: Not bad.", |
||||
"Cat: Meow meow (I may not leave a present in your shoes today)"]; |
||||
|
||||
//Great Results
|
||||
var great = [ |
||||
"Grandpa: Fine job, sonny! Just like the golden days.", |
||||
"Grandpa: Tender and juicy, just the way I like it.", |
||||
"Grandma: Such a talented little cook. Welcome to family.", |
||||
"Grandma: Most enjoyable dinner. Now, who wants baked apples?", |
||||
"Dad: Good and meaty, mmm-mmm!", |
||||
"Mom: The second best turkey I have ever had!", |
||||
"Mom: You should teach me your secrets", |
||||
"Brother: Way to go, this turkey is fantastic.", |
||||
"Spouse: Oh, what a nice turkey.", |
||||
"Cat: Meow MEOW! (I am pleased, human)"]; |
||||
|
||||
//Perfect Results
|
||||
var perfect = [ |
||||
"Grandpa: Damn good gobsmackingly delicious piece of freedom!", |
||||
"Grandma: Excellent! You will cook festival dinner next year, yes?", |
||||
"Dad: Finger-licking perfection!", |
||||
"Mom: This turkey is delicious. Let's get you two wed immediately!", |
||||
"Mom: Never have I had a more scrumptious turkey!", |
||||
"Brother: All-praise the turkeymeister!", |
||||
"Spouse: Bite after bite of gourmet delight!", |
||||
"Spouse: We should get married. Tonight!", |
||||
"Cat: Puuuurrrrrrr"]; |
||||
|
||||
|
||||
var story = { |
||||
|
||||
"Duck Story": |
||||
["Dad: So I was in the office last week, typing up the TPS reports that need to be turned in every Friday, when I heard a quacking sound.", |
||||
"Dad: I thought it was Larry again. He has one of those old Blackintosh computers at his desk, you know, the ones with the smiley winking face.", |
||||
"Brother: Dad, that's such old technology. When is your company going to upgrade to SuckBox 87?", |
||||
"Dad: I know, but let me finish my story. Well, you know how when you click or an alert box comes up the computer can be set to a quacking sound?", |
||||
"Dad: So I tell Larry, what's up with all his alert boxes.", |
||||
"Mom: Who's Larry again hun?", |
||||
"Dad: He's my stall partner. We share he cubicle remember? So he turns around in his office chair, and asks 'what?'", |
||||
"Dad: 'The quacking, what's with all the quacking?'", |
||||
"Dad: 'I'm not doing it', he tells me.", |
||||
"Dad: 'Well, It isn't me.'", |
||||
"Dad: Just then the quacking noise happened again.", |
||||
"Dad: 'Did you hear that Larry?'", |
||||
"Dad: 'Yeah.'", |
||||
"Dad: We poked our head above the cubicle to look out and didn't see anybody else in the room. Yet the quacking came again.", |
||||
"Dad: Besides the quacking, the room had fallen very silent.", |
||||
"Mom: So, what did ya do?", |
||||
"Dad: I droop down on my hands and knees, and that's when it got me.", |
||||
"Mom: Mercy!", |
||||
"Brother: You got attacked by a duck?", |
||||
"Dad: That duck ran into me, face first. In its flight to escape, it pooped on my hands. Lucky me.", |
||||
"Dad: Larry and I grabbed a few guys on break and we corralled the duck out of the office.", |
||||
"Dad: Some of the guys wanted to keep it as a pet, but these are the same guys who don't get much done anyways. No help to office productivity.", |
||||
"Grandma: Son, You let a good meal go to waste.", |
||||
"Dad: Mom, we don't eat ducks we find on the street. That's just cruel.", |
||||
"Grandma: That doesn't stop those Chinese from eating street cats and dogs. Why do you think there are all those missing pet posters in the neighborhood?", |
||||
"Mom: Oh good lord!", |
||||
"Dad: Mom, you should stop spreading those rumors. It is cars and wild animals.", |
||||
"Grandma: Oh I'm sure those are SOME of the reasons. But lying to yourself isn't good honey.", |
||||
"Cat: Meow.", |
||||
"Dad: Oh hey Kasey. You like being an indoor cat don't you? Don't have to worry about all those cars and wild animals. Don't you little girl?", |
||||
"Grandma: And Chinese.", |
||||
"Dad: Mooom!"], |
||||
|
||||
"Golf Story": |
||||
["Grandpa: Son, what's your par on the John Milton Golf Course?.", |
||||
"Dad: I'm a little rusty, but my average is about 76.", |
||||
"Grandpa: Oh really? Chaahooooo I am down to 69.", |
||||
"Dad: Congratulations Dad.", |
||||
"Grandpa: How about you and I hit a few around next week?", |
||||
"Dad: I will have to check my calendar, but I would love to."], |
||||
|
||||
"Creeper Worker": |
||||
["Brother: ...and so this guy kept trying to see what I wrote down on my notepad, and I keep trying to hide it from his prying eyes. Anyways...", |
||||
"Dad: Hey that reminds me of this guy at work.", |
||||
"Brother: I'm trying to tell a story here Dad.", |
||||
"Mom: Let Greg finish.", |
||||
"Dad: Ok, finish your story.", |
||||
"Brother: Well... I forgot where I was going with it. Err, the guy was trying to view my notepad...and well, that's about it. Look what you did Dad.", |
||||
"Dad: Sorry. But hey! Now you can hear my story.", |
||||
"Dad: Just like you, we had a nosey co-worker. This co-worker was showing around a new customer to our branch when a screensaver caught his in a nearby room.", |
||||
"Grandma: What is a screensaver?", |
||||
"Dad: You know on a computer when you don't use it and the screen goes black? It is like that, except this computer has an animated display like a slide show.", |
||||
"Grandma: Ok, a slide show on the computer.", |
||||
"Dad: Yes, sort of like that.", |
||||
"Dad: Well, the co-worker enters the room, with the new customer, to check out the screen saver. Now this room belongs to Julia, our PR rep.", |
||||
"Dad: I'm not sure why he entered the room. He could have just viewed the screen saver through the office window.", |
||||
"Dad: Julia wasn't there at the time, but word gets around quickly in the office.", |
||||
"Dad: She found out that Rob, that's the co-worker, entered the room, and filed a complaint with Internal Relations.", |
||||
"Dad: Then Internal relations sends a message to Rob, asking if he did enter the room.", |
||||
"Dad: And then Rob sends a long email response back, all the while with our customer in tow, even asking the customer advice about what to include in the E-mail.", |
||||
"Brother: Wow, so did you lose the customer?", |
||||
"Dad: We don't know yet, but management did send an internal memo around re-affirming the boundaries of privacy.", |
||||
"Dad: This whole thing was completely overblown though. Rob was just looking at a screensaver. He didn't even try and hide it either.", |
||||
"Dad: But that's life. People who get excited over nothing.", |
||||
"Wife: Well, he did seem kind of creepy asking for the customer's advice on the E-mail.", |
||||
"Brother: And what about Julia? She seemed to know a littttle bit too much about the goings on in her office cubicle.", |
||||
"Dad: Maybe she has an office camera or something. I'm not sure.", |
||||
"Brother: Do you have one?", |
||||
"Dad: No, but then again I'm not in PR. Sometimes workers try and find out what the dirt is on them, or try and change their records on the computer.", |
||||
"Brother: Sorry to say, it honestly sounds like a terrible place to work.", |
||||
"Dad: It isn't as bad as it seems. Every now and then sometime like this happens and it becomes the talk of the town.", |
||||
"Brother: Maybe just a boring place."], |
||||
|
||||
"Paint Bucket Sucks": |
||||
["Brother: Hey Grandpa, I've got a funny story about that primer you gave me.", |
||||
"Grandpa: You'll have to remind me again, my memory isn't too good in my old age.", |
||||
"Brother: Well, you gave me some primer to redo my room.", |
||||
"Mom: How is the painting going? Last I heard you had the priming done.", |
||||
"Brother: Yup. Well, almost. I still have a mess to clean up.", |
||||
"Mom: What happened?", |
||||
"Brother: Yeaahh well, grandpa's can of primer was pretty old. And it rusted on the bottom and developed small holes.", |
||||
"Brother: So, there I was prepping everything, ready to go to town on the walls, when I start feeling some wetness on my pants.", |
||||
"Brother: I look down and there are primer drops all over my pants.", |
||||
"Dad: Why were you holding the paint bucket though? Don't you just pour it in a roller pan and do it that way like I taught you?", |
||||
"Brother: Well yes, but I was also cutting the edges of the room before hand, like you taught me. And that was easier with the paint bucket in my hand.", |
||||
"Brother: Or so I thought...", |
||||
"Mom: What happened next Greggy?", |
||||
"Brother: Mom, don't call me 'Greggy'.", |
||||
"Brother: Anywaaays, I quickly put the can down in the roller pan I had nearby. I turned around to find some paper towels to clean myself off with.", |
||||
"Brother: That's when I noticed a drip line all the way from the garage. That's not good.", |
||||
"Brother: I dashed for the towels and once I reached them, I tried to soak up as much as possible. And well... not good.", |
||||
"Brother: In the future, I probably won't go for your primer Grandpa.", |
||||
"Grandpa: You know what'll get that paint out? Some turpentine. If you don't have some of that handy you should try out some kerosene.", |
||||
"Brother: I tried some paint remover already, but it also took out the color in my pants. Luckily, I wasn't wearing my best pants.", |
||||
"Brother: I did have to go for a heavy duty carpet cleaning service. My wife wasn't too happy about that", |
||||
"Grandpa: You should have asked me for help. I would have shown you how to do it, and I would have done it for free too.", |
||||
"Brother: Thanks Grandpa, I'll definitely keep that in mind."], |
||||
|
||||
"Hanging Doorway Ornaments":[ |
||||
"Grandma: A real bother these days are the people that decorations in their doorways. They get in your face as you try to walk through.", |
||||
"Grandma: And what if there is an Earthquake!", |
||||
"Grandpa: It isn't like we live on a fault line.", |
||||
"Grandma: Just stop hanging your bears in the doorway.", |
||||
"Grandpa: I have the kitchen and you have the garage, that was the deal.", |
||||
"Grandma: Maybe I'll just take both the garage and the kitchen and then put you out on the street with your keychain bears.", |
||||
"Grandpa: I'd like to see you try.", |
||||
"Grandma: Oohh don't make me get my shotgun.", |
||||
"Grandpa: Err, speaking of kitchens. HOW IS THAT TURKEY COMING ALONG IN THERE. YOU NEED A HAND?"], |
||||
|
||||
"Spouse gets surprise movie tickets": |
||||
["Mom: Hey, seen any interesting movies y'all?", |
||||
"Spouse: I have. Recently I was...", |
||||
"Grandpa: Back in my day, we burned rats for fun.", |
||||
"Spouse: errr.. Grandpa?", |
||||
"Grandma: Don't mind him. He's losing his mind.", |
||||
"Grandpa: I keep it right here. *Taps head* But where did you put the lock on that mouse of yours?", |
||||
"Dad: Dad, Mom, don't keep interrupting the story.", |
||||
"Grandpa: Well, she started it.", |
||||
"Grandma: Ahh, you old coot.", |
||||
"Mom: Please continue.", |
||||
"Spouse: ummmmm", |
||||
"Spouse: Ah, now I remember. [Player] and I were at the mall when a woman came up to us.", |
||||
"Spouse: 'Hey guys, sorry to bother you. I'm the host of a free movie screening preview, and we are trying to fill as many seats as possible.'", |
||||
"Spouse: 'We severely underestimated the number of people who were going to show up. If you have time, it would really help me out if you two would attend.'", |
||||
"Spouse: [Player] thought going to see the free movie was a no brainer, but I knew that we had somewhere to be in less than two hours.", |
||||
"Spouse: 'How long is the movie', I asked. She replied, 'About an hour and a half'. Which is about standard.", |
||||
"Grandpa: Back in my day...", |
||||
"Spouse: 'WE CAN ALWAYS leave early', [Player] whispered to me.", |
||||
"Dad: Did you end up seeing it?", |
||||
"Spouse: Actually, yes.", |
||||
"Spouse: We lined up at the theater, and noticed that all the others in line had a pamphlet ticket. We might be in the wrong line!", |
||||
"Spouse: The women told us to mention her name 'Stephanine' at the door to get in, but what if we go up to the doorman, mention 'Stephanine', and they respond ' Stephanine, who is Stephaine?' ", |
||||
"Spouse: The line begins to move, and we approach to the ticket-taker.", |
||||
"Spouse: 'Stephanie told us to come'. After a heart wrenching pause, the doorman nodded, and we were allowed in.", |
||||
"Dad: What movie was it?", |
||||
"Spouse: Stephanie mentioned it was going to be an action documentary about Poland but when we got our seats, the pre-ads were all childish.", |
||||
"Spouse: Legos, Toys, cartoons, etc. [Player] and I wondered if the movie we were about to see wasn't even what they told us.", |
||||
"Brother: Legos aren't just for kids.", |
||||
"Spouse: Maybe not, but the marketing is primarily kid focused. Anyhow, the movie turned out to be the Poland one.", |
||||
"Spouse: However, the movie was two hours rather than the expected one hour thirty.", |
||||
"Mom: Did you stay the whole time? I could not see myself walking out. I would feel too embarrassed about the whole audience staring at me.", |
||||
"Spouse: It isn't that hard, you just treat it like you are headed to the bathroom. Except you never come back.", |
||||
"Spouse: But yes, we did leave early, so we'll have to check the rest of the movie on DVD, or see it in theatres when it officially releases.", |
||||
"Mom: Good thing the staff didn't send a search party for you. Maybe you fell into the toilet.", |
||||
"Spouse: Haha", |
||||
"Dad: Say, what was the title of the movie?", |
||||
"Spouse: 'Randy Staples Shares the Pain.' We saw all the build up, but missed the payoff.", |
||||
"Grandpa: Back in my day, we used to watch movies for a nickel.", |
||||
"Mom: I remember when gas used to be twenty cents a gallon.", |
||||
"Brother: And I remember when the PS3 cost $599 US dollars.", |
||||
"Cat: Meow, meow meow"], |
||||
|
||||
"Youtube Sensation": |
||||
["Grandpa: Back in my day, we burned rats for fun.", |
||||
"Brother: Ok Grandpa. Anyways, I was at Frankfort mall the other day.", |
||||
"Brother: Just walking around, not really focused on any particular purchase when I noticed a long line. Naturally, you see the line, and wonder what's for.", |
||||
"Brother: So, my buddies and I walked up the line to find out the sitch.", |
||||
"Mom: What's a 'sitch'.", |
||||
"Brother: It means situation.", |
||||
"Mom: I see. How long was the line?", |
||||
"Brother: Oh, it stretched, maybe, half the mall. There were security guards out, to make sure that traffic could get through gaps in the line.", |
||||
"Brother: As we neared the front, we saw that the line moved into some kind of makeup store.", |
||||
"Brother: The flier outside said they had one of those video sensations, you know the one who does the makeup? I can't remember her name.", |
||||
"Mom: So did you go in?", |
||||
"Brother: And wait in that long line? I don't even wear makeup!", |
||||
"Mom: Yeah, but what about your fiancee'? Why not get her something nice?", |
||||
"Brother: I'm sure she would love some makeup, but I can buy that stuff on any day.", |
||||
"Brother: One kind of interesting, but obvious, thing about the line composition was that it was majorly women. There was a handful of guys, but I'd assume they were boyfriends.", |
||||
"Grandpa: Back in my day, I would have gotten in that line and wooed all the women.", |
||||
"Grandma: You can't even grab the attention of a taxi.", |
||||
"Grandpa: You're not making sense. Why would I want to take a taxi out to dinner?", |
||||
"Grandma: No, not taking a taxi out to dinner. Forget it. Just forget it."], |
||||
|
||||
"Girlfriend's Boba Keeps on a-flowing": |
||||
["Spouse: You know what boba is right Mom?", |
||||
"Mom: What's Boba?", |
||||
"Spouse: Ok, I guess not.", |
||||
"Grandma: What's booba?", |
||||
"Spouse: I take it you mean boba?", |
||||
"Grandma: Yes, that thing.", |
||||
"Spouse: What most people talk about when they mean 'boba' are tea drinks with milk in them.", |
||||
"Spouse: The boba tea drinks are not hard to make, just make black tea, and then add any kind of milk you have, some sweetener, then chill with ice.", |
||||
"Spouse: [Player] and I made it at home one time, but that's another story. Anyways, the 'boba' itself are these little black balls that are made out of sweet potato.", |
||||
"Dad: Sweet Potatoes, like a yam?", |
||||
"Brother: Dad, you know that sweet potatoes and yams are not the same right?", |
||||
"Dad: What? They aren't?", |
||||
"Brother: No", |
||||
"Dad: Well, what's the difference?", |
||||
"Brother: I don't know, but the point is they are different.", |
||||
"Spouse: Boba is usually made from sweet potatoes, but it can also be made from other starchy materials, I suppose.", |
||||
"Dad: What's it taste like? Kind of...potatoey?", |
||||
"Spouse: Not really, it is chewy, a bit like... when you take the first bite into some gum. Right before it gets soft.", |
||||
"Spouse: Though when places heat it up, it is really soft and moldable.", |
||||
"Grandma: Hmm. I wouldn't mind trying this boba sometime.", |
||||
"Spouse: You definitely should since I know you like your morning tea.", |
||||
"Spouse: Now that you all know what boba is, I can tell you about this cool, and somewhat awkward event that happened.", |
||||
"Spouse: [Player] and I were driving down the freeway when we remembered that a new boba place was opening up on Teller St.", |
||||
"Spouse: As part of their opening promotion, they were offering one free boba drink per customer.", |
||||
"Spouse: Since I was thirsty, I suggested we drop by and see what's up.", |
||||
"Spouse: We parked and walk up to the building. There weren't too many people about, and a sign revealed why.", |
||||
"Spouse: The free boba promotion ended at 8PM, and it was already 10!", |
||||
"Mom: Aww, that's too bad", |
||||
"Spouse: I decided to get a drink anyways.", |
||||
"Spouse: But when I ordered, the worker said 'Would you like to try one of our free drinks?', and motioned towards the sign.", |
||||
"Spouse: 'Sure!', Then he asked [Player] what [GenderPronoun] wanted.", |
||||
"Spouse: So we both got a full-sized free drink!", |
||||
"Mom: What flavor did you get? I assume there are flavors of boba?", |
||||
"Spouse: Yes, there are. I ordered Strawberry. It tasted ok, but was really missing that strawberry flavor.", |
||||
"Spouse: The worker asked how they were, and well Mom, you raised me to be an honest individual, so it was lacking in flavor.", |
||||
"Spouse: So the worker says, 'Alright, let me make you another one'", |
||||
"Spouse: He makes me a completely new boba drink, while letting me keep the old one to drink. At this point I haven't even paid for anything yet.", |
||||
"Dad: That's just good customer service. Since this place is new, he is trying to build up customer relations.", |
||||
"Spouse: True, but I feel like it got a little out of hand. The next drink also lacked the strawberry flavor. The worker said it is probably because of the syrup.", |
||||
"Spouse: He then proceeded to make another drink, still free, using fresh strawberries in lieu of the syrup flavoring.", |
||||
"Spouse: Now the syrup drinks were probably really cheap to make, but making drinks with real fruit costs considerably more.", |
||||
"Spouse: By the end of our time at the place, the two of us had six drinks in hand without a cent spent.", |
||||
"Spouse: The worker just kept offering us samples and I felt really guilty about being so honest.", |
||||
"Spouse: I decided to order the drink I was originally going to get, even though I had consumed 2 whole boba drinks already. Sugar overload!", |
||||
"Brother: I hope you left him a fat tip for his troubles.", |
||||
"Spouse: Yes, I tipped, [Player] made sure of that.", |
||||
"Spouse: With all the caffeine and sugar, I couldn't sleep all night. My heart was in trepidation even through the next morning.", |
||||
"Spouse: I probably wouldn't do that again.", |
||||
"Grandma: This sounds like the place I should try my first boba.", |
||||
"Spouse: I don't think I could boba for at least a month I'm so burnt out.", |
||||
"Brother: It is settled, right after this meal we're all going out for boba.", |
||||
"Spouse: Hah, no.", |
||||
"Brother: No, seriously.", |
||||
"Spouse: And seriously. No"], |
||||
|
||||
|
||||
"Grandmother reveals the virtues of the bread line": |
||||
["Brother: The Turkey is taking a while to cook. [Player] isn't too good at cooking is [GenderPronoun]?", |
||||
"Spouse: How dare you talk about [Player] like that. [Player] is a great cook. You'll see!", |
||||
"Grandma: You guys have it lucky. Where I grew up we had bread lines.", |
||||
"Grandma: My family would stand in a bread line for over six hours with the POSSIBILITY of receiving a loaf of bread.", |
||||
"Grandma: I remember one particular occasion where my mom told me to take my baby sister with me and go stand in the bread line.", |
||||
"Grandma: I was only 8 years old, and my baby sister was less than a year.", |
||||
"Grandma: Standing is a whole day affair. Some people brought laundry. Others did their crafts in line.", |
||||
"Grandma: My sister and I stood in that line together for over eight hours until we finally reached the front.", |
||||
"Grandma: When we got there. The man with the bread said, 'One loaf of Bread.'", |
||||
"Grandma: I held my baby sister outstretched and said 'Two.'", |
||||
"Grandma: The bread man responded. 'Baby doesn't count. One loaf of bread.' We were then pushed out of line with our one loaf.", |
||||
"Mom: Jesus, that sounds horrible.", |
||||
"Grandma: It was, but it was also necessary. Though when I hear people complaining how they are tired of waiting, I like to retell that story.", |
||||
"Brother: Alright, I suppose it could be worse, but let's hope that [Player] can do better than that."], |
||||
|
||||
"Father talks about the virtues of Automated Cars": |
||||
["Mom: Roger, tell everyone about your automated cars meeting.", |
||||
"Dad: It wasn't a meeting, it was closer to a seminar.", |
||||
"Dad: At work, we accrue credits that can be put towards educational events. Our managers think that an educated workforce is a happy and productive workforce.", |
||||
"Dad: So we are required to spend these credits every year on our choice of relevant education events.", |
||||
"Spouse: That's cool. What kind of choices for educational events are there?", |
||||
"Dad: As one example, employees can go to a local college or high school and present about their work at the company.", |
||||
"Dad: Other options are to attend talks about various topics, such as aerospace engineering, materials science, manager relations, customer relations, etc.", |
||||
"Dad: I decided to spend my credits on a five person panel from the various automotive manufacturers about the future of automated vehicles.", |
||||
"Dad: Disappointingly, the panel never went in-depth about the technology side of automated cars.", |
||||
"Dad: The panel just already affirmed what I already knew. Self-driving cars are coming.", |
||||
"Grandpa: Why would you want a self-driving car anyways? Driving is fun!", |
||||
"Grandpa: I remember driving my old station wagon across country to California. Now that was a trip to remember.", |
||||
"Grandpa: The sun was beating down, and we didn't have air conditioning in the car, so you rolled down the window and enjoyed the breeze.", |
||||
"Grandpa: Nowadays, you are spoiled with automatic windows, automatic car washers, automatic transmission.", |
||||
"Grandpa: Why even call it a car? Sounds to me more like a train you ride.", |
||||
"Dad: Yes Dad, which was the general gist of the whole thing. Some people like to drive their car.", |
||||
"Dad: Though one panelist seemed confident that it will eventually take over.", |
||||
"Dad: They quoted 48 minutes as the average amount of time a driver spends in their car per day.", |
||||
"Dad: If most of that time is spent in traffic, or just getting somewhere, then people will adopt a car that can do the nitty gritty driving.", |
||||
"Dad: Drivers can then spend their five leisure minutes on the beach boulevard cruising with manual control.", |
||||
"Grandpa: Enjoy your fandangled self-driving cars, if they ever come.", |
||||
"Grandpa: In the 1960s they used to say we'd have flying cars in the 2000s, but you don't see that now.", |
||||
"Brother: Maybe in my generation. First the self-driving cars, then the flying ones.", |
||||
"Cat: Meow (And then the world!)"], |
||||
|
||||
"Brother recounts a hockey game he saw recently, and his friend has to go to the hospital": |
||||
["Brother: Yo, I watched a hockey game recently. There were cheap group tickets, so a bunch of my friends jumped on it to watch the game.", |
||||
"Spouse: Who was playing?", |
||||
"Brother: Some minor league team, the 'Raging Tornados', I believe? It isn't important. The point is seeing two teams pummel each other over a little puck.", |
||||
"Grandpa: Yes, exactly!", |
||||
"Spouse: I suppose since we're glorifying the violence of the sport, were there any fights?", |
||||
"Brother: Ah hell yeah! The gloves were thrown to the ice, and the two players starting man-hugging each other.", |
||||
"Brother: The refs just let it go. There was no blood, but it was the intention that mattered.", |
||||
"Brother: Sadly, it isn't like some video games where the winner of the fight gets to stay on the ice. The perpetrator in this case got the penalty.", |
||||
"Brother: But anyways, what was cool was we were allowed to play some broomball on the ice before the game due to our group size.", |
||||
"Brother: That was loads of fun. Until someone got injured.", |
||||
"Mom: Heavens no!", |
||||
"Brother: Well, it wasn't from the broomball.", |
||||
"Brother: Later, when our group was walking around, waiting for the actual game to start, the two hockey teams were practicing and a puck flew into the crowd.", |
||||
"Brother: It smacked one of my friends in the neck, and they had to go to the infirmary.", |
||||
"Mom: But were they okay?", |
||||
"Brother: Yeah, they were fine. They decided to go home however. Too much trauma. They would be flinching with every one-timer during the game.", |
||||
"Mom: Aww, that's a shame. It wasn't Charles was it? Poor Charles...", |
||||
"Brother: No, Mom, Charles is fine.", |
||||
"Spouse: Close game?", |
||||
"Brother: Hardly. 3-0", |
||||
"Brother: The tornado mascot kept it interesting though, with his kazoo.", |
||||
"Brother: 'Bzzzwoooooo'", |
||||
"Brother: Ah, here's something. A Catholic girl's school came to sing the national anthem.", |
||||
"Brother: You have to imagine these girls were about five to six years old. So it was mind-numbingly cute.", |
||||
"Brother: The stadium was filled with 'awwws' when they approached the mics.", |
||||
"Brother: Well anyways, these girls were out near the mechanical bull before the game started.", |
||||
"Dad: The stadium has a mechanical bull?", |
||||
"Brother: Yup, pay your five dollars and take it for a ride. The operators know their clientele.", |
||||
"Brother: They let young kids 'tame the bull' while they throw the wrath of God down on the teenagers. Cause they know the teens want to flex their muscle.", |
||||
"Brother: I watched one teen tumble backwards over his head and shoulders in one bout.", |
||||
"Brother: The best part though was those little girls I mentioned earlier.", |
||||
"Brother: They surrounded the bull-riding-rink, all dressed in their school outfits.", |
||||
"Brother: 'Ride the bull. Ride the Bull!', They shouted in unison.", |
||||
"Brother: Then when someone got on.", |
||||
"Brother: 'Make them fall, make them fall!'", |
||||
"Mom: Dawwww", |
||||
"Brother: No Mom! Those little girls are evil!", |
||||
"Brother: But, it was definitely a lot of fun to watch."], |
||||
|
||||
"Mom talks about her students and reading over summer vacation": |
||||
["Spouse: Well Mom, how are your students doing?", |
||||
"Mom: Thank you for asking. They are doing well.", |
||||
"Brother: Still teaching the third grade?", |
||||
"Mom: Yessum", |
||||
"Spouse: Soo, lay on the juicy stories.", |
||||
"Mom: Mmmm, well, for the winter break coming up I'm planning on having them read 'The BFG'.", |
||||
"Spouse: oooh, I liked that book.", |
||||
"Brother: Mom, winter break reading is THE reason that students hate their teachers. Can't you let them enjoy their break in peace?", |
||||
"Mom: But reading is fundamental. We can't let our students forget what they learned.", |
||||
"Spouse: It isn't that bad, 'The BFG' is a fun and entertaining book.", |
||||
"Brother: Granted, but forcing one to read kills their love of reading. It did for me.", |
||||
"Brother: After I began reading for fun rather than the school forcing me to do it, I could really appreciate the work for what they are.", |
||||
"Mom: Greg, you are right. But you have to remember that if we don't force kids to do a little reading, they may not do the reading at all.", |
||||
"Mom: I sleep better knowing that my students have been given the opportunity discover works they like, whether or not a little encouragement was given.", |
||||
"Brother: You are an inspiration to us all.", |
||||
"Mom: That's very kind of you to say."], |
||||
|
||||
"Grandmother reveals her name": |
||||
["Grandpa: Lana, did I ever tell you that I am blessed to be married to you?", |
||||
"Grandma: Well, you just know all the right things to say to make a woman feel good.", |
||||
"Brother: Grandma, if you don't mind me asking, I was wondering if your name, 'Lana' had any special meaning in Russian.", |
||||
"Brother: Like, I know some American names, like Mark, are biblical in nature.", |
||||
"Grandma: Ahh, well yes. Very similar", |
||||
"Grandma: Lana is short for Svetlana, which was my given name. I shortened it to 'Lana' because it was easier to pronounce in those parts.", |
||||
"Brother: Sweatlana?", |
||||
"Grandma: Close, but you need to put more 'V' into it.", |
||||
"Grandma: Stalin's daughter was named Svetlana, and so many mothers named their daughters the same in honor.", |
||||
"Grandma: It was be loosely translated to light, and holy. Sort of biblical as you mentioned.", |
||||
"Brother: That's very interesting. Mom, Dad, was there any special reason for naming me Greg?", |
||||
"Mom: Well.", |
||||
"Dad: We looked at a lot baby naming books, and we were having trouble deciding.", |
||||
"Mom: I had a good friend named Greg when I was growing up so I liked that name.", |
||||
"Dad: It sounded good to me, and you ended up a boy, so it worked out.", |
||||
"Brother: So, did the 'Greg' you knew Mom, do anything special or notable? Like, was he famous?", |
||||
"Mom: Uhhh, well, we dated for a while, but it didn't work out.", |
||||
"Brother: Whaat? I'm named after your former lover?! Did you know about this Dad?!", |
||||
"Dad: Yes, but what's the big deal? I still like the name Greg. It's a good strong name.", |
||||
"Brother: I don't think I'll be able to think about my name the same way ever again.", |
||||
"Spouse: Hah ha brother. Sucks to be you. Hah ha!", |
||||
"Spouse: But please Mom and Dad, don't tell ever me how I got my name.", |
||||
"Mom: Ooh, but your name origin is quite special.", |
||||
"Spouse: La la la, I'm not listening!"], |
||||
|
||||
"Grandparents sings a Patriotist song": |
||||
["Grandpa: Since dinner is taking a while, it seems like a good time for a song don't you think?", |
||||
"Dad: Dad, please no...", |
||||
"Grandpa: Ooooh, I saw Mussolini sitting on a log", |
||||
"Grandpa: All puffed up like a great big frog", |
||||
"Grandpa: Sneaked up close and stuck him with a wire", |
||||
"Grandpa: And he just went poof like an old flat tire.", |
||||
"Grandpa: Took his hide and hung it on a tree,", |
||||
"Grandpa: And he said 'hey don't do that to me' ", |
||||
"Grandpa: So I took it on home to my mother in law", |
||||
"Grandpa: She threw me outside with the Turkey in the Straw", |
||||
"Grandma: Oooooh Adolf Hitler grabbed a tail,", |
||||
"Grandma: And he hung right on with tooth and nail,", |
||||
"Grandma: and he saw what he had and he began to swear,", |
||||
"Grandma: On the end of the tail was a Russian bear,", |
||||
"Grandpa: The old bear growled and started in to shake,", |
||||
"Grandma: Adolf knew he'd made a big mistake.", |
||||
"Grandpa: He tried to hang on and he tried to let go ", |
||||
"Grandma: Now they have a new dance called Hitler in the snow. ", |
||||
"Grandpa: Wow, I didn't know you knew that one. ", |
||||
"Grandma: Word travels fast on the front. Just don't let the officers hear you singing it or they'll whoop your ass faster than you can say vodka. ", |
||||
"Grandpa: Advice to keep close at heart."], |
||||
|
||||
"Dad Tells a Bad Dad Joke": |
||||
["Dad: Hey guys, what's the key to a great Thanksgiving dinner?", |
||||
"Mom: Of course it is the loving family?", |
||||
"Brother: I bet it is the pillowy mounds of mashed potatoes.", |
||||
"Spouse: It is the turkey right?", |
||||
"Dad: That's right, its the turKEY", |
||||
"Dad: turKEY, get it?", |
||||
"Spouse: What?", |
||||
"Dad: The KEY to a great thanksgiving dinner is the turKEY.", |
||||
"Spouse: Aww, come on Dad. That's terrible.", |
||||
"Grandma: Is this a joke?", |
||||
"Dad: Yes Mom,", |
||||
"Grandma: Well, what do you mean 'key'.", |
||||
"Dad: 'Key', as in, characteristic, identifying.", |
||||
"Grandma: hmmm, ok. I think I get it.", |
||||
"Dad: Ok...."], |
||||
|
||||
"Mom Butter Story": |
||||
["Mom: My favorite color is butter.", |
||||
"Spouse: That's cool."], |
||||
|
||||
"Cat Story": |
||||
["Cat: Meow Meow Meow Meow Meow", |
||||
"Dad: I think the cat's hungry!", |
||||
"Cat: Meow", |
||||
"Mom: Look at it, poor thing wants some turkey!", |
||||
"Cat: Meow", |
||||
"Cat: (If you turn the oven past 1000 degrees, something fun happens!)"], |
||||
|
||||
"Cat Story II": |
||||
["Cat: Meow Meow Meow!", |
||||
"Mom: What is it, sweetie?", |
||||
"Cat: Meow Meow Meow!", |
||||
"Cat: (Why aren't we cooking fish? I want fish for dinner.)", |
||||
"Mom: Yes sweetie, that's an oven with a turkey inside! We're going to have a nice dinner.", |
||||
"Cat: Meow", |
||||
"Cat: (It's like you don't love me anymore.)", |
||||
"Mom: It'll be done very soon, I promise! You can have a few bites.", |
||||
"Cat: Meow Meow Meow Meow!", |
||||
"Cat: (I don't want turkey, I want fish!)"], |
||||
|
||||
|
||||
"Mom Talks About Her Bathroom Policy and her Students": |
||||
["Mom: I make sure my students are well hydrated and well rested.", |
||||
"Mom: We have 20 minutes of reading time, 20 minutes of sleeping time, and 20 cumulative daily minutes of bathroom time.", |
||||
"Mom: I bring bottles of water and juice on my own dime to make sure the students are at maximum productivity.", |
||||
"Dad: What if someone needs to use the restroom for 30 minutes?", |
||||
"Mom: It doesn't bug me, but the school has some strict bathroom policies. I've gotten in trouble in the past.", |
||||
"Dad: Oh, You never told me about this. What happened honey?", |
||||
"Mom: I didn't want to bother you with the details. But I guess there's no harm in letting you know.", |
||||
"Mom: For a while I allowed all my students to use the bathroom whenever they wanted. They didn't even have to ask. I wanted the students to feel independent.", |
||||
"Mom: But then the administration told me that all students were required to have a bathroom pass. Too many students were skipping class they feared.", |
||||
"Mom: I never lost a student and all my students knew not to abuse their privileges, but I did as I was told.", |
||||
"Mom: I made sure students signed themselves out, wrote their name, signed it, then took the bathroom pass.", |
||||
"Spouse: That seems very efficient. But are the third graders mature enough to get themselves to the bathroom and not goof off?", |
||||
"Mom: Well, every student has their 20 minutes. I don't want to parent them. That's not my job. My job is to teach lessons.", |
||||
"Mom: It seemed to work well. None of my students abused the system.", |
||||
"Mom: But it seemed the administration didn't appreciate the system. They changed the rules once again.", |
||||
"Mom: Now students are only allowed to go to the bathroom once per day. No more than 5 minutes or else I have to go looking for them.", |
||||
"Mom: I told all my students. 'Make sure you use the restroom at recess and before school'. And they did.", |
||||
"Brother: Your students seem very well behaved. I can't even imagine a class of third graders acting as well-mannered as you describe.", |
||||
"Mom: You would be surprised what putting a little trust in a person can do.", |
||||
"Mom: Well, the newest method was working dandy. I wouldn't say it was as good as what we had setup before, but it was fine.", |
||||
"Mom: Less than a week later however, I got another memo.", |
||||
"Mom: 'Students are to be allowed to use the restroom facilities whenever they need.", |
||||
"Dad: They reverted their one-bathroom per child policy?", |
||||
"Mom: I hate to bring this up at the dinner table.", |
||||
"Grandma: Don't be worrying. Tell us the story.", |
||||
"Mom: Sigh, ok. One of the students in the other class, not mine of course, had to use the restroom. But she had already used her one bathroom break.", |
||||
"Mom: So the teacher told her to go back to her seat.", |
||||
"Mom: A while later....", |
||||
"Brother: Ahh geeez, she peed everywhere?", |
||||
"Mom: Greg!", |
||||
"Brother: What? It isn't like this is the first time this has ever happened? I hear about this happening all the time on internet message boards.", |
||||
"Mom: It was certainly a surprise for me!", |
||||
"Dad: I'm sorry to, hehehe, hear that honey.", |
||||
"Mom: This isn't a laughing matter.", |
||||
"Dad: Sorry ma'am."], |
||||
|
||||
"Grandpa tells a story about how a bug crawls in the ear of one of his fellow army buddies during the Korean War": |
||||
["Grandpa: Mmmm mmm, I can't wait to hear the sizzling of that turkey.", |
||||
"Grandma: You never seem to hear when I call you.", |
||||
"Grandpa: That's called selective hearing. My hearing is fine.", |
||||
"Grandpa: Which reminds me of my old friend Jimmy.", |
||||
"Grandma: How is ol' Jimmy?", |
||||
"Grandpa: Deaf in the one ear as usual, but he couldn't be a happier soul. We're going golfing next week.", |
||||
"Mom: I don't believe I've met Jimmy.", |
||||
"Grandpa: He and I go way back. We were GIs together during the Korean War. Then he lost his hearing.", |
||||
"Brother: Was it due to the loudness of the guns? A mortar round? Shrapnel?", |
||||
"Grandpa: I don't know what the media has filled your noggin with, but not all injury in war is glamorous.", |
||||
"Brother: I agree, war is terrible. But, I must say the technology is interesting.", |
||||
"Grandpa: Be glad you don't have to serve and only reap the riches of wartime development.", |
||||
"Grandpa: As for Jimmy, he lost his hearing at camp.", |
||||
"Grandpa: We went to sleep for the night and a beetle bug crawled in his ear.", |
||||
"Grandpa: Tried to fish it out but he ended up crushing it.", |
||||
"Grandpa: Field medics couldn't get all the pieces out, and we were at least two days away from a decent hospital.", |
||||
"Grandpa: The ear got infected and Jimmy lost his hearing soon after.", |
||||
"Grandpa: 'Bug Brain' we used to call him. Great guy.", |
||||
"Spouse: I'm sorry to hear that.", |
||||
"Grandpa: Can't undo the past. Those dang bugs were everywhere though.", |
||||
"Mom: Gross, Gross, Gross. ", |
||||
"Grandpa: It isn't that bad. Be grateful I didn't tell you the story where we ate them. Not bad. A little crunchy. Not as good as turkey though.", |
||||
"Mom: !!!"], |
||||
|
||||
"Story about Spouse's teacher that makes buzzer noises when you got something wrong": |
||||
["Spouse: Greg, here's something that might tinkle your fancy.", |
||||
"Spouse: I saw my old professor from a couple years back, Professor Ronfleur. The Humanities teacher. Do you remember him?", |
||||
"Brother: The guy who always wore the purple bow tie? Who could forget him? Did he buzz you?", |
||||
"Spouse: Ha-ha, no, but that's why I brought it up. That buzz!", |
||||
"Mom: What buzz?", |
||||
"Spouse: I guess we never told you Mom. Remember when we took that humanities class at the local community college during the summer?", |
||||
"Spouse: We were trying to get the lower division English requirements out the way so could take classes at college that were actually worth our time.", |
||||
"Spouse: This Professor Ronfleur used to make a buzzing sound whenever anybody got something wrong.", |
||||
"Spouse: 'In what way does Aristotle disagree with Plato's Allegory of the Cave?' and then...", |
||||
"Spouse: BRRZZZZZZZT!", |
||||
"Spouse: He would make this super nasally buzzing noise.", |
||||
"Brother: Seriously! Whenever I see the guy, I can just imagine pressing his bow tie and a buzzing noise coming out.", |
||||
"Spouse: And he did it ALL. THE. TIME.", |
||||
"Brother: Yeah! Did he say anything to you when he saw you?", |
||||
"Spouse: I said hello and introduced myself, but he didn't know me. Just gave me the glazed ham eye look.", |
||||
"Brother: Glazed ham?", |
||||
"Spouse: For Thanksgiving.", |
||||
"Brother: He gave you the glazed turkey look.", |
||||
"Spouse: Exactly."], |
||||
|
||||
"Brother's Fiancee is on Business Trip": |
||||
["Mom: Greg, where's your fiancee? Why didn't you invite her over for Thanksgiving dinner?", |
||||
"Brother: I did invite her, but she couldn't make it. She is on a business trip and could not get the time off.", |
||||
"Mom: A business trip on Thanksgiving? But Thanksgiving only happens once per year! This is the perfect time to rekindle the spirit of family.", |
||||
"Brother: I know Mom, but Thanksgiving doesn't happen everywhere, and her job in sales demands that she travel abroad to meet with potential clients in person.", |
||||
"Brother: I miss her a lot when she leaves, but whenever she returns home, we make every moment count. We count our blessings every day.", |
||||
"Mom: Amen", |
||||
"Brother: Though, it is too bad that since we're both so busy all the time, our new house remains largely unoccupied throughout the day.", |
||||
"Mom: Awww honey, I'll have to come and visit.", |
||||
"Brother: uh, well yeah, sure Mom. You can come and visit.", |
||||
"Grandpa: What!? I want to come and see your new place too.", |
||||
"Brother: Sure...yeah ok.", |
||||
"Spouse: You aren't going to invite me?", |
||||
"Brother: Yes, definitely. Everyone can come and visit. Just... I don't want to stress out my fiancee when she comes home.", |
||||
"Brother: She likes to relax at home.", |
||||
"Mom: Don't worry honey, we won't stress her out. I'll make her my delicious breakfast omelet.", |
||||
"Grandpa: And I'll tell her my war stories.", |
||||
"Brother: Oh, good..."], |
||||
|
||||
"Turkey Fact - Snood":
|
||||
["Turkey: Gobble Gobble. Turkeys have a fleshy bit that comes off their forehead called the snood. Turkey farmers will occasional remove the snood, in a process called 'de-snooding'.", |
||||
"Turkey: Male turkeys like their snood intact to attract a mate, and for dominance. Be kind to your turkey. Do not lose the snood."], |
||||
|
||||
"Turkey Fact - Cat Puns":
|
||||
["Turkey: Gobble Gobble. I suppose it is too late to ask you not to eat me. But is it too late to ask for you to kick that cat?", |
||||
"Cat: Hey Turkey, it has been a long time. I see you're dead.", |
||||
"Turkey: Kasey, how dare you speak to me. First, you steal my plans for world domination and now you gloat at my passing. For shame.", |
||||
"Cat: It isn't my fault you taste so delicious. I'm going to delight in eating your flesh. Maybe if I beg enough they may give me your head on a platter.", |
||||
"Turkey: Oooh, don't get me fired up.", |
||||
"Cat: Meow meow meow! The oven is doing that quite nicely.", |
||||
"Turkey: Ga-Gobble!", |
||||
"Cat: Meow Meow", |
||||
"Dad: Aww Kasey, aren't you a cute little kitty."], |
||||
|
||||
"Turkey Fact - Wattle": |
||||
["Turkey: Hey, it is time for another turkey fact.", |
||||
"Turkey: Most people will recognize the wattle on a chicken as that piece of red flesh that hangs down from the beak.", |
||||
"Turkey: But did you know turkeys have them too?", |
||||
"Turkey: I personally believe they are much sexier on a turkey than a chicken anyhow. And you can bet a fine wattle will attract the hen's attention.", |
||||
"Turkey: Gobble Gobble"], |
||||
|
||||
"Turkey Fact - Unsuscribe": |
||||
["Turkey: I hope I'm worth it. But hey, now you can listen to a wonderful fact about turkeys.", |
||||
"Turkey: Turkeys are members of the order Galliformes. That means we share relations to other birds like the chicken and pheasant.", |
||||
"Turkey: To unsubscribe from Turkey facts, please gobble like a turkey into the microphone.", |
||||
"Turkey: 'Gobble' in 3", |
||||
"Turkey: 2", |
||||
"Turkey: 1", |
||||
"Turkey: Now Recording...", |
||||
"Turkey: I'm sorry, we didn't recognize your dialect. Please try again soon.", |
||||
"Turkey: You are now automatically renewed for another full year of Turkey Facts", |
||||
"Turkey: Please have a nice day."], |
||||
|
||||
"Turkey Fact - genus": |
||||
["Turkey: My friend, welcome to another fantastic turkey fact!", |
||||
"Turkey: Today we're learning that turkeys are in the genus Meleagris.", |
||||
"Turkey: This is probably useless information for you. Good!", |
||||
"Turkey: Until next time."], |
||||
|
||||
"Turkey Fact - gobble": |
||||
["Turkey: The turkey is often associated with the gobble sound. But that is just sexist.", |
||||
"Turkey: Only male turkeys gobble. Females instead make cooing and clicking noises. Put an end to stereotypes!"], |
||||
|
||||
"Turkey Fact - poult": |
||||
["Turkey: Don't eat me, I have children. Zillions of children.", |
||||
"Turkey: But since we're talking about children, did you know that a young turkey is called a poult?", |
||||
"Turkey: Now you do.", |
||||
"Turkey: By the way, the best way to cook a turkey is to not at all."], |
||||
|
||||
"Turkey Fact - World Dominination": |
||||
["Turkey: Hey Kasey.", |
||||
"Cat: What may I do for you juicy?", |
||||
"Turkey: Don't piss off turkeys or they'll gang up on you.", |
||||
"Turkey: That's because a group of turkeys is called a gang.", |
||||
"Turkey: A turkey group may also be called a rafter.", |
||||
"Turkey: I'm more of a kayaker personally.", |
||||
"Cat: Get meowta here.", |
||||
"Turkey: That pun was fowl.", |
||||
"Cat: Purrrsonally, not as bad as yours.", |
||||
"Turkey: Gobble Gobble"] |
||||
|
||||
}; |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 566 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 433 KiB |
After Width: | Height: | Size: 278 KiB |
After Width: | Height: | Size: 319 KiB |
After Width: | Height: | Size: 327 KiB |
After Width: | Height: | Size: 304 KiB |
After Width: | Height: | Size: 295 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 298 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 4.4 MiB |
After Width: | Height: | Size: 166 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 137 KiB |
After Width: | Height: | Size: 370 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 807 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 968 KiB |
After Width: | Height: | Size: 30 KiB |