From c348e811e6ab280b16c8e793b8c3115bcc95dcd2 Mon Sep 17 00:00:00 2001 From: Ben Goldsworthy Date: Tue, 23 Jun 2020 23:25:20 +0100 Subject: [PATCH] Initial commit --- LICENSE | 674 +++++++++++++++++++++++++++++++++ doc/GameBoard.html | 448 ++++++++++++++++++++++ doc/GameSquare.html | 496 ++++++++++++++++++++++++ doc/allclasses-frame.html | 19 + doc/allclasses-noframe.html | 19 + doc/constant-values.html | 109 ++++++ doc/deprecated-list.html | 109 ++++++ doc/help-doc.html | 198 ++++++++++ doc/index-all.html | 190 ++++++++++ doc/index.html | 30 ++ doc/package-frame.html | 20 + doc/package-list | 1 + doc/package-summary.html | 128 +++++++ doc/resources/background.gif | Bin 0 -> 2313 bytes doc/resources/tab.gif | Bin 0 -> 291 bytes doc/resources/titlebar.gif | Bin 0 -> 10701 bytes doc/resources/titlebar_end.gif | Bin 0 -> 849 bytes doc/serialized-form.html | 198 ++++++++++ doc/stylesheet.css | 474 +++++++++++++++++++++++ media/img/0.png | Bin 0 -> 220 bytes media/img/1.png | Bin 0 -> 286 bytes media/img/2.png | Bin 0 -> 467 bytes media/img/3.png | Bin 0 -> 483 bytes media/img/4.png | Bin 0 -> 402 bytes media/img/5.png | Bin 0 -> 467 bytes media/img/6.png | Bin 0 -> 489 bytes media/img/7.png | Bin 0 -> 404 bytes media/img/8.png | Bin 0 -> 492 bytes media/img/9.png | Bin 0 -> 480 bytes media/img/LICENSE | 1 + media/img/blank.png | Bin 0 -> 224 bytes media/img/bomb.png | Bin 0 -> 575 bytes media/img/flag.png | Bin 0 -> 313 bytes src/Driver.java | 7 + src/GameBoard.java | 107 ++++++ src/GameSquare.java | 52 +++ src/SmartSquare.java | 111 ++++++ 37 files changed, 3391 insertions(+) create mode 100755 LICENSE create mode 100755 doc/GameBoard.html create mode 100755 doc/GameSquare.html create mode 100755 doc/allclasses-frame.html create mode 100755 doc/allclasses-noframe.html create mode 100755 doc/constant-values.html create mode 100755 doc/deprecated-list.html create mode 100755 doc/help-doc.html create mode 100755 doc/index-all.html create mode 100755 doc/index.html create mode 100755 doc/package-frame.html create mode 100755 doc/package-list create mode 100755 doc/package-summary.html create mode 100755 doc/resources/background.gif create mode 100755 doc/resources/tab.gif create mode 100755 doc/resources/titlebar.gif create mode 100755 doc/resources/titlebar_end.gif create mode 100755 doc/serialized-form.html create mode 100755 doc/stylesheet.css create mode 100755 media/img/0.png create mode 100755 media/img/1.png create mode 100755 media/img/2.png create mode 100755 media/img/3.png create mode 100755 media/img/4.png create mode 100755 media/img/5.png create mode 100755 media/img/6.png create mode 100755 media/img/7.png create mode 100755 media/img/8.png create mode 100755 media/img/9.png create mode 100755 media/img/LICENSE create mode 100755 media/img/blank.png create mode 100755 media/img/bomb.png create mode 100755 media/img/flag.png create mode 100755 src/Driver.java create mode 100755 src/GameBoard.java create mode 100755 src/GameSquare.java create mode 100755 src/SmartSquare.java diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000..78df873 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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. + + + Copyright (C) + + 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 . + +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: + + Copyright (C) + 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 +. + + 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 +. diff --git a/doc/GameBoard.html b/doc/GameBoard.html new file mode 100755 index 0000000..3a7f3de --- /dev/null +++ b/doc/GameBoard.html @@ -0,0 +1,448 @@ + + + + + +GameBoard + + + + + + + + + + + +
+

Class GameBoard

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.awt.Component
    • +
    • +
        +
      • java.awt.Container
      • +
      • +
          +
        • java.awt.Window
        • +
        • +
            +
          • java.awt.Frame
          • +
          • +
              +
            • javax.swing.JFrame
            • +
            • +
                +
              • GameBoard
              • +
              +
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
    +
    +
    +
    +
    public class GameBoard
    +extends javax.swing.JFrame
    +implements java.awt.event.ActionListener
    +
    This class provides a graphical model of a board game. + The class creates a rectangular panel of clickable squares, + of type SmartSquare. If a square is clicked by the user, a + callback method is invoked upon the corresponding SmartSquare instance. + The class is intended to be used as a basis for tile based games.
    +
    See Also:
    Serialized Form
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class javax.swing.JFrame

        +javax.swing.JFrame.AccessibleJFrame
      • +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.awt.Frame

        +java.awt.Frame.AccessibleAWTFrame
      • +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.awt.Window

        +java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
      • +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.awt.Container

        +java.awt.Container.AccessibleAWTContainer
      • +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.awt.Component

        +java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class javax.swing.JFrame

        +accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
      • +
      +
        +
      • + + +

        Fields inherited from class java.awt.Frame

        +CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
      • +
      +
        +
      • + + +

        Fields inherited from class java.awt.Component

        +BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • +
      +
        +
      • + + +

        Fields inherited from interface javax.swing.WindowConstants

        +DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
      • +
      +
        +
      • + + +

        Fields inherited from interface java.awt.image.ImageObserver

        +ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      GameBoard(java.lang.String title, + int width, + int height) +
      Create a new game board of the given size.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      voidactionPerformed(java.awt.event.ActionEvent e) 
      GameSquaregetSquareAt(int x, + int y) +
      Returns the GameSquare instance at a given location.
      +
      +
        +
      • + + +

        Methods inherited from class javax.swing.JFrame

        +addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
      • +
      +
        +
      • + + +

        Methods inherited from class java.awt.Frame

        +addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
      • +
      +
        +
      • + + +

        Methods inherited from class java.awt.Window

        +addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
      • +
      +
        +
      • + + +

        Methods inherited from class java.awt.Container

        +add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
      • +
      +
        +
      • + + +

        Methods inherited from class java.awt.Component

        +action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
        +
      • + + +

        Methods inherited from interface java.awt.MenuContainer

        +getFont, postEvent
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        GameBoard

        +
        public GameBoard(java.lang.String title,
        +         int width,
        +         int height)
        +
        Create a new game board of the given size. + As soon as an instance of this class is created, it is visualized + on the screen.
        +
        Parameters:
        title - the name printed in the window bar.
        width - the width of the game area, in squares.
        height - the height of the game area, in squares.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getSquareAt

        +
        public GameSquare getSquareAt(int x,
        +                     int y)
        +
        Returns the GameSquare instance at a given location.
        +
        Parameters:
        x - the x co-ordinate of the square requested.
        y - the y co-ordinate of the square requested.
        +
        Returns:
        the GameSquare instance at a given location + if the x and y co-ordinates are valid - null otherwise.
        +
      • +
      + + + +
        +
      • +

        actionPerformed

        +
        public void actionPerformed(java.awt.event.ActionEvent e)
        +
        +
        Specified by:
        +
        actionPerformed in interface java.awt.event.ActionListener
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/GameSquare.html b/doc/GameSquare.html new file mode 100755 index 0000000..ba61e43 --- /dev/null +++ b/doc/GameSquare.html @@ -0,0 +1,496 @@ + + + + + +GameSquare + + + + + + + + + + + +
+

Class GameSquare

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.awt.Component
    • +
    • +
        +
      • java.awt.Container
      • +
      • +
          +
        • javax.swing.JComponent
        • +
        • +
            +
          • javax.swing.AbstractButton
          • +
          • +
              +
            • javax.swing.JButton
            • +
            • +
                +
              • GameSquare
              • +
              +
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants
    +
    +
    +
    +
    public abstract class GameSquare
    +extends javax.swing.JButton
    +
    This class provides a representation of a single game square. + The class is abstract, and should be extended to provide domain + specific functionality.
    +
    See Also:
    Serialized Form
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class javax.swing.JButton

        +javax.swing.JButton.AccessibleJButton
      • +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class javax.swing.AbstractButton

        +javax.swing.AbstractButton.AccessibleAbstractButton, javax.swing.AbstractButton.ButtonChangeListener
      • +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class javax.swing.JComponent

        +javax.swing.JComponent.AccessibleJComponent
      • +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.awt.Container

        +java.awt.Container.AccessibleAWTContainer
      • +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.awt.Component

        +java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeField and Description
      protected GameBoardboard +
      The GameBoard upon which this GameSquare resides.
      +
      protected intxLocation +
      The x co-ordinate of this square.
      +
      protected intyLocation +
      The y co-ordinate of this square.
      +
      +
        +
      • + + +

        Fields inherited from class javax.swing.AbstractButton

        +actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
      • +
      +
        +
      • + + +

        Fields inherited from class javax.swing.JComponent

        +accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • +
      +
        +
      • + + +

        Fields inherited from class java.awt.Component

        +BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • +
      +
        +
      • + + +

        Fields inherited from interface javax.swing.SwingConstants

        +BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
      • +
      +
        +
      • + + +

        Fields inherited from interface java.awt.image.ImageObserver

        +ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      GameSquare(int x, + int y, + java.lang.String filename, + GameBoard board) +
      Create a new GameSquare, which can be placed on a GameBoard.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      abstract voidclicked() +
      A method that is invoked when a user clicks on this square.
      +
      voidsetImage(java.lang.String filename) +
      Change the image displayed by this square to the given bitmap.
      +
      +
        +
      • + + +

        Methods inherited from class javax.swing.JButton

        +getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUI
      • +
      +
        +
      • + + +

        Methods inherited from class javax.swing.AbstractButton

        +actionPropertyChanged, addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setEnabled, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
      • +
      +
        +
      • + + +

        Methods inherited from class javax.swing.JComponent

        +addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
      • +
      +
        +
      • + + +

        Methods inherited from class java.awt.Container

        +add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTree
      • +
      +
        +
      • + + +

        Methods inherited from class java.awt.Component

        +action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        xLocation

        +
        protected int xLocation
        +
        The x co-ordinate of this square.
        +
      • +
      + + + +
        +
      • +

        yLocation

        +
        protected int yLocation
        +
        The y co-ordinate of this square.
        +
      • +
      + + + +
        +
      • +

        board

        +
        protected GameBoard board
        +
        The GameBoard upon which this GameSquare resides.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        GameSquare

        +
        public GameSquare(int x,
        +          int y,
        +          java.lang.String filename,
        +          GameBoard board)
        +
        Create a new GameSquare, which can be placed on a GameBoard.
        +
        Parameters:
        x - the x co-ordinate of this square on the game board.
        y - the y co-ordinate of this square on the game board.
        board - the GameBoard upon which this square resides.
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setImage

        +
        public void setImage(java.lang.String filename)
        +
        Change the image displayed by this square to the given bitmap.
        +
        Parameters:
        filename - the filename of the image to display.
        +
      • +
      + + + +
        +
      • +

        clicked

        +
        public abstract void clicked()
        +
        A method that is invoked when a user clicks on this square.
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/doc/allclasses-frame.html b/doc/allclasses-frame.html new file mode 100755 index 0000000..d3be73a --- /dev/null +++ b/doc/allclasses-frame.html @@ -0,0 +1,19 @@ + + + + + +All Classes + + + + +

All Classes

+ + + diff --git a/doc/allclasses-noframe.html b/doc/allclasses-noframe.html new file mode 100755 index 0000000..c98c107 --- /dev/null +++ b/doc/allclasses-noframe.html @@ -0,0 +1,19 @@ + + + + + +All Classes + + + + +

All Classes

+ + + diff --git a/doc/constant-values.html b/doc/constant-values.html new file mode 100755 index 0000000..89e407b --- /dev/null +++ b/doc/constant-values.html @@ -0,0 +1,109 @@ + + + + + +Constant Field Values + + + + + + + + + + +
+

Constant Field Values

+

Contents

+
+ + + + + + diff --git a/doc/deprecated-list.html b/doc/deprecated-list.html new file mode 100755 index 0000000..8da6edc --- /dev/null +++ b/doc/deprecated-list.html @@ -0,0 +1,109 @@ + + + + + +Deprecated List + + + + + + + +
+ + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + +
+ + + + diff --git a/doc/help-doc.html b/doc/help-doc.html new file mode 100755 index 0000000..92e1c2c --- /dev/null +++ b/doc/help-doc.html @@ -0,0 +1,198 @@ + + + + + +API Help + + + + + + + +
+ + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    +
      +
    • Interfaces (italic)
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
  • +
  • +

    Class/Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class inheritance diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class/interface declaration
    • +
    • Class/interface description
    • +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
      +
    • Field Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
  • +
  • +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type declaration
    • +
    • Annotation Type description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
  • +
  • +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum declaration
    • +
    • Enum description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
  • +
  • +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
  • +
  • +

    Index

    +

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    +
  • +
  • +

    Prev/Next

    +

    These links take you to the next or previous class, interface, package, or related page.

    +
  • +
  • +

    Frames/No Frames

    +

    These links show and hide the HTML frames. All pages are available with or without frames.

    +
  • +
  • +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
  • +
  • +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
  • +
  • +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
  • +
+This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + +
+ + + + diff --git a/doc/index-all.html b/doc/index-all.html new file mode 100755 index 0000000..e3b522d --- /dev/null +++ b/doc/index-all.html @@ -0,0 +1,190 @@ + + + + + +Index + + + + + + + +
+ + + + + +
+ + +
A B C G S X Y  + + +

A

+
+
actionPerformed(ActionEvent) - Method in class GameBoard
+
 
+
+ + + +

B

+
+
board - Variable in class GameSquare
+
+
The GameBoard upon which this GameSquare resides.
+
+
+ + + +

C

+
+
clicked() - Method in class GameSquare
+
+
A method that is invoked when a user clicks on this square.
+
+
+ + + +

G

+
+
GameBoard - Class in <Unnamed>
+
+
This class provides a graphical model of a board game.
+
+
GameBoard(String, int, int) - Constructor for class GameBoard
+
+
Create a new game board of the given size.
+
+
GameSquare - Class in <Unnamed>
+
+
This class provides a representation of a single game square.
+
+
GameSquare(int, int, String, GameBoard) - Constructor for class GameSquare
+
+
Create a new GameSquare, which can be placed on a GameBoard.
+
+
getSquareAt(int, int) - Method in class GameBoard
+
+
Returns the GameSquare instance at a given location.
+
+
+ + + +

S

+
+
setImage(String) - Method in class GameSquare
+
+
Change the image displayed by this square to the given bitmap.
+
+
+ + + +

X

+
+
xLocation - Variable in class GameSquare
+
+
The x co-ordinate of this square.
+
+
+ + + +

Y

+
+
yLocation - Variable in class GameSquare
+
+
The y co-ordinate of this square.
+
+
+A B C G S X Y 
+ +
+ + + + + +
+ + + + diff --git a/doc/index.html b/doc/index.html new file mode 100755 index 0000000..4c3a06c --- /dev/null +++ b/doc/index.html @@ -0,0 +1,30 @@ + + + + + +Generated Documentation (Untitled) + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="GameBoard.html">Non-frame version</a>.</p> + + + diff --git a/doc/package-frame.html b/doc/package-frame.html new file mode 100755 index 0000000..c6e0572 --- /dev/null +++ b/doc/package-frame.html @@ -0,0 +1,20 @@ + + + + + +&lt;Unnamed&gt; + + + + +

<Unnamed>

+
+

Classes

+ +
+ + diff --git a/doc/package-list b/doc/package-list new file mode 100755 index 0000000..d3f5a12 --- /dev/null +++ b/doc/package-list @@ -0,0 +1 @@ + diff --git a/doc/package-summary.html b/doc/package-summary.html new file mode 100755 index 0000000..b6b8419 --- /dev/null +++ b/doc/package-summary.html @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + +
+

Package <Unnamed>

+
+
+
    +
  • + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    GameBoard +
    This class provides a graphical model of a board game.
    +
    GameSquare +
    This class provides a representation of a single game square.
    +
    +
  • +
+
+ + + + + + diff --git a/doc/resources/background.gif b/doc/resources/background.gif new file mode 100755 index 0000000000000000000000000000000000000000..f471940fde2f39ef8943a6af9569bcf986b1579b GIT binary patch literal 2313 zcmV+k3HJ6!Nk%w1VKM-40OkMy00030|NlK(aXwsfKV5S}VtGJbbVOr%L0@%CZH88Q zl{{NzcR^uxNo<2iYk@pjY)*5FJz8x~bc{)B zfk z+1T6M-s9WdW8dcJ-wO*3@9+W*5AY543-j^$^!EPz_4eHZ2#>)41`h@dc!2OAgN6$a zCS2I?;lqgx6IR4nkpTe;1RN0f=zxMq2O=q`94V5d$&e>Unta)^<;;^G3>e7yp=ZvW z6DIW3xpSvaogXF?_4%`@(V;s}NR^5J!3hrtJV@1QRV&r5S*L!zYE|rss${iFkg&!? zTN5V#)~=bmMorwgZsEpdOE)iExo+FO-8;8Kga{=HbSQCnF=E6W3?o*|ID%uwi5**> zJXy127Y9m+=HQ|P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L^#3Q{ z&uBM5|34IKI>0_Tz{5OngXe#6w*N6;;5PH%9n%56%RaWA{wJ4%515Apdj`a62bp<> zM12OuV+QZ^55ATkViO(UWgg}%9C}kb^r~=BiDyWIXZWM&kb>Q?dd$#W`4KU|2#4qh zz;sZ>ZqS5h#Kdk$&1c9AHmDUdtmHE)CqH0RIAZEE;t(^+RXF+*FlJyk;?6Vn{&MsO zZ0HwY)b4Va!F1#s^N5$-s9(&mPa*Lu4>4SxXm~l|3?PR2jB1J!Q|(4#0i$lFME^-r zA~Q(2O+PHOdcVN((R8zqi>%+yx4PA5u&+jI zZ?)Fm8m-+`n!Bnrx0PvZE7!Q)Z+NTE@K(R!nO40sZF(n~bq_b_9H`UYU#q>pPJ3UC z_UeU>J7qcy%%`ks9)BNcS^GDOn z?oKkjHNoWO1e2?M#vd12e^_AscAnLnc~-CISiYWX`D%{k^H~<37unpMYJYdSv=Om2vbAM@`Qp{{SI=yP zj6WN*eEt0G$9EPX6FU%)-ho>hWTW!yzXBIo73<0umM-=@eG&niY^` zlG(|vuCl_x(X^Fob@=i{8+M5vWf7Bz=#aHGTNA;fZQyfbfueI8Z^639n`(DI%w^-^ zl`=@!u)r~Xf920-xd$Ab+S&PJY%K0H8a_J8uN3^_!K1_NV$*e#*Y*6|)XpiW=9H`*`Xx7W%v@7{XDma1?v0a%(K6rI&1!a YpWXKgmku8Vj|K)Vje`mzEKCg608Q#dYybcN literal 0 HcmV?d00001 diff --git a/doc/serialized-form.html b/doc/serialized-form.html new file mode 100755 index 0000000..1992475 --- /dev/null +++ b/doc/serialized-form.html @@ -0,0 +1,198 @@ + + + + + +Serialized Form + + + + + + + + + + +
+

Serialized Form

+
+
+
    +
  • +

    Package &lt;Unnamed&gt;

    +
      +
    • + + +

      Class GameBoard extends javax.swing.JFrame implements Serializable

      +
        +
      • + + +

        Serialized Fields

        +
          +
        • +

          boardPanel

          +
          javax.swing.JPanel boardPanel
          +
        • +
        • +

          boardHeight

          +
          int boardHeight
          +
        • +
        • +

          boardWidth

          +
          int boardWidth
          +
        • +
        • +

          board

          +
          GameSquare[][] board
          +
        • +
        +
      • +
      +
    • +
    • + + +

      Class GameSquare extends javax.swing.JButton implements Serializable

      +
        +
      • + + +

        Serialized Fields

        +
          +
        • +

          xLocation

          +
          int xLocation
          +
          The x co-ordinate of this square.
          +
        • +
        • +

          yLocation

          +
          int yLocation
          +
          The y co-ordinate of this square.
          +
        • +
        • +

          board

          +
          GameBoard board
          +
          The GameBoard upon which this GameSquare resides.
          +
        • +
        +
      • +
      +
    • +
    • + + +

      Class SmartSquare extends GameSquare implements Serializable

      +
        +
      • + + +

        Serialized Fields

        +
          +
        • +

          thisSquareHasBomb

          +
          boolean thisSquareHasBomb
          +
        • +
        • +

          displayed

          +
          boolean displayed
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+ + + + + + diff --git a/doc/stylesheet.css b/doc/stylesheet.css new file mode 100755 index 0000000..0e0d70c --- /dev/null +++ b/doc/stylesheet.css @@ -0,0 +1,474 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ +body { + background-color:#ffffff; + color:#353833; + font-family:Arial, Helvetica, sans-serif; + font-size:76%; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4c6b87; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4c6b87; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-size:1.3em; +} +h1 { + font-size:1.8em; +} +h2 { + font-size:1.5em; +} +h3 { + font-size:1.4em; +} +h4 { + font-size:1.3em; +} +h5 { + font-size:1.2em; +} +h6 { + font-size:1.1em; +} +ul { + list-style-type:disc; +} +code, tt { + font-size:1.2em; +} +dt code { + font-size:1.2em; +} +table tr td dt code { + font-size:1.2em; + vertical-align:top; +} +sup { + font-size:.6em; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:.8em; + z-index:200; + margin-top:-7px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + background-image:url(resources/titlebar.gif); + background-position:left top; + background-repeat:no-repeat; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:1em; + margin:0; +} +.topNav { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.bottomNav { + margin-top:10px; + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.subNav { + background-color:#dee3e9; + border-bottom:1px solid #9eadc0; + float:left; + width:100%; + overflow:hidden; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding:3px 6px; +} +ul.subNavList li{ + list-style:none; + float:left; + font-size:90%; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; +} +.navBarCell1Rev { + background-image:url(resources/tab.gif); + background-color:#a88834; + color:#FFFFFF; + margin: auto 5px; + border:1px solid #c9aa44; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader h1 { + font-size:1.3em; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 25px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:1.2em; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:1.0em; +} +.indexContainer h2 { + font-size:1.1em; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:1.1em; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:10px 0 10px 20px; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:25px; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #9eadc0; + background-color:#f9f9f9; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:1px solid #9eadc0; + border-top:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; + border-bottom:1px solid #9eadc0; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.contentContainer table, .classUseContainer table, .constantValuesContainer table { + border-bottom:1px solid #9eadc0; + width:100%; +} +.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table { + width:100%; +} +.contentContainer .description table, .contentContainer .details table { + border-bottom:none; +} +.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{ + vertical-align:top; + padding-right:20px; +} +.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast, +.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast, +.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne, +.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne { + padding-right:3px; +} +.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#FFFFFF; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + margin:0px; +} +caption a:link, caption a:hover, caption a:active, caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span { + white-space:nowrap; + padding-top:8px; + padding-left:8px; + display:block; + float:left; + background-image:url(resources/titlebar.gif); + height:18px; +} +.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd { + width:10px; + background-image:url(resources/titlebar_end.gif); + background-repeat:no-repeat; + background-position:top right; + position:relative; + float:left; +} +ul.blockList ul.blockList li.blockList table { + margin:0 0 12px 0px; + width:100%; +} +.tableSubHeadingColor { + background-color: #EEEEFF; +} +.altColor { + background-color:#eeeeef; +} +.rowColor { + background-color:#ffffff; +} +.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td { + text-align:left; + padding:3px 3px 3px 7px; +} +th.colFirst, th.colLast, th.colOne, .constantValuesContainer th { + background:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + text-align:left; + padding:3px 3px 3px 7px; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +td.colFirst, th.colFirst { + border-left:1px solid #9eadc0; + white-space:nowrap; +} +td.colLast, th.colLast { + border-right:1px solid #9eadc0; +} +td.colOne, th.colOne { + border-right:1px solid #9eadc0; + border-left:1px solid #9eadc0; +} +table.overviewSummary { + padding:0px; + margin-left:0px; +} +table.overviewSummary td.colFirst, table.overviewSummary th.colFirst, +table.overviewSummary td.colOne, table.overviewSummary th.colOne { + width:25%; + vertical-align:middle; +} +table.packageSummary td.colFirst, table.overviewSummary th.colFirst { + width:25%; + vertical-align:middle; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:.9em; +} +.block { + display:block; + margin:3px 0 0 0; +} +.strong { + font-weight:bold; +} diff --git a/media/img/0.png b/media/img/0.png new file mode 100755 index 0000000000000000000000000000000000000000..592780e3da44f4cdde2ed12d6e2ef8d9a5c2b8b0 GIT binary patch literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VORaNK58i3|2o;~Z z#&~D0p&M6BHsgh$Q{Jp%5ebd|8)V-V)_i-DJ&D1bJKU_9Y9in8)SB!LVe?tON2kQTOa@O^KbLh*2~7a7on#CE literal 0 HcmV?d00001 diff --git a/media/img/2.png b/media/img/2.png new file mode 100755 index 0000000000000000000000000000000000000000..e68d0524172c7da2d4f9419e600f32ad75f76573 GIT binary patch literal 467 zcmV;^0WAKBP)UqK~y-6)zz^}0%07+@$aP|DTsrLF4s_Qwlp}j>L6m}c%%3S zI6LX=D2S7Y9vukk)Fy}+v;<+zG&( zEyfHW%Q8Nn&k!^i43H#g0g9q%82rr6R+PU4&8rF~lNqg+O1rJ%c3Vj#4skknm)7f^ za5S0_2%J+cKj8N}>2{w9hwEtC@`s@d*6WXG+MH_jgm~PKqC}a^G@8w)rE7Gr9E%+g z42qac0sw-rXv5*_W}wSu#pSYo^%bSZc>G2*y1yCtJ&MvJmAa%@4CD3MjDe-nJ(v}1a-|CD!DYd=sCs52>MY6^2`bd^>Z{% zSkXxBE|R~!L^m=)HhjR_vA6Yv`B<1rK1=_`A&3(Cv1wBNIeJ(92y*Z5L8E=1!O7X$ z6-$XIfRo;W!6z;DuZv{Zow*dl(5?ziZ&@|GgKFn4-Vz=e{)}MIN zfEC%fhS?iLdwC`oIjKLp5tP5VARF5Ml2o$TD5uocKxt^4%$bkUQ>;4RE=1ws8spSL z-7^h$s2f)3S>ECGXcH}ygi?{d^*s!Vvo#RFYqFg@p!y#D3M42Akg72 Z-~*gBVX}Tgh<5-0002ovPDHLkV1kEv$$tO< literal 0 HcmV?d00001 diff --git a/media/img/4.png b/media/img/4.png new file mode 100755 index 0000000000000000000000000000000000000000..8c9f17486f8c3c8abf42ed70dd50c540c68a5ff4 GIT binary patch literal 402 zcmV;D0d4+?P)kfVmtD?H@}?Z=A0{l0!1Z+NOb_u^RR8Z z7UugtuIp+#fRqv`rGg$oQ=5e>c=Aws})7FS$Ve- z6miV+aLD^?Mq!%u!KcZD%yG#2{Ynf#FFQ0g8}9deUbov{VWpsmV;Z9o>0p4dUSG2$ z!PxC6EQ`F`y|KeICGYjnq6j03u33_x9}eX0_U&NNYVo#Qe#xv(hmY}?%yE9~L;0kX wKFarcshAS@56eLZ2!fzC6ow%H0>xjzC#-@`TUqK~y-6)s;_+K~WgSf9E>>%+xfc#6s?hC1qo;l$Go(xrhaUnS4hI0VhbX`3=|E{^aQ6Gi`TVMO$mK8t0eirgY8A2D zVTMAN+A)){pHMCqY?@6@iG-CEu((5QwL%yMUy%sTUJp5)S_1DTl#2yu8t>^err(cq zG~$>_v28TK;rM$()9YnlDq#$VY}#!;#$%j=0iI^__Eh(Pr+A!Qxy;$^{y9L``AjB} zlZic`tJ}p>uU|K;*PLQ8dq6W7 zfiO+BwHl_+XAcOlFBaJsi&nOa{>gGsN?rDuT`8pi5Ip${_y$^* zSPlCF_D>iMGuaNrW^gMOgP>v%EC%7qk_-NT%{%WF1`A_%GPUfRKhKNL_X*GA0c_4V z0zjkDK$hi`AYIofm&;$EEX%~>@sq$nAOL{(B;}VmJ187X*fxPy3t>3KOeWc>Dt0jF z7(duhs#dwE*V)Hnh}|xsQVA^UI8c~Q5qmw>n#Oyj!n)bSibN156X!E-pxEhPq|;cp zxA+zdY)N9(Zo6*e+R*#@iYmLs(){2hr^i3Bu1eCfSF2RB z&cDlQt+Xkce?ETSO4hK{d46A}dG9lm_PSpC^0J&){>B9}d?qXoTal`q) zYd43pzgTnq#KR4SbImT?%R9L|SavmAfY%xo$E>=uZVM{yoC7~d@N8-5b*}vKyXH<_ wl)(@4(~74zJ-4e4&z!}i(6Fg=P1iogr+tA62m8W8fFa1>>FVdQ&MBb@0A6XLp8x;= literal 0 HcmV?d00001 diff --git a/media/img/8.png b/media/img/8.png new file mode 100755 index 0000000000000000000000000000000000000000..f4e1c476533d147ee31ae5e6a8b002a50f111639 GIT binary patch literal 492 zcmV0%07-Kli6QjW`9}8g9|0C1|NdFcI+`)FizC zU%`zoy#z6WXv)@TYiSZ38k|xd&+TxMAVa!4^Jx&G!9R4m^qs%I&-39Kem@0}Y%w}O zv)RP9?TtV}2r8Az9BA7%*=%+rpzr$ts2fohWa~hEZ6gRUo}SogwFpWj!dwp2Ab-wkCvj^g{Mo;QEM z^H8Kj8b&n3+5SEs^*V`ind#vndZ)wq<_2k5(SYi3NUYHy%;yPDPr)>aU0o5LoFJ3Q z#WSmb=G`64W{hud`MkK`{r(Emu0Va;a#BtWue)3P2gAn3p ipGA!j0sw_ApMY(m!-e$oc#XJd6JWyBY+)Oj08}t)sSWR zB9N-8D2lQN%Cbx-6uJm#v)KSJT}1gMR|iVx3SujK@9%5_0UVVIx5c7yLwmD{n9Uf!y@4dL%w~BE23e(2te>C%ZfO4eWEF{kv_E&} zaIkrL!u;`Zbmk;bce}B4I)}AbE|I!j%>BMG;6hOl!y(R0279ByT{?~Ka)GWJH1v8I zw_4~P50-YDMJ~rC9A@kD9i2IODJD%rOs9O6%ZI(2Qi)X}Va!m>W;l~cOqvFO?e!Ie zU>%DYGu-<9%nJqXe~fgmmua=i&T2IV1eoXZ%=7tkwL|{NSkWZYyroUcmF?fZkIjuB z(5V!>p&^jjoma-R;EKa9i4!2LAKpBZ?c!~kdGLh8Q!NIDh8cqF7xXerffg}%y85}S Ib4q9e03wn~-~a#s literal 0 HcmV?d00001 diff --git a/media/img/bomb.png b/media/img/bomb.png new file mode 100755 index 0000000000000000000000000000000000000000..0552c4c990ff59287f6db2667ddb7b590e553237 GIT binary patch literal 575 zcmV-F0>J%=P)K~y-6t(CEB8etg5f9f@%-XgtD4)Uqk4hfW76uLCfsRRO2 z2<}ccOK~egA@qMJg@}U)m2B-lP_RQSu8GJwhz3jAR5Xw)&BeQ~L)uWeI}?fT_&(3` zssy1~l5 z6~wa(#1;ha-a&m;f>7w@4NcQzSg8 zoX5MnJo@pI_YWTOy$O>J9DQ0Ps7TD$C0Ewf(6TJD*(~jL`)YR~C2u+%o`(W_`wZ&K z7bv#P)G(MH9-^$R`2)-4@(k?%={k~=CmU>++|7KC+-x>|%_Rwyvol}a6KI;Iui3ap z_XO&?J~wck?gADH1vE|bG>5}sipAn$Kuy!A*Xtyc$(emL8l_gNA%vI<^t{-*uG45V zXti1xhJg@*OeTY>s&ipiz;3teDMlg@(&;n+yaKr0Aj%=*Vu^l`!9~^8w&6C>pjmIaz?&^U9k}q_!j|m*pV0rqG%|(*K zs3*eVfmN6M1b3k_XvO3-+K1chiu9QJO`g99_-r5 x6ZA?;K+x#m=Go;EYA!0yJS`l7%mxMw47%IZgQu&X%Q~loCIB;iVtoJr literal 0 HcmV?d00001 diff --git a/src/Driver.java b/src/Driver.java new file mode 100755 index 0000000..128addb --- /dev/null +++ b/src/Driver.java @@ -0,0 +1,7 @@ +public class Driver +{ + public static void main(String[] Args) + { + GameBoard b = new GameBoard("BombSweeper", 10, 10); + } +} diff --git a/src/GameBoard.java b/src/GameBoard.java new file mode 100755 index 0000000..bc7f3dc --- /dev/null +++ b/src/GameBoard.java @@ -0,0 +1,107 @@ +import javax.swing.*; +import java.awt.*; +import javax.swing.event.*; +import java.awt.event.*; +/** + * This class provides a graphical model of a board game. + * The class creates a rectangular panel of clickable squares, + * of type SmartSquare. If a square is clicked by the user, a + * callback method is invoked upon the corresponding SmartSquare instance. + * The class is intended to be used as a basis for tile based games. + * @author joe finney + */ +public class GameBoard extends JFrame implements MouseListener +{ + private JPanel boardPanel = new JPanel(); + + private int boardHeight; + private int boardWidth; + private GameSquare[][] board; + + /** + * Create a new game board of the given size. + * As soon as an instance of this class is created, it is visualized + * on the screen. + * + * @param title the name printed in the window bar. + * @param width the width of the game area, in squares. + * @param height the height of the game area, in squares. + */ + public GameBoard(String title, int width, int height) + { + super(); + + this.boardWidth = width; + this.boardHeight = height; + + // Create game state + this.board = new GameSquare[width][height]; + + // Set up window + setTitle(title); + setSize(20+width*20,20+height*20); + setContentPane(boardPanel); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + boardPanel.setLayout(new GridLayout(height,width)); + + for (int y = 0; y= boardWidth || y < 0 || y >= boardHeight) + return null; + + return board[x][y]; + } + public void mouseClicked(MouseEvent e) { + GameSquare b = (GameSquare)e.getSource(); + + if (SwingUtilities.isRightMouseButton(e)) + b.rightClicked(); + else + b.clicked(); + } + + public void mousePressed(MouseEvent e) { + } + + public void mouseReleased(MouseEvent e) { + } + + public void mouseEntered(MouseEvent e) { + } + + public void mouseExited(MouseEvent e) { + } +/* + public void actionPerformed(ActionEvent e) + { + // The button that has been pressed. + GameSquare b = (GameSquare)e.getSource(); + b.clicked(); + } + */ +} diff --git a/src/GameSquare.java b/src/GameSquare.java new file mode 100755 index 0000000..d625491 --- /dev/null +++ b/src/GameSquare.java @@ -0,0 +1,52 @@ +import javax.swing.*; +import java.awt.*; +/** + * This class provides a representation of a single game square. + * The class is abstract, and should be extended to provide domain + * specific functionality. + * @author joe finney + */ +public abstract class GameSquare extends JButton +{ + /** The x co-ordinate of this square. **/ + protected int xLocation; + + /** The y co-ordinate of this square. **/ + protected int yLocation; + + /** The GameBoard upon which this GameSquare resides. **/ + protected GameBoard board; + + /** + * Create a new GameSquare, which can be placed on a GameBoard. + * + * @param x the x co-ordinate of this square on the game board. + * @param y the y co-ordinate of this square on the game board. + * @param board the GameBoard upon which this square resides. + */ + public GameSquare(int x, int y, String filename, GameBoard board) + { + super(new ImageIcon(filename)); + + this.board = board; + xLocation = x; + yLocation = y; + } + + /** + * Change the image displayed by this square to the given bitmap. + * + * @param filename the filename of the image to display. + */ + public void setImage(String filename) + { + this.setIcon(new ImageIcon(filename)); + } + + /** + * A method that is invoked when a user clicks on this square. + * + */ + public abstract void clicked(); + public abstract void rightClicked(); +} diff --git a/src/SmartSquare.java b/src/SmartSquare.java new file mode 100755 index 0000000..3d9a794 --- /dev/null +++ b/src/SmartSquare.java @@ -0,0 +1,111 @@ +/****************************************************************************** + * BombSweeper 1.0 * + * Copyright © 2015 Ben Goldsworthy (rumps) * + * * + * A program to emulate the classic game Minesweeper * + * * + * This file is part of BombSweeper. * + * * + * BombSweeper 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. * + * * + * BombSweeper 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 BombSweeper. If not, see . * + ******************************************************************************/ + +/** + ** This class provides a the square logic needed for a game of BombSweeper. + **/ + +import javax.swing.*; +import java.awt.*; +import java.util.*; + +/** + ** @author Ben Goldsworthy (rumps) + ** @version 1.0 + **/ +public class SmartSquare extends GameSquare { + private boolean thisSquareHasBomb = false; + public static final int MINE_PROBABILITY = 10; + public boolean clicked = false; + public boolean flagged = false; + + /** + ** Constructor method. Creates a SmartSquare instance. + ** + ** @param x The x-coord of the SmartSquare. + ** @param y The y-coord of the SmartSquare. + ** @param The GameBoard the SmartSqaure resides on. + **/ + public SmartSquare(int x, int y, GameBoard board) { + super(x, y, "images/blank.png", board); + + Random r = new Random(); + thisSquareHasBomb = (r.nextInt(MINE_PROBABILITY) == 0); + } + + /** + ** Called on square click. + **/ + public void clicked() { + this.clicked = true; + + // If it's a bomb, marks it as such + if (thisSquareHasBomb) { + this.setImage("images/bomb.png"); + return; + } + + int thisX = this.xLocation; + int thisY = this.yLocation; + int bombs = 0; + + // Otherwise, check adjacent squares for bombs + for (int x = thisX - 1; x < thisX + 2; x++) { + for (int y = thisY - 1; y < thisY + 2; y++) { + try { + SmartSquare currSquare = (SmartSquare)board.getSquareAt(x, y); + if (currSquare.hasBomb()) bombs++; + } catch (NullPointerException e) {} + } + } + // If there are any, set the square's image as the number of them + this.setImage("images/" + bombs + ".png"); + // If not, simulate a click on all adjacent squares, recursively + if (bombs == 0) { + for (int x = thisX - 1; x < thisX + 2; x++) { + for (int y = thisY - 1; y < thisY + 2; y++) { + try { + SmartSquare currSquare = (SmartSquare)board.getSquareAt(x, y); + if (!currSquare.clicked) currSquare.clicked(); + } catch (NullPointerException e) {} + } + } + } + } + + + /** + ** Flags a square if right-clicked on. + **/ + public void rightClicked() { + flagged = !flagged; + String img = flagged ? "flag" : "blank"; + this.setImage("images/"+img+".png"); + } + + /** + ** Returns whether a square has a bomb on it or not. + **/ + public boolean hasBomb() { + return this.thisSquareHasBomb; + } +}