ColorCode-0.8.5/0000755000175000017500000000000012610773277012055 5ustar dirkdirkColorCode-0.8.5/resource.qrc0000644000175000017500000000331712610773251014407 0ustar dirkdirk docs/GPL.html img/application-exit.png img/document-new.png img/GNU-icon16.png img/GNU-icon32.png img/GNU-icon64.png img/GNU-icon.png img/help-about.png img/qt.png img/story-editor.png img/view-refresh.png trans_de.qm img/face-sad.png img/edit-clear.png img/edit-copy.png img/system-switch-user.png img/cc16.png img/cc32.png img/cc64.png cc32.ico img/business_user.png img/same_color_0.png img/same_color_1.png img/help.png img/icon_female16.png img/configure.png trans_fr.qm trans_hu.qm img/document-save.png img/edit-delete.png img/games-highscores.png img/bookmark_add.png img/bookmark.png img/history.png trans_es.qm trans_cs.qm img/resume.png img/pause.png img/same_color_header.png img/document-new_tab.png img/bookmark_tab.png img/history_tab.png img/games-highscores_tab.png ColorCode-0.8.5/msg.cpp0000644000175000017500000000443212610773251013342 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include #include "msg.h" using namespace std; Msg::Msg() { mFont = QFont("Arial", 12, QFont::Bold, false); mFont.setStyleHint(QFont::SansSerif); mFont.setPixelSize(16); mLay = new QTextLayout(); mLay->setFont(mFont); mLay->setTextOption(QTextOption(Qt::AlignHCenter)); mUpdateRect = QRectF(0, 0, 10, 10); } Msg::~Msg() { } void Msg::ShowMsg(const QString str) { mUpdateRect = boundingRect(); mLay->setText(str); int leading = -3; qreal h = 0; qreal maxw = 0; qreal maxh = 0; mLay->beginLayout(); while (1) { QTextLine line = mLay->createLine(); if (!line.isValid()) { break; } line.setLineWidth(280); h += leading; line.setPosition(QPointF(0, h)); h += line.height(); maxw = qMax(maxw, line.naturalTextWidth()); } mLay->endLayout(); float ypos = 4 + (70 - mLay->boundingRect().height()) / 2; maxw = qMax(mUpdateRect.width(), mLay->boundingRect().width()); maxh = qMax(mUpdateRect.height(), mLay->boundingRect().height() + ypos); mUpdateRect = QRectF(0, 0, maxw, maxh + ypos); update(boundingRect()); } QRectF Msg::boundingRect() const { return mUpdateRect; } void Msg::paint(QPainter* painter, const QStyleOptionGraphicsItem* , QWidget* ) { painter->setRenderHint(QPainter::TextAntialiasing, true); painter->setPen(QPen(QColor("#303133"))); float ypos = 4 + (70 - mLay->boundingRect().height()) / 2; mLay->draw(painter, QPointF(0, ypos)); } ColorCode-0.8.5/buttondelegate.h0000644000175000017500000000315612610773251015231 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef BUTTONDELEGATE_H #define BUTTONDELEGATE_H #include #include "buttonscell.h" #include "highscoresmodel.h" #include "gametableview.h" #include "gameslistmodel.h" class ButtonDelegate : public QStyledItemDelegate { Q_OBJECT public: ButtonDelegate(QWidget* parent = 0); QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem &option, const QModelIndex &index) const; void setEditorData(QWidget* editor, const QModelIndex &index) const; void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex &index) const; private: GamesListModel* GetGamesListModel(const QModelIndex &index) const; private slots: void ButtonClickedSlot(); }; #endif // BUTTONDELEGATE_H ColorCode-0.8.5/pegfactory.h0000644000175000017500000000372712610773251014372 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef PEGFACTORY_H #define PEGFACTORY_H #include #include #include "colorcode.h" #include "colorpeg.h" #include "settings.h" class PegFactory : public QObject { Q_OBJECT public: PegFactory(); static const int XPOS_BTNS_COL; ColorPeg* CreatePeg(int ix); ColorPeg* GetPegBtn(int ix); void SetPaused(); void SetIndicators(); void ChangeColorOrder(const int sorttype, const int ix0, const int ix1); void ApplyColorCnt(); public slots: void RemovePegSlot(ColorPeg* cp); void ResetColorsOrderSlot(); void PegPressSlot(ColorPeg* cp); void PegSortSlot(ColorPeg* cp); void PegReleasedSlot(ColorPeg* cp); signals: void SnapPegSignal(ColorPeg* cp); private: ColorCode* mWin; Settings* mSettings; PegType* mTypesMap[10]; ColorPeg* mPegBtns[10]; QPoint mBtnPos[10]; QRadialGradient mGradMap[10]; QRadialGradient mGradBuff[10]; std::vector mAllPegs; std::vector mPegBuff; bool mHideColors; void InitTypesMap(); void InitPegBtns(); }; #endif // PEGFACTORY_H ColorCode-0.8.5/solutionrow.cpp0000644000175000017500000000543612610773251015165 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include #include "solutionrow.h" using namespace std; SolutionRow::SolutionRow(QObject*) { setCacheMode(QGraphicsItem::DeviceCoordinateCache); InitGraphics(); } SolutionRow::~SolutionRow() { } void SolutionRow::InitGraphics() { mRect = QRectF(0.5, 0.5, 219, 39); mRectC = QRectF(2, 2, 216, 36); QLinearGradient solgrad(0, 0, 0, 40); solgrad.setColorAt(0.0, QColor("#9fa0a2")); solgrad.setColorAt(1.0, QColor("#8c8d8f")); mBgBrush = QBrush(solgrad); QLinearGradient framegrad(0, 0, 0, 40); framegrad.setColorAt(0.0, QColor("#4e4f51")); framegrad.setColorAt(1.0, QColor("#ebecee")); mFramePen = QPen(QBrush(framegrad), 1); mFont = QFont("Arial", 22, QFont::Bold, false); mFont.setStyleHint(QFont::SansSerif); mFont.setPixelSize(29); } void SolutionRow::SetXOffs() { mXOffs = 110 - mPegCnt * 20; } QRectF SolutionRow::boundingRect() const { const double margin = 0.5; return mRect.adjusted(-margin, -margin, 2 * margin, 2 * margin); } void SolutionRow::paint(QPainter *painter, const QStyleOptionGraphicsItem* , QWidget* ) { if (mPegCnt == 0) { return; } int i; painter->setBrush(mBgBrush); painter->setPen(mFramePen); painter->drawRoundedRect(mRect, 20, 20); QPainterPath cpath; cpath.addRoundedRect(mRectC, 19, 19); painter->setClipPath(cpath); painter->setRenderHint(QPainter::TextAntialiasing, true); int x0 = (220 - mPegCnt * 40) / 2; int xpos; for (i = 0; i <= mPegCnt; ++i) { xpos = x0 + i * 40; painter->setPen(Qt::NoPen); painter->setBrush(QBrush(QColor(0x7d, 0x7e, 0x80, 0x80))); painter->drawRect(xpos - 1, 1, 1, 38); painter->setBrush(QBrush(QColor(0xc3, 0xc4, 0xc6, 0x80))); painter->drawRect(xpos, 1, 1, 38); if (i < mPegCnt) { painter->setPen(QPen(QColor("#ff9933"))); painter->setFont(mFont); painter->drawText(QRectF(xpos + 3.0, 3.0, 34.0, 34.0), Qt::AlignCenter, QString('?')); } } } ColorCode-0.8.5/COPYING0000644000175000017500000010451312610773251013104 0ustar dirkdirk 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 . ColorCode-0.8.5/trans_hu.qm0000644000175000017500000004777112610773251014247 0ustar dirkdirk<¸dÊÍ!¿`¡½ÝBè‘ÌOO#ëO$ÖSg8+_Ã#Š_Ã$q_Ã%Œ¹gɶEØ5^ïØ-ìú^·ëÞJ*Ø5Ý*ì0 6¼b/GßR̼/Z6³rZ6³%XZ6³F-t‘NE±‡J© >‡J©'}ÛAâ$ÛAâDjß~jæiH°9‘3,Ñ@¤g5OÜpöUo± d&b{d&b;Zm’>D¹sº~:?€Þ Іà&v¬.Ùˆ¯n’è~•zò o@ùÇ%/%'RP%'R'fïÅ ¬n¸¡Nuˆ%Šuˆ%,—‰ñ³8ŒŽù“7å¦Ðþ0£·ú^zÊY™Ê—…³Ê—…#³̯Ÿúÿ™¾ÿ™,Œ¯b{¦6“ å¦6“$¡¦6“*õ«Žñ u«Žó ¥«Žô Õ«Ž÷«Žø5«Žùe«Žü•«ŽýÅ«Žþõ«%«U«…«ÿ­ Î5_ììã-¢;°½8Y@"³b`bÑ!á ªu.ÓCV ^F¯:ÑÒˆ:ÑÒCÎ[’“+…u]âtŠÿžÆlÕÿ9>§H~amöbÑmöb.¨2"@¨2"$¨2"%ÕDzÒÕDzDøq )% H,6¡ì2<¬î;¶?½ðHQhF]ý:Ó%º +Ã9 WD¿ p ea^ñ laô © Þ  ¶Ð.4m %uŽG¨ Œ¯B &ÅÃ+¸ tÂ.x „G × ˆ   ˆ *H ÖB#9 -Òà>l e#8Ò ŽS™Ö ŽS™Bæ Žôž9_ ”Óuä ”ýuA —.@ ºïsó É Š ÝÂZ ÝÂ; 1Ðñ#( 9¼"Æ DYóµ DYø÷ DYü9 DYþ{ DZ½ ‰Ëy K ‰Ëy(Š ÑhþE1 t¾Ã-™Þ r-™Þ+&;’y Á;’y'ÿq4Õ3µSyòµSy-È¿É~ΑùÙ(Ž"­å‘¡Tå²37°iJ÷&SzerzQ&AuthorAbout&Licensz&LicenseAbout¼<br><br>Egy ingyenes MasterMind klón,<br> kiegészítve egy meglehetQsen intelligens megoldóval.Q

Free MasterMind clone including a built in,
rather intelligent solver.AboutfAz agytekervények megmozgatására szolgáló játék ;-)&A needful game to train your brain ;-)About$Névjegy: ColorCodeAbout ColorCodeAbout SzerzQAuthorAboutÚEz a program egy szabad szoftver, amit továbbadhatsz és/vagy módosíthatsz a GNU General Public Licensz alapján, amit a Free Software Foundation adott ki; a 3. Licensz verzió szerint, vagy bármely késQbbi (tetszés szerint) verzió alapján.ï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.About VerzióVersionAboutikoniconAbout &Játék&Game ColorCode&Segítség&Help ColorCode&Új játék &New Game ColorCode$&Játék újrakezdése &Restart Game ColorCode&Sor&Row ColorCode&Beállítások &Settings ColorCodeJáték &feladása&Throw In The Towel ColorCode&Névejgy: &ColorCodeAbout &ColorCode ColorCodeNévjegy: &Qt About &Qt ColorCodeNévjegy: QtAbout Qt ColorCode@Azonons színq ékek engedélyezéseAllow Pegs of Same Color ColorCode>Azonos színq ékek engedélyezéseAllow Pegs of the Same Color ColorCode@KezdQ (2 szín, 2 lyuk, duplázás)%Beginner (2 Colors, 2 Slots, Doubles) ColorCodeDKihívás (8 szín, 4 lyuk, duplázás)(Challenging (8 Colors, 4 Slots, Doubles) ColorCodeJKlasszikus (6 szín, 4 lyuk, duplázás)$Classic (6 Colors, 4 Slots, Doubles) ColorCodeSor törlése Clear Row ColorCodeTSor zárolása az utolsó ék behelyezése után&Close Rows when the last Peg is placed ColorCodeColorCode ColorCode ColorCode SzínekColors ColorCode.Számítógép kontra emberComputer vs Human ColorCode.Számítógép kontra emberComputer vs. Human ColorCodeGép tippjeComputer's Guess ColorCode(Gratulálok! Nyertél!Congratulation! You have won! ColorCode Ctrl+ACtrl+A ColorCode Ctrl+CCtrl+C ColorCode Ctrl+DCtrl+D ColorCode Ctrl+GCtrl+G ColorCode Ctrl+HCtrl+H ColorCode Ctrl+ICtrl+I ColorCode Ctrl+LCtrl+L ColorCode Ctrl+MCtrl+M ColorCode Ctrl+NCtrl+N ColorCode Ctrl+PCtrl+P ColorCode Ctrl+QCtrl+Q ColorCode Ctrl+RCtrl+R ColorCodeCtrl+Shift+C Ctrl+Shift+C ColorCodeCtrl+Shift+H Ctrl+Shift+H ColorCodeCtrl+Shift+L Ctrl+Shift+L ColorCodeCtrl+Shift+N Ctrl+Shift+N ColorCodeCtrl+Shift+R Ctrl+Shift+R ColorCode Ctrl+TCtrl+T ColorCode2Azonos színq ékek tiltásaDisallow Pegs of the Same Color ColorCode Tényleg feladod?Do you really want to give in? ColorCode:Feladod, és kezdesz egy újat?,Do you want to give in and start a new Game? ColorCodeDNem akarsz gyQzni látni engem? ;-)%Don't you like to see me winning? ;-) ColorCodeBefejezDone ColorCode&ElQzQ sor duplázásaDuplicate Previous Row ColorCode &KilépE&xit ColorCodeNKönnyq (4 szín, 3 lyuk, nincs duplázás)$Easy (4 Colors, 3 Slots, No Doubles) ColorCodeDLenyqgözQ! Elvesztettem a játékot!Embarrassing! I lost a game! ColorCodeF1F1 ColorCode>Sorok kitöltése véletlenszerqenFill Row by Random ColorCode JátékGame ColorCodeJáték mód Game Mode ColorCode FeladGive In ColorCodeBNehéz (10 szín, 5 lyuk, duplázás)"Hard (10 Colors, 5 Slots, Doubles) ColorCode.Ember kontra számítógépHuman vs Computer ColorCode.Ember kontra számítógépHuman vs. Computer ColorCodeNehézségLevel ColorCode&Nehézség beállítása Level Presets ColorCode ÜzenetMessage ColorCodeÚj játékNew Game ColorCodeNemNo ColorCodedNeee! Ez hihetetlen! Hamis útmutatást adtál nekem?4Nope! Thats impossible! Did you gave me false hints? ColorCode Online &segítség Online &Help ColorCode"Azonos színq ékekPegs of Same Color ColorCode.Helyezd el az ékeket...Place Your pegs ... ColorCodeLHelyezd el a titkos színkombinációt...Place Your secret ColorCode ... ColorCode†Értékeld a tippet. Kattints az OK-ra, vagy üss entert ha kész vagy.A lehetetlen megtörtént, bocsi.The impossible happened, sorry. ColorCode,Fain! Kitalátam öcsém!Yeah! I guessed it, man! ColorCodeIgenYes ColorCode ÜzenetMessageGameTablesDialogNemNoGameTablesDialog"Azonos színq ékekPegs of Same ColorGameTablesDialogIgenYesGameTablesDialog SzínekColorsGamesListModelNemNoGamesListModel"Azonos színq ékekPegs of Same ColorGamesListModel LyukakSlotsGamesListModelIgenYesGamesListModelt... Válassz az elQre meghatározott szint beállítások közül)... Select from predefined level settings PrefDialogDTippek közti késleltetés megadása.-Adjust the delay (in ms) between two guesses. PrefDialog@Azonons színq ékek engedélyezéseAllow Pegs of Same Color PrefDialog>KezdQ (2szín, 2 lyuk, duplázás)%Beginner (2 Colors, 2 Slots, Doubles) PrefDialogDKihívás (8 szín, 4 lyuk, duplázás)(Challenging (8 Colors, 4 Slots, Doubles) PrefDialogJKlasszikus (6 szín, 4 lyuk, duplázás)$Classic (6 Colors, 4 Slots, Doubles) PrefDialog®Kattints ide ha megváltoztattad a szín sorrendet, és visszakarod állatani az eredetire.dClick here if you have changed the color order and now you want to revert it to it's initial state.  PrefDialoghSor zárolása, amint az utolsó ék is a helyére került&Close Rows when the last Peg is placed PrefDialog SzínekColors PrefDialog.Számítógép kontra emberComputer vs. Human PrefDialog GombokControls PrefDialog$Késleltelés ms-ban Delay in ms PrefDialogNKönnyq (4 szín, 3 lyuk, nincs duplázás)$Easy (4 Colors, 3 Slots, No Doubles) PrefDialogJáték mód Game Mode PrefDialog"Játék beállítások Game Settings PrefDialogBNehéz (10 szín, 5 lyuk, duplázás)"Hard (10 Colors, 5 Slots, Doubles) PrefDialog Színek elrejtése Hide Colors PrefDialog NehézHigh PrefDialog.Ember kontra számítógépHuman vs. Computer PrefDialoglHa ez be van kapcsolva, akkor a sor zárolásra kerül, amint beraktad az utolsó éket, és a tipped azonnal ki lesz értékelve. Ez az opció csak az Ember kontra számítógép módban mqködik. If checked, a row is closed as soon as you place the last peg and your guess is submitted immediatly. This option only affects the Human vs. Computer game mode. PrefDialog|Ha ezt bekapcsolod, akkor a gép automatikusan kiértékeli a tippet a jelzQk segítségével. Ez a lehetQség csak a Számítógép kontra ember módnál mqködik. Bekapcsolt állapotban, csak titkos kombinációt kell megadnod, majd a játék hátralevQ részét a gép automatikusan lejátsza. De meg tudsz adni késleltetést a tippek közé./If checked, the computer will determine the corresponding hints for the solver's guess. This option affects only Computer vs. Human games. If checked, you only have to place your secret combination. Then the rest of the game runs automatically until the end. But you can set a delay between the guesses. PrefDialogŽHa ez az opció be van jelölve, akkor minden ékben megjelenik egy jelzQ.EIf this option is checked, an indicator inside each peg is displayed. PrefDialogzAmennyiben ez a lehetQség be van kapcsolva, akkor a rejtett kombináció tartalmazhat egy vagy több (akár az összes) azonos színq éket. Ha be van kapcsolva, nehezebb megfejteni a kombinációt.¸If this option is checked, the hidden combination may contain one or more (even all would be possible) pegs of the same color. If checked, the combination is generally harder to guess. PrefDialog JelzQk Indicators PrefDialogBetq jelzQkLetter Indicators PrefDialog KönnyqLow PrefDialogKözepesMedium PrefDialogSzám jelzQkNumber Indicators PrefDialogSzínek számaNumber of Colors PrefDialogLyukak számaNumber of Slots PrefDialog€A lehetséges színek száma. A nagyobb értéket nehezebb eltalálni.ANumber of all possible colors. Higher values are harder to guess. PrefDialogzÉkek száma egy sorban. A nyagyobb értéket nehezebb eltalálni.BNumber of pegs in a single row. Higher values are harder to guess. PrefDialogBeállítások Preferences PrefDialog,Szín sorrend nullázásaReset Color Order PrefDialogºVálassz a 3 különbözQ nehézség közül a gépi ellenfél számára. Ez az opció csak a Számítógép kontra ember módot befolyásolja. A gép tippjeinél az Ember kontra számítógép módban a legnehezebb nehézségi szint lesz használva.ÝSelect from 3 different strength levels for your computer opponent. This option only affects the Computer vs. Human game mode. For the computer's guess in the Human vs. Computer mode always the highest level will be used. PrefDialogDVálassz az elQre meghatározott nehézségi szint 3 különbözQ lehetQsége közül, színek száma, lyukak (oszlop) száma, és az egy sorban lehetséges azonos színek száma.ÁSelect from predefined combinations of the three different level related settings, the number of colors, the number of slots (columns) and the possibility of pegs of the same color in one row.  PrefDialogvVálassz a különbözQ játék módok közül. Az 1. módban neked kell kitalálnod a titkos kombinációt, amit a gép kigondolt. A 2. módban a gépnek kell kitalálnia az általad megadott kombinációt.ÁSelect from the different game modes. In the 1. mode you have to to guess the hidden, computer generated combination, In the 2. mode your computer will try to guess your own secret combination. PrefDialog:JelzQk automatikus használataSet Hints automatically PrefDialog>JelzQk mutatása az ékeken belülShow Indicators inside pegs PrefDialogMeüsor mutatása Show Menubar PrefDialog&Állapotsor mutatásaShow Statusbar PrefDialog$Eszköztár mutatása Show Toolbar PrefDialog@Menüsor mutatása vagy elrejtése.Show or hide the Menubar. PrefDialogFÁllapotsor mutatása vagy elrejtése.Show or hide the Statusbar. PrefDialogDEszköztár mutatása vagy elrejtése.Show or hide the Toolbar. PrefDialog LyukakSlots PrefDialog$Megoldási nehézségSolver Strength PrefDialogŒEgyforma sima háttér használata az ékeknél, amikor a jelzQk látszanak.NUse the same neutral background color for each peg, when indicators are shown. PrefDialogDEgyedi betqk használata jelzQként.!Use unique letters as indicators. PrefDialogDEgydi számok használata jelzQként.!Use unique numbers as indicators. PrefDialogLKattints a körökbe, hogy kiértékeld a tippemet. Vagy nyomd le a Ctrl+H billentyqkombinációt, vagy használd az eszköztár adott gombját, hogy megtegyem ezt helyetted;-)…Click the circles to rate my guess. Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-)RowHint*Kövesd a megoldásodatCommit Your solutionRowHintColorCode-0.8.5/timedisplay.h0000644000175000017500000000322712610773251014546 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef TIMEDISPLAY_H #define TIMEDISPLAY_H #include #include #include #include class GameTimer; class TimeDisplay : public QGraphicsTextItem { Q_OBJECT public: TimeDisplay(QGraphicsItem* parent = 0); ~TimeDisplay(); int GetGameTime() const; bool IsActive() const; bool IsPaused() const; bool IsStopped() const; void SetTenth(bool b); public slots: void StartT(); void PauseT(); void ResumeT(); void StopT(); void DisplayTime(int tick = 0); private: GameTimer* mTimer; bool mPaused; bool mStopped; int mTime; int mGameTime; QTime mT0; QTime mT1; int mInterval; bool mShowTenth; QString mSs; QString mLastSs; QString mHs; QFont mFont; }; #endif ColorCode-0.8.5/gametablesdialog.ui0000644000175000017500000003341712610773251015700 0ustar dirkdirk GameTablesDialog 0 0 320 520 0 0 320 520 320 520 ColorCode Games false true 6 9 12 75 true Game Properties Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 9 1 3 5 9 50 false User 9 75 true dirk Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 9 50 false Color Count 9 75 true 10 Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 9 50 false Slot Count 9 75 true 5 Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 9 50 false Pegs of Same Color 9 75 true Yes Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter Qt::NoTextInteraction 9 50 false Game Number 9 75 true 2338702 Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter Qt::TextSelectableByMouse 9 50 false Date and Time 9 75 true 16.08.2010 16:35 Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 9 50 false Duration 9 75 true 10250 Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 9 75 true 0 46 16 false false :/img/document-new_tab.png:/img/document-new_tab.png Insert Game Number 0 4 Qt::ImhNone 10 Arial 50 false Play 50 false Qt::NoFocus QFrame::NoFrame 0 true Qt::TextSelectableByMouse :/img/history_tab.png:/img/history_tab.png Recent Games 6 0 :/img/bookmark_tab.png:/img/bookmark_tab.png Bookmarks 6 0 :/img/games-highscores_tab.png:/img/games-highscores_tab.png Highscores 0 Qt::Horizontal 40 20 Clear List Close ColorCode-0.8.5/gametimer.cpp0000644000175000017500000000225612610773251014530 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include "gametimer.h" GameTimer::GameTimer(QObject* parent) : QThread(parent) { mInterval = 50; } GameTimer::~GameTimer() { wait(); } void GameTimer::run() { QTimer* timer = new QTimer(); connect(timer, SIGNAL(timeout()), this, SLOT(TimeOut()), Qt::DirectConnection); timer->start(mInterval); exec(); } void GameTimer::Start() { start(); } void GameTimer::TimeOut() { emit TimeOutSignal(1); } ColorCode-0.8.5/savedgamesmodel.cpp0000644000175000017500000000317112610773251015713 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include "savedgamesmodel.h" #include "gametableview.h" SavedGamesModel* GetSavedGamesModel() { static SavedGamesModel* m = new SavedGamesModel(); return m; } SavedGamesModel::SavedGamesModel(QObject* parent) : GamesListModel(parent) { mId = MODEL_ID_SAVED; mEditIndex = QModelIndex(); mMaxSize = 20; } int SavedGamesModel::GetColIx(const int ix) const { int ret = -1; if (ix == COL_GAMENO) { ret = 0; } else if (ix == COL_CCNT) { ret = 1; } else if (ix == COL_PCNT) { ret = 2; } else if (ix == COL_DOUBLES) { ret = 3; } else if (ix == COL_DELETE) { ret = 4; } return ret; } int SavedGamesModel::GetMaxColCnt() const { return 5; } void SavedGamesModel::DoSort(QList &list) { qSort(list.begin(), list.end(), GamesListModel::SortListTime); } ColorCode-0.8.5/savedgamesmodel.h0000644000175000017500000000254512610773251015364 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef SAVEDGAMESMODEL_H #define SAVEDGAMESMODEL_H #include #include #include #include #include "ccgame.h" #include "buttonscell.h" #include "gametableview.h" #include "gameslistmodel.h" class SavedGamesModel : public GamesListModel { Q_OBJECT public: SavedGamesModel(QObject* parent = 0); virtual int GetColIx(const int ix) const; virtual int GetMaxColCnt() const; protected: virtual void DoSort(QList &list); }; SavedGamesModel* GetSavedGamesModel(); #endif // SAVEDGAMESMODEL_H ColorCode-0.8.5/background.h0000644000175000017500000000273312610773251014342 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef BACKGROUND_H #define BACKGROUND_H #include #include #include #include #include #include "colorcode.h" class BackGround : public QObject, public QGraphicsItem { Q_OBJECT Q_INTERFACES(QGraphicsItem) public: BackGround(QObject* parent = 0); ~BackGround(); QRectF boundingRect() const; void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); private: QRectF outlineRect() const; QBrush mTopGrad; QBrush mBotGrad; QPen mFramePen; QColor mPend; QColor mPenl; QColor mGrad0; QColor mGrad1; }; #endif // BACKGROUND_H ColorCode-0.8.5/ccgame.cpp0000644000175000017500000001175312610773251013777 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include "ccgame.h" #include "settings.h" using namespace std; CCGame::CCGame() { mUserNm = ""; mTime = 0; mScore = 0; mGameNo = 0; mGuessCnt = 0; mHintCnt = 0; mDuration = 0; mColorCnt = 0; mPegCnt = 0; mDoubles = 0; mGameMode = ColorCode::MODE_HVM; } CCGame::CCGame(const QString &str) { QStringList fields = str.split(QString("|")); if (fields.size() == 11) { SetUserName(QUrl::fromPercentEncoding(fields.at(0).toUtf8())); bool ok; mTime = fields.at(1).toInt(&ok); mScore = fields.at(2).toInt(&ok); mGameNo = fields.at(3).toUInt(&ok); mGuessCnt = fields.at(4).toInt(&ok); mHintCnt = fields.at(5).toInt(&ok); mDuration = fields.at(6).toUInt(&ok); mGameMode = fields.at(7).toInt(&ok); mColorCnt = fields.at(8).toInt(&ok); mPegCnt = fields.at(9).toInt(&ok); mDoubles = fields.at(10).toInt(&ok); } else { mUserNm = ""; mTime = 0; mScore = 0; mGameNo = 0; mGuessCnt = 0; mHintCnt = 0; mDuration = 0; mGameMode = ColorCode::MODE_HVM; mColorCnt = 0; mPegCnt = 0; mDoubles = 0; } } CCGame::CCGame(const QString &unm, const uint t, const int sc, const uint gameno, const int gcnt, const int hcnt, const uint dur, const int gmode, const int ccnt, const int pcnt, const int d) { mUserNm = unm; mTime = t; mScore = sc; mGameNo = gameno; mGuessCnt = gcnt; mHintCnt = hcnt; mDuration = dur; mGameMode = gmode; mColorCnt = ccnt; mPegCnt = pcnt; mDoubles = d; } bool CCGame::operator==(const CCGame &other) const { return ( GetUserName() == other.GetUserName() && mTime == other.mTime && mScore == other.mScore && mGameNo == other.mGameNo && mGuessCnt == other.mGuessCnt && mHintCnt == other.mHintCnt && mDuration == other.mDuration && mGameMode == other.mGameMode && mColorCnt == other.mColorCnt && mPegCnt == other.mPegCnt && mDoubles == other.mDoubles ); } bool CCGame::operator!=(const CCGame &other) const { return !(*this == other); } QString CCGame::GetUserName() const { return mUserNm; } void CCGame::SetUserName(QString unm) { QRegExp rx("[^\\S ]+"); unm.replace(rx, ""); unm = unm.trimmed(); unm.truncate(Settings::MAX_LENGTH_USERNAME); mUserNm = unm; } uint CCGame::GetTime() const { return mTime; } int CCGame::GetScore() const { return mScore; } QString CCGame::GetDatePartStr() const { return QDateTime::fromTime_t(mTime).date().toString(Qt::ISODate); } QString CCGame::GetTimePartStr() const { return QDateTime::fromTime_t(mTime).time().toString(Qt::ISODate); } QString CCGame::GetDateTimeStr() const { return QDateTime::fromTime_t(mTime).toString(Qt::TextDate); } QString CCGame::GetCmbStr() const { return QString::number(mGameNo) + QString(" (") + QString::number(mDoubles) + QString("|") + QString::number(mPegCnt) + QString("|") + QString::number(mColorCnt) + QString(") ") + GetDateTimeStr(); } void CCGame::Anonymize() { SetUserName(""); mHintCnt = mGuessCnt = mDuration = mScore = 0; } QString CCGame::ToString() const { QStringList slist = QStringList(); slist << QString(QUrl::toPercentEncoding(mUserNm)); slist << QString::number(mTime); slist << QString::number(mScore); slist << QString::number(mGameNo); slist << QString::number(mGuessCnt); slist << QString::number(mHintCnt); slist << QString::number(mDuration); slist << QString::number(mGameMode); slist << QString::number(mColorCnt); slist << QString::number(mPegCnt); slist << QString::number(mDoubles); return slist.join("|"); } bool CCGame::HasSameSettings(const CCGame &g) const { return (mGameNo == g.mGameNo && mColorCnt == g.mColorCnt && mPegCnt == g.mPegCnt && mDoubles == g.mDoubles); } bool CCGame::IsValidGame() const { return ( mGameNo > 0 && mColorCnt >= ColorCode::MIN_COLOR_CNT && mColorCnt <= ColorCode::MAX_COLOR_CNT && mPegCnt >= 2 && mPegCnt <= 5 && (mDoubles == 1 || mDoubles == 0) ); } ColorCode-0.8.5/gameslistmodel.h0000644000175000017500000000702712610773251015235 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef GAMESLISTMODEL_H #define GAMESLISTMODEL_H #include #include #include #include #include "ccgame.h" #include "buttonscell.h" #include "gametableview.h" class GamesListModel : public QAbstractTableModel { Q_OBJECT public: GamesListModel(QObject* parent = 0); static const int MODEL_ID_DEFAULT; static const int MODEL_ID_PREV; static const int MODEL_ID_SAVED; static const int MODEL_ID_HIGH; static const int COL_RANKING; static const int COL_SCORE; static const int COL_USERNAME; static const int COL_DELETE; static const int COL_GAMENO; static const int COL_DATE; static const int COL_TIME; static const int COL_CCNT; static const int COL_PCNT; static const int COL_DOUBLES; static bool SortListScore(CCGame a, CCGame b); static bool SortListTime(CCGame a, CCGame b); virtual bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); virtual int rowCount(const QModelIndex &parent = QModelIndex()) const; virtual int columnCount(const QModelIndex &parent = QModelIndex()) const; virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; virtual Qt::ItemFlags flags(const QModelIndex &index) const; virtual bool setData(const QModelIndex &index, const QVariant &value, int role); int GetId(); QString GetListStr() const; void SetView(GameTableView* view); void SetMaxSize(const int max); void SetRowHColors(QString fg, QString bg); virtual void InsertRow(CCGame g); void EditField(); void ReadList(const QString &str); void SetEditIndex(QModelIndex ix); QModelIndex GetEditIndex() const; QString GetEditValue() const; const CCGame* GetGameAt(const int row) const; virtual int GetColIx(const int ix) const = 0; virtual int GetMaxColCnt() const = 0; public slots: void HoverRowSlot(int row); signals: void CloseEditorSignal(const QModelIndex &index); void SaveListGameSignal(CCGame* g); void NewGameInputSignal(CCGame* g); void ValidNameCommitSignal(); protected: QString GetHHeaderLabel(const int col) const; virtual void DoSort(QList &list) = 0; void LimitGamesListSize(); int mId; int mMaxSize; int mHoverRow; GameTableView* mView; QList mGamesList; QModelIndex mEditIndex; QColor mRowHFg; QColor mRowHBg; }; #endif // GAMESLISTMODEL_H ColorCode-0.8.5/trans_de.qm0000644000175000017500000007602712610773251014217 0ustar dirkdirk<¸dÊÍ!¿`¡½ÝBˆ‘óO /O6O:§SgTé_Ã,õ_Ã9ž_Ã<0¹g ̨¥:9¶E Ø5mïØHýr‰6˜ˆK;3°5;ÌÉÂ9gÉÂ;ûú^× ½Z ëÞt*Ø5­*ì0 6¼ba=ÝÒRGߤJ6•.KR̼$Y¦…;dZ6³([Z6³;˜Z6³k [ÂkÇt‘Nj‚{ÆiU¨‡J© “‡J©?À(n6ÏÛAâ(ÛAâi#ß~$ãæiqïU“lë9‘3GÔ@¤g:Yìt0%Ìõ zÎŒg(ííä>ÐOÜp!Uo±§d&b%ìd&b^m’>i|sº~X$€Þ=†à<ä¬.Ùj¯n!Ûè~• )ò o WùÇ%-‰Ã™ Œp%'R «%'R=ˆ7ÑtÖfïÅ%n¸¡ot çFÁuˆ%Þuˆ%GB‰ñ³V?Žù“S!¦ÐþL'·ú^"ÏÆÿ“7ÅÊY$Ê—…ÀÊ—…5Î̯Ÿ·ÿ™×ÿ™Eé 4.‡+¬.Ãqd-}Œ¯bK¦6“^¦6“:¦6“B뫎ñ"«ŽòJ«Žóz«Žôž«Ž÷Â«Žøæ«Žù «Žü.«ŽýR«Žþv«š«¾«â«¼­ ÎPÿììãH±»²»²/Ý)ræ)rD;°½Uw@"³m`bÑ+:hÉ´!Si©8K ªu¦<Âk:¸~nˆ¼™#0u¼™#G€Ó40ÏÓg| ^mò!"C#ÂC-Ä:ÑÒ':ÑÒgòMÉ48Y‘^-[’“Cuu]â´:`UŠÿAÅÍôõÆl @î‚Óm›ÿ9>uH~]WÒƒ/”WÒƒFÿmöbrmöbIi¨2"!¨2"67¨2":Ô«9ÊÕDz'aÕDzhCéo% øq @ÃÇ"1^% o™6¡ì £7QÎ:j<¬î_~?½A’.HQhk}ý:Ó<br>Freie MasterMind-Variante mit ziemlich <br>intelligentem Rechner-Spieler.Q

Free MasterMind clone including a built in,
rather intelligent solver.About\Ein Spiel, um den Verstand<br>wachzuhalten ;-)&A needful game to train your brain ;-)AboutInfo ColorCodeAbout ColorCodeAbout AutorAuthorAbout* Dieses Programm ist freie Software. Sie können es unter den Bedingungen der GNU General Public License, wie von der Free Software Foundation veröffentlicht, weitergeben und/oder modifizieren, entweder gemäß Version 3 der Lizenz oder (nach Ihrer Option) jeder späteren Version.ï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.AboutVersionVersionAboutÿÿÿÿiconAboutVSpiel-Nummer in die Zwischenablage kopierenCopy Game Number to Clipboard ButtonsCellSpiel startenPlay this Game again ButtonsCell*Aus der Liste löschenRemove from List ButtonsCell6Spiel als Favorit speichernSave this Game as Bookmark ButtonsCellB&Spiel in den Favoriten speichern&Bookmark Current Game ColorCode&Favoriten &Bookmarks ColorCode,Spiel &Nummer kopieren&Copy Game Number ColorCode &Spiel&Game ColorCode&Denk-Pause &Have a Break ColorCode &Hilfe&Help ColorCode&Bestenliste &Highscores ColorCode&Neues Spiel &New Game ColorCode2&Zuletzt gespielte Spiele &Recent Games ColorCode&Spiel neu &beginnen &Restart Game ColorCode(Spiel &weiterspielen &Resume Game ColorCode &Reihe&Row ColorCode&Einstellungen &Settings ColorCode2&Bestimmtes Spiel starten&Start particular Game ColorCode &Handtuch werfen&Throw In The Towel ColorCodeInfo &ColorCodeAbout &ColorCode ColorCodeInfo &Qt About &Qt ColorCodeInfo QtAbout Qt ColorCode<Steine gleicher Farbe erlaubenAllow Pegs of Same Color ColorCode<Steine gleicher Farbe erlaubenAllow Pegs of the Same Color ColorCodeLAnfänger (2 Farben, 2 Slots, Doppelte)%Beginner (2 Colors, 2 Slots, Doubles) ColorCodeLFordernd (8 Farben, 4 Slots, Doppelte)(Challenging (8 Colors, 4 Slots, Doubles) ColorCodeNKlassisch (6 Farben, 4 Slots, Doppelte)$Classic (6 Colors, 4 Slots, Doubles) ColorCodeReihe leeren Clear Row ColorCode^Reihen nach Setzen des letzten Steins auswerten&Close Rows when the last Peg is placed ColorCodeColorCode ColorCode ColorCode FarbenColors ColorCode(Rechner gegen MenschComputer vs Human ColorCode(Rechner gegen MenschComputer vs. Human ColorCode<Lassen Sie Ihren Rechner ratenComputer's Guess ColorCode@Glückwunsch! Sie haben gewonnen!Congratulation! You have won! ColorCodeÿÿÿÿCtrl+A ColorCodeStrg+Alt+B Ctrl+Alt+B ColorCodeÿÿÿÿ Ctrl+Alt+C ColorCodeStrg+Alt+H Ctrl+Alt+H ColorCodeÿÿÿÿ Ctrl+Alt+N ColorCodeStrg+Alt+R Ctrl+Alt+R ColorCode Strg+BCtrl+B ColorCodeÿÿÿÿCtrl+C ColorCodeÿÿÿÿCtrl+D ColorCodeÿÿÿÿCtrl+G ColorCodeÿÿÿÿCtrl+H ColorCodeÿÿÿÿCtrl+I ColorCodeÿÿÿÿCtrl+L ColorCodeÿÿÿÿCtrl+M ColorCodeÿÿÿÿCtrl+N ColorCodeÿÿÿÿCtrl+P ColorCodeÿÿÿÿCtrl+Q ColorCodeÿÿÿÿCtrl+R ColorCodeStrg+Umschalt+B Ctrl+Shift+B ColorCodeÿÿÿÿ Ctrl+Shift+C ColorCodeÿÿÿÿ Ctrl+Shift+H ColorCodeÿÿÿÿ Ctrl+Shift+L ColorCodeÿÿÿÿ Ctrl+Shift+N ColorCodeÿÿÿÿ Ctrl+Shift+P ColorCodeÿÿÿÿ Ctrl+Shift+R ColorCodeStrg+Umschalt+S Ctrl+Shift+S ColorCodeÿÿÿÿ Ctrl+Shift+T ColorCodeÿÿÿÿCtrl+T ColorCodeHKeine Steine gleicher Farbe erlaubenDisallow Pegs of Same Color ColorCodeHKeine Steine gleicher Farbe erlaubenDisallow Pegs of the Same Color ColorCode*Spiel-Nummer anzeigenDisplay Game Number ColorCode:Wollen Sie wirklich aufgeben?Do you really want to give in? ColorCodedWollen Sie aufgeben und ein neues Spiel beginnen?,Do you want to give in and start a new Game? ColorCodedErtragen Sie es nicht, mich gewinnen zu sehen? ;-)%Don't you like to see me winning? ;-) ColorCode FertigDone ColorCode6Vorherige Reihe duplizierenDuplicate Previous Row ColorCodeB&eendenE&xit ColorCodeVLeicht (4 Farben, 3 Slots, Keine Doppelten)$Easy (4 Colors, 3 Slots, No Doubles) ColorCodeJPeinlich! Ich hab ein Spiel verloren!Embarrassing! I lost a game! ColorCodeÿÿÿÿF1 ColorCode*Reihe zufällig füllenFill Row by Random ColorCode SpielGame ColorCodeSpiele-&Listen Game &Lists ColorCodeSpiel Modus Game Mode ColorCodeSpiel-Nummer Game Number ColorCodeAufgebenGive In ColorCodeJSchwer (10 Farben, 5 Slots, Doppelte)"Hard (10 Colors, 5 Slots, Doubles) ColorCode(Mensch gegen RechnerHuman vs Computer ColorCode(Mensch gegen RechnerHuman vs. Computer ColorCode,Ich muß nachdenken ...Let me think ... ColorCode&SchwierigkeitsstufeLevel ColorCode(Schwierigkeitsstufen Level Presets ColorCodeHinweisMessage ColorCodeNeues SpielNew Game ColorCodeNeinNo ColorCodefNein! Das ist unmöglich! Haben Sie falsch bewertet?4Nope! Thats impossible! Did you gave me false hints? ColorCodeOnline-&Hilfe Online &Help ColorCode PausePaused ColorCode*Steine gleicher FarbePegs of Same Color ColorCode4Setzen Sie Ihre Steine ...Place Your pegs ... ColorCodeRPlatzieren Sie den geheimen ColorCode ...Place Your secret ColorCode ... ColorCode°Bitte bewerten Sie meinen Vorschlag. Nutzen Sie Ok-Button oder Eingabetaste wenn fertig.
The game properties like color count, slot count etc. will be displayed in the corresponding area above.

Click the Play button or press key Enter, to play the game. If a game is currently running, it will be aborted.GameTablesDialogHinweisMessageGameTablesDialogNeinNoGameTablesDialog*Steine gleicher FarbePegs of Same ColorGameTablesDialogSpielenPlayGameTablesDialog–Bitte vergeben Sie einen Namen. Ansonsten wird das Spiel nicht gespeichert.;Please provide a name! Otherwise your score won't be saved.GameTablesDialogLetzte Spiele Recent GamesGameTablesDialog Felder Slot CountGameTablesDialog¨Es werden unwideruflich alle Einträge aus der Liste entfernt Möchten Sie fortfahren?OThis will permanently remove all entries from the List. Do You want to proceed?GameTablesDialogSpielerUserGameTablesDialogJaYesGameTablesDialogAktionenActionsGamesListModel FarbenColorsGamesListModel DatumDateGamesListModelSpiel-Nr.Game No.GamesListModelNeinNoGamesListModel*Steine gleicher FarbePegs of Same ColorGamesListModel PlatzRankGamesListModel PunkteScoreGamesListModel FelderSlotsGamesListModelZeitTimeGamesListModelSpielerUserGamesListModelJaYesGamesListModelB... Schwierigkeitsstufe auswählen)... Select from predefined level settings PrefDialogXVerzögerung (in ms) zwischen den Spielzügen.-Adjust the delay (in ms) between two guesses. PrefDialog<Steine gleicher Farbe erlaubenAllow Pegs of Same Color PrefDialog‚Automatischer Eintrag in die Bestenliste mit untenstehendem Namen4Automatically insert Highscores using the name below PrefDialogHintergrund Background PrefDialogLAnfänger (2 Farben, 2 Slots, Doppelte)%Beginner (2 Colors, 2 Slots, Doubles) PrefDialogLFordernd (8 Farben, 4 Slots, Doppelte)(Challenging (8 Colors, 4 Slots, Doubles) PrefDialogNKlassisch (6 Farben, 4 Slots, Doppelte)$Classic (6 Colors, 4 Slots, Doubles) PrefDialogKlicken Sie hier, falls Sie die Farben-Anordnung geändert haben, um diese wieder in den ursprünglichen Zustand zurückzuversetzen.dClick here if you have changed the color order and now you want to revert it to it's initial state.  PrefDialog^Reihen nach Setzen des letzten Steins auswerten&Close Rows when the last Peg is placed PrefDialog FarbenColors PrefDialog(Rechner gegen MenschComputer vs. Human PrefDialogBedienelementeControls PrefDialog"Verzögerung in ms Delay in ms PrefDialog*Spiel-Nummer anzeigenDisplay Game Number PrefDialogZeigt die gegenwärtige Spiel-Nummer unterhalb des Spieles an. Um Erinnerungen zu vermeiden, kann die Anzeige hiermit unterdrückt werden.ZDisplay the current game number in the footer. To avoid remembering, you can hide it here. PrefDialogVLeicht (4 Farben, 3 Slots, Keine Doppelten)$Easy (4 Colors, 3 Slots, No Doubles) PrefDialogVordergrund Foreground PrefDialogSpielablauf Game Flow PrefDialogSpiele-Listen Game Lists PrefDialogSpiel Modus Game Mode PrefDialog&Spiel-EigenschaftenGame Properties PrefDialog&Spiel-Einstellungen Game Settings PrefDialogJSchwer (10 Farben, 5 Slots, Doppelte)"Hard (10 Colors, 5 Slots, Doubles) PrefDialog"Farben ausblenden Hide Colors PrefDialog StarkHigh PrefDialogBestenliste Highscores PrefDialog(Mensch gegen RechnerHuman vs. Computer PrefDialog¦Wenn aktiv, wird eine Reihe als geschlossen betrachtet, sobald Sie den letzten Stein platziert haben, und Ihr Vorschlag wird sofort ausgewertet. Diese Option hat nur Auswirkungen in Mensch-gegen-Rechner-Spielen. If checked, a row is closed as soon as you place the last peg and your guess is submitted immediatly. This option only affects the Human vs. Computer game mode. PrefDialogvWenn aktiv, werden die Hinweisfelder zu den Rechner-Schätzungen automatisch ausgefüllt. Diese Option betrifft nur Rechner-gegen-Mensch-Spiele. Falls aktiv, müssen Sie nur Ihre geheime Kombination anordnen. Der Rest des Spiels läuft dann automatisch bis zum Ende ab. Sie können allerdings eine Verzögerung bestimmen./If checked, the computer will determine the corresponding hints for the solver's guess. This option affects only Computer vs. Human games. If checked, you only have to place your secret combination. Then the rest of the game runs automatically until the end. But you can set a delay between the guesses. PrefDialog°Wenn diese Option aktiv ist, wird ein zusätzlicher Bezeichner für jeden Stein angezeigt.EIf this option is checked, an indicator inside each peg is displayed. PrefDialogWenn diese Option aktiv ist, können Kombinationen Steine gleicher Farbe enthalten. Solche Kombinationen sind etwas schwerer zu erraten.¸If this option is checked, the hidden combination may contain one or more (even all would be possible) pegs of the same color. If checked, the combination is generally harder to guess. PrefDialogBezeichner Indicators PrefDialog*Buchstaben-BezeichnerLetter Indicators PrefDialogòBegrenzen Sie die Anzahl der Einträge in den Tabellen wie etwa der Bestenliste etc. Werte zwischen 5 und 50 sind möglich.]Limit the number of rows in game tables like highscores etc. Valid values range from 5 to 50. PrefDialogSchwachLow PrefDialog,Maximale Zeilenanzahl:Maximum Row Count:  PrefDialog MittelMedium PrefDialogRName (erforderlich für die zweite Option)&Name (mandatory for the second option) PrefDialog"Zahlen-BezeichnerNumber Indicators PrefDialog"Anzahl der FarbenNumber of Colors PrefDialog"Anzahl der FelderNumber of Slots PrefDialog’Gesamtanzahl der möglichen Farben. Höhere Werte sind schwerer zu erraten.ANumber of all possible colors. Higher values are harder to guess. PrefDialog¬Die Anzahl der Steine in einer einzelnen Reihe. Höhere Werte sind schwerer zu erraten.BNumber of pegs in a single row. Higher values are harder to guess. PrefDialogXOder setzen Sie die einzelnen Eigenschaften:!Or Set the Particular Properties: PrefDialogEinstellungen Preferences PrefDialogGeben Sie einen Namen mit maximal 20 Zeichen für Einträge in die Bestenliste an. Sollten Sie die obenstehende Option für automatische Einträge gewählt haben, ist dieser Name zwingend erforderlich. Sollten Sie die andere Option gewählt haben, wird dieser Name als Vorschlag genutzt, den Sie jedoch im Dialogfenster ändern können.æProvide a name with maximum 20 characters here to be used for highscore entries. If you checked the automatic option above, this name is mandatory, otherwise it will be used as proposal which you may change later in the dialog. PrefDialogŒBestenliste mit Namens-Eingabe anzeigen, wenn ein Spiel gewonnen wurdeBRaise the dialog after a game has been won and prompt for the name PrefDialog8Farbreihenfolge zurücksetzenReset Color Order PrefDialogHWählen Sie eine Schwierigkeitsstufe: Select One of the Level Presets: PrefDialogêWählen Sie eine der 3 verschiedenen Spielstärken für Ihren Rechner-Gegner aus. Diese Option hat nur Einfluß auf Rechner-gegen-Mensch-Spiele. Für die Rechner-Rat-Funktion im Mensch-gegen-Rechner-Modus wird immer die höchste Spielstärke verwendet.ÝSelect from 3 different strength levels for your computer opponent. This option only affects the Computer vs. Human game mode. For the computer's guess in the Human vs. Computer mode always the highest level will be used. PrefDialogðWählen Sie eine vordefinierte Kombination der drei verschiedenen, die Schwierigkeitsstufe beeinflussenden Einstellungen.ÁSelect from predefined combinations of the three different level related settings, the number of colors, the number of slots (columns) and the possibility of pegs of the same color in one row.  PrefDialog¨Wählen Sie einen Spiel-Modus aus. Im 1. Fall müssen Sie versuchen, die verborgene, rechnergenerierte Kombination zu erraten. Im 2. Fall wird Ihr Rechner versuchen, eine geheime Kombination Ihrer Wahl zu erraten.ÁSelect from the different game modes. In the 1. mode you have to to guess the hidden, computer generated combination, In the 2. mode your computer will try to guess your own secret combination. PrefDialog6Hinweise automatisch setzenSet Hints automatically PrefDialog&Spiel-Zeit anzeigenShow Game Timer PrefDialog<Bezeichner für Steine anzeigenShow Indicators inside pegs PrefDialog&Menüleiste anzeigen Show Menubar PrefDialog*Statusleiste anzeigenShow Statusbar PrefDialogRZehntel- und Hunderstel-Sekunden anzeigenShow Tenth and Hundredth PrefDialog.Werkzeugleiste anzeigen Show Toolbar PrefDialogHMenüleiste anzeigen oder ausblenden.Show or hide the Menubar. PrefDialogLStatusleiste anzeigen oder ausblenden.Show or hide the Statusbar. PrefDialogPWerkzeugleiste anzeigen oder ausblenden.Show or hide the Toolbar. PrefDialog FelderSlots PrefDialogRechner-SpielerSolver PrefDialogRechner-StärkeSolver Strength PrefDialogZeitmesserTimer PrefDialogŠSollte Sie die Zeitanzeige unruhig machen, wählen Sie diese Option abCUncheck this if you are confused about the time as fast running ;-) PrefDialoghFarben zur Markierung der gegenwärtigen Zeile ändern)Use Customized Table Row Highlight Colors PrefDialog*Bestenliste verwendenUse Highscores PrefDialog²Die gleiche, neutrale Farbe für alle Steine verwenden, falls Bezeichner angezeigt werden.NUse the same neutral background color for each peg, when indicators are shown. PrefDialogHBuchstaben als Bezeichner verwenden.!Use unique letters as indicators. PrefDialog@Zahlen als Bezeichner verwenden.!Use unique numbers as indicators. PrefDialog$BenutzeroberflächeUser Interface PrefDialogUm die Ruhe zu bewahren ;-), können Sie den Zeitmesser verbergen. Doch wie stets, auch verborgen läuft die Zeit hinterrücks weiter.`You may hide the timer to keep calm ;-) But note! Even hidden, time's running in the background. PrefDialogŠKlicken Sie die Kreise, um meinen Vorschlag zu bewerten. Drücken Sie Strg+H oder die entsprechende Werkzeugleisten-Schaltfläche, um die Bewertung einem unparteiischen Teil von mir zu übertragen ;-)…Click the circles to rate my guess. Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-)RowHint$Kombination testenCommit Your solutionRowHintˆColorCode-0.8.5/timedisplaybg.h0000644000175000017500000000232512610773251015055 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef TIMEDISPLAYBG_H #define TIMEDISPLAYBG_H #include #include class TimeDisplayBg : public QGraphicsItem { public: TimeDisplayBg(); protected: QRectF boundingRect() const; void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); private: QRectF mRect; QRectF mUpdateRect; QBrush mBgBrush; QPen mFramePen; }; #endif // TIMEDISPLAYBG_H ColorCode-0.8.5/rowhint.h0000644000175000017500000000373412610773251013717 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef ROWHINT_H #define ROWHINT_H #include #include #include #include #include #include #include "colorcode.h" class RowHint : public QObject, public QGraphicsItem { Q_OBJECT Q_INTERFACES(QGraphicsItem) public: RowHint(QObject* parent = 0); ~RowHint(); int mIx; bool mActive; bool mSolved; std::vector mHints; int GetIx() const; bool IsActive() const; std::vector GetHints(); void SetIx(const int ix); void SetPegCnt(const int pegcnt); void SetGameMode(const int gamemode); void SetActive(bool b); void SetPaused(const bool b); void DrawHints(std::vector res); void Reset(const int pegcnt, const int gamemode); void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); QRectF boundingRect() const; QPainterPath shape() const; signals: void HintPressedSignal(int ix); protected: void mousePressEvent(QGraphicsSceneMouseEvent* e); private: static const int mPegPos[4][5][3]; int mPegCnt; int mGameMode; QPen mPen; QBrush mBrush0; QBrush mBrush1; QRectF outlineRect() const; }; #endif // ROWHINT_H ColorCode-0.8.5/buttondelegate.cpp0000644000175000017500000000721012610773251015557 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include #include "highscoresmodel.h" #include "buttondelegate.h" #include "settings.h" ButtonDelegate::ButtonDelegate(QWidget* parent) : QStyledItemDelegate(parent) { } GamesListModel* ButtonDelegate::GetGamesListModel(const QModelIndex &index) const { if (!index.isValid()) { return NULL; } GamesListModel* glm = qobject_cast(const_cast(index.model())); return glm; } QSize ButtonDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const { return QStyledItemDelegate::sizeHint(option, index); } QWidget* ButtonDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem &option, const QModelIndex &index) const { GamesListModel* glm = GetGamesListModel(index); if (glm != NULL && index.column() == glm->GetColIx(GamesListModel::COL_DELETE)) { ButtonsCell* editor; if (glm->GetId() != GamesListModel::MODEL_ID_SAVED) { editor = new ButtonsCell(parent); } else { editor = new ButtonsCell(parent, ButtonsCell::ACTIONID_SAVE); } editor->setMouseTracking(true); editor->setAttribute(Qt::WA_Hover, true); editor->setAttribute(Qt::WA_AlwaysShowToolTips, true); connect(editor, SIGNAL(CellButtonClickedSignal()), this, SLOT(ButtonClickedSlot())); return editor; } else if (glm != NULL && index.column() == glm->GetColIx(GamesListModel::COL_USERNAME)) { QLineEdit* editor = new QLineEdit(parent); editor->setMaxLength(Settings::MAX_LENGTH_USERNAME); #ifdef Q_WS_X11 editor->setFrame(false); #endif editor->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter); return editor; } else { return QStyledItemDelegate::createEditor(parent, option, index); } } void ButtonDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const { GamesListModel* glm = GetGamesListModel(index); if (glm != NULL && index.column() == glm->GetColIx(GamesListModel::COL_DELETE)) { ; } else { QStyledItemDelegate::setEditorData(editor, index); } } void ButtonDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex &index) const { if (!index.isValid() || editor == NULL) { return; } GamesListModel* glm = GetGamesListModel(index); if (glm != NULL && index.column() == glm->GetColIx(GamesListModel::COL_DELETE)) { ButtonsCell* editor = qobject_cast(sender()); if (editor != NULL) { glm->setData(index, editor->GetActionId(), Qt::EditRole); } } else { QStyledItemDelegate::setModelData(editor, model, index); } } void ButtonDelegate::ButtonClickedSlot() { ButtonsCell* editor = qobject_cast(sender()); emit commitData(editor); } ColorCode-0.8.5/gamenodisplay.h0000644000175000017500000000221212610773251015047 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef GAMENODISPLAY_H #define GAMENODISPLAY_H #include #include #include #include class GameNoDisplay : public QGraphicsTextItem { Q_OBJECT public: GameNoDisplay(QGraphicsItem* parent = 0); void ShowStr(QString str); private: QFont mFont; QRectF mUpdateRect; }; #endif // GAMENODISPLAY_H ColorCode-0.8.5/colorpeg.h0000644000175000017500000000573012610773251014035 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef COLORPEG_H #define COLORPEG_H #include #include #include #include #include #include #include "colorcode.h" #include "pegrow.h" #include "rowhint.h" #include "settings.h" class ColorPeg : public QObject, public QGraphicsItem { Q_OBJECT Q_INTERFACES(QGraphicsItem) public: ColorPeg(QObject* parent = 0); ~ColorPeg(); int mId; void SetId(int id); void SetPegType(PegType* pt); void SetPegRow(PegRow* pr); QRectF boundingRect() const; QPainterPath shape() const; void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); void SetType(const int t); void SetPaused(const bool b); void SetEnabled(const bool b); void SetIndicator(const bool b, const int t, const bool c); void SetCursorShape( Qt::CursorShape shape = Qt::ArrowCursor, const bool force = false); PegType* GetPegType(); int GetType() const; QColor GetPenColor() const; QColor GetBrushColor() const; bool GetIsDragged() const; bool IsBtn() const; int GetSort() const; void SetBtn(bool b); void Reset(); void ForceRelease(); signals: void PegReleasedSignal(ColorPeg* cp); void PegPressSignal(ColorPeg* cp); void PegSortSignal(ColorPeg* cp); protected: PegType* mPegType; QVariant itemChange(GraphicsItemChange change, const QVariant &value); void mousePressEvent(QGraphicsSceneMouseEvent* e); void mouseReleaseEvent(QGraphicsSceneMouseEvent* e); private: static const QFont mFont; static QFont GetLetterFont(); static const QBrush mShadowBrush; static QBrush GetShadowBrush(); static const QBrush mOutlineBrush; static QBrush GetOutlineBrush(); static const QBrush mGlossyBrush; static QBrush GetGlossyBrush(); static const QBrush mNeutralBrush; static QBrush GetNeutralBrush(); QRectF GetColorRect() const; QRectF outlineRect() const; void SetIsDragged(bool b); PegRow* mPegRow; const QBrush mBrush; int mType; int mSort; bool mIsBtn; bool mIsDragged; bool mShowIndicator; int mIndicatorType; bool mHideColor; bool mEnabledBuff; }; #endif // COLORPEG_H ColorCode-0.8.5/colorpeg.cpp0000644000175000017500000001727112610773251014373 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include #include "colorpeg.h" using namespace std; const QFont ColorPeg::mFont = ColorPeg::GetLetterFont(); const QBrush ColorPeg::mShadowBrush = ColorPeg::GetShadowBrush(); const QBrush ColorPeg::mOutlineBrush = ColorPeg::GetOutlineBrush(); const QBrush ColorPeg::mGlossyBrush = ColorPeg::GetGlossyBrush(); const QBrush ColorPeg::mNeutralBrush = ColorPeg::GetNeutralBrush(); QFont ColorPeg::GetLetterFont() { QFont lf("Arial", 12, QFont::Bold, false); lf.setStyleHint(QFont::SansSerif); lf.setPixelSize(16); return lf; } QBrush ColorPeg::GetNeutralBrush() { QRadialGradient rgrad(20, 20, 40, 5, 5); rgrad.setColorAt(0.0, QColor(0xff, 0xff, 0xff, 0xff)); rgrad.setColorAt(1.0, QColor(0x80, 0x80, 0x80, 0xff)); return QBrush(rgrad); } QBrush ColorPeg::GetShadowBrush() { QRadialGradient rgrad(22, 22, 22, 22, 22); rgrad.setColorAt(0.3, QColor(0, 0, 0, 0xff)); rgrad.setColorAt(1.0, QColor(0, 0, 0, 0)); return QBrush(rgrad); } QBrush ColorPeg::GetOutlineBrush() { QLinearGradient lgrad(0, 0, 38, 38); lgrad.setColorAt(0.0, QColor(0, 0, 0, 0xa0)); lgrad.setColorAt(1.0, QColor(0xff, 0xff, 0xff, 0xa0)); return QBrush(lgrad); } QBrush ColorPeg::GetGlossyBrush() { QLinearGradient lgrad(20, 4, 20, 20); lgrad.setColorAt(0.0, QColor(0xff, 0xff, 0xff, 0x80)); lgrad.setColorAt(1.0, QColor(0xff, 0xff, 0xff, 0x00)); return QBrush(lgrad); } ColorPeg::ColorPeg(QObject*) { setFlags(QGraphicsItem::GraphicsItemFlags(0)); mPegType = NULL; mPegRow = NULL; SetBtn(true); mIsDragged = false; mShowIndicator = false; mHideColor = false; mSort = 0; mId = -1; } ColorPeg::~ColorPeg() { } void ColorPeg::SetPegType(PegType *pt) { mPegType = pt; setFlags(ItemIsMovable | ItemIsSelectable); } void ColorPeg::SetPegRow(PegRow *pr) { mPegRow = pr; } PegType* ColorPeg::GetPegType() { return mPegType; } void ColorPeg::SetId(int id) { mId = id; } bool ColorPeg::IsBtn() const { return mIsBtn; } int ColorPeg::GetSort() const { return mSort; } void ColorPeg::SetBtn(bool b) { mIsBtn = b; SetCursorShape(); } int ColorPeg::GetType() const { return mType; } void ColorPeg::SetType(const int t) { mType = t; } void ColorPeg::Reset() { SetIsDragged(false); setSelected(false); if (mPegRow != NULL) { mPegRow->RemovePeg(this); mPegRow = NULL; } } bool ColorPeg::GetIsDragged() const { return mIsDragged; } void ColorPeg::SetIsDragged(bool b) { if (false == b) { update(boundingRect()); } mIsDragged = b; } void ColorPeg::SetEnabled(const bool b) { setEnabled(b); SetCursorShape(); } void ColorPeg::SetPaused(const bool b) { bool enable; if (b) { mEnabledBuff = isEnabled(); enable = false; } else { enable = mEnabledBuff; } SetEnabled(enable); } void ColorPeg::SetIndicator(const bool b, const int t, const bool c) { if (mShowIndicator != b || mIndicatorType != t || mHideColor != c) { mShowIndicator = b; mIndicatorType = t; mHideColor = c; update(boundingRect()); } } void ColorPeg::SetCursorShape(Qt::CursorShape shape, const bool force) { if (!force) { if (mIsDragged && isEnabled()) { if (mSort == 0) { shape = Qt::ClosedHandCursor; } else if (mSort == 1) { shape = Qt::SizeVerCursor; } else { shape = Qt::SplitVCursor; } } else if (isEnabled()) { shape = Qt::OpenHandCursor; } } if (cursor().shape() != shape) { setCursor(QCursor(shape)); } } QVariant ColorPeg::itemChange(GraphicsItemChange change, const QVariant &value) { if (change == ItemSelectedHasChanged) { scene()->update(scene()->sceneRect()); } return QGraphicsItem::itemChange(change, value); } void ColorPeg::ForceRelease() { QGraphicsSceneMouseEvent re(QEvent::GraphicsSceneMouseRelease); re.setButton(Qt::LeftButton); mouseReleaseEvent(&re); } void ColorPeg::mousePressEvent(QGraphicsSceneMouseEvent *e) { QGraphicsItem::mousePressEvent(e); if (mPegType != NULL) { if (e->button() == Qt::LeftButton) { Reset(); SetIsDragged(true); if (IsBtn() && (e->modifiers() & Qt::ControlModifier) != 0) { if ((e->modifiers() & Qt::ShiftModifier) == 0) { mSort = 1; } else { mSort = 2; } } else { mSort = 0; } emit PegPressSignal(this); SetCursorShape(); } } } void ColorPeg::mouseReleaseEvent (QGraphicsSceneMouseEvent *e) { QGraphicsItem::mouseReleaseEvent(e); if (mPegType != NULL) { if (e->button() == Qt::LeftButton) { SetIsDragged(false); emit PegReleasedSignal(this); SetCursorShape(); } } } QPainterPath ColorPeg::shape() const { QPainterPath path; path.addEllipse(boundingRect()); return path; } QRectF ColorPeg::boundingRect() const { int margin; if (mIsDragged) { margin = 8; } else { margin = 1; } return outlineRect().adjusted(-margin, -margin, +margin, +margin); } QRectF ColorPeg::outlineRect() const { QRectF rect(0.0, 0.0, 36.0, 36.0); return rect; } QRectF ColorPeg::GetColorRect() const { QRectF rect(1.0, 1.0, 34.0, 34.0); return rect; } void ColorPeg::paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) { painter->setPen(Qt::NoPen); if (!mIsDragged) { painter->setBrush(ColorPeg::mOutlineBrush); painter->drawEllipse(outlineRect()); } else { painter->translate(QPointF(-2, -2)); painter->setBrush(ColorPeg::mShadowBrush); painter->drawEllipse(QRectF(0, 0, 44, 44)); painter->translate(QPointF(2, 2)); } if (!mHideColor) { painter->setBrush(QBrush(*mPegType->grad)); painter->drawEllipse(GetColorRect()); } else { painter->setBrush(mNeutralBrush); painter->drawEllipse(GetColorRect()); } painter->setBrush(mGlossyBrush); painter->drawEllipse(QRectF(5, 3, 24, 20)); if (mShowIndicator) { painter->setPen(QPen(QColor("#303133"))); painter->setRenderHint(QPainter::TextAntialiasing, true); painter->setFont(mFont); QString ind; if (mIndicatorType == Settings::INDICATOR_LETTER) { ind = QString(mPegType->let); } else { ind.setNum((mPegType->ix + 1)); } painter->drawText(QRectF(1.5, 2.0, 32.0, 32.0), Qt::AlignCenter, ind); } } ColorCode-0.8.5/ccsolver.h0000644000175000017500000000566012610773251014045 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef CCSOLVER_H #define CCSOLVER_H #include #include #include "colorcode.h" using namespace std; class CCSolver : public QThread { Q_OBJECT public: static const int STRENGTH_LOW; static const int STRENGTH_MEDIUM; static const int STRENGTH_HIGH; static const int STRENGTH_DYNAMIC; CCSolver(QObject* parent = 0); ~CCSolver(); vector GetSolutionByNo(const uint no) const; int GetAllCnt() const; void NewGame(const int ccnt, const int pcnt = 4, const int doubles = 1, const int level = 2, const int gcnt = 10); void RestartGame(); string FirstGuess(); void GuessIn(string str); void GuessIn(const vector* rowsol); int ResIn(const vector* res); int* GuessOut(); void StartGuess(); void Interrupt(); int GetRandGameNo(const int ccnt, const int pcnt, const int doubles) const; const int* GetGameByNo(const int uint) const; int CalcAllCnt(const int ccnt, const int pcnt) const; int CalcPosCnt(const int ccnt, const int pcnt, const int doubles) const; void run(); signals: void GuessDoneSignal(); private: static const int mFGCnts[4][9][4]; static const int mGameNos[66][4]; static const int GAME_NOS_CNT; volatile bool mInterrupt; int mMaxGuessCnt; int mColorCnt; int mPegCnt; int mDoubles; int mLevel; volatile int mLastGuess; int mLastPosCnt; int mAllCnt; int mPosCnt; int mMaxPosCnt; int mHistCnt; int mGuessCnt; int mMaxRes; int mResCnt; int mRestartCnt; int* mResTable; int* mCascade; int* mPossible; int* mPos2AllIx; int** mAllTable; int** mHist; int* mS; int* mP; void FreeTables(); void InitTables(); void FillTable(const int ix); int RowCmp(const int* sol, const int* pat); void UpdPos(const int ix, const int res); int Guess(); string RowOut(const int* r); int Row2Ix(const string str); int Row2Ix(const vector* v); int IntPow(const int b, const int e) const; int IntFac(const int n) const; int GetRealGameNo(const uint no) const; int GetGameIxByNo(const int no) const; }; #endif // CCSOLVER_H ColorCode-0.8.5/colorcode.cpp0000644000175000017500000020337612610773251014535 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include #include "settings.h" #include "ccsolver.h" #include "colorcode.h" #include "colorpeg.h" #include "pegrow.h" #include "rowhint.h" #include "msg.h" #include "background.h" #include "about.h" #include "prefdialog.h" #include "solutionrow.h" #include "graphicsbtn.h" #include "pegfactory.h" #include "gamenodisplay.h" #include "timedisplay.h" #include "timedisplaybg.h" #include "highscore.h" #include "gametablesdialog.h" using namespace std; ColorCode* ColorCode::INSTANCE = NULL; const QString ColorCode::VERSION = "0.8.5"; volatile bool ColorCode::mNoAct = false; volatile bool ColorCode::mIgnoreGuess = false; const int ColorCode::STATE_NONE = 0; const int ColorCode::STATE_RUNNING = 1; const int ColorCode::STATE_PAUSED = 2; const int ColorCode::STATE_WON = 3; const int ColorCode::STATE_LOST = 4; const int ColorCode::STATE_GAVE_UP = 5; const int ColorCode::STATE_ERROR = 6; const int ColorCode::MODE_HVM = 0; const int ColorCode::MODE_MVH = 1; const int ColorCode::MAX_COLOR_CNT = 10; const int ColorCode::MIN_COLOR_CNT = 2; const int ColorCode::SOLUTION_ROW_IX = -1; const int ColorCode::LAYER_BG = 1; const int ColorCode::LAYER_ROWS = 2; const int ColorCode::LAYER_HINTS = 3; const int ColorCode::LAYER_SOL = 4; const int ColorCode::LAYER_MSG = 5; const int ColorCode::LAYER_PEGS = 6; const int ColorCode::LAYER_BTNS = 7; const int ColorCode::LAYER_DRAG = 8; const int ColorCode::LEVEL_SETTINGS[5][3] = { { 2, 2, 1}, { 4, 3, 0}, { 6, 4, 1}, { 8, 4, 1}, {10, 5, 1} }; int ColorCode::mMaxRowCnt = 10; int ColorCode::mRowY0 = 130; int ColorCode::mColorCnt = 0; int ColorCode::mPegCnt = 0; int ColorCode::mDoubles = 1; int ColorCode::mXOffs = 0; int ColorCode::mMaxZ = 0; int ColorCode::mLevel = -1; int ColorCode::mGameMode = ColorCode::MODE_HVM; QString ColorCode::GAME_TITLE = ""; ColorCode::ColorCode() { SetState(STATE_NONE); GAME_TITLE = tr("ColorCode"); setWindowTitle(GAME_TITLE + " "); setWindowIcon(QIcon(QPixmap(":/img/cc16.png"))); setIconSize(QSize(16, 16)); setMouseTracking(true); setAttribute(Qt::WA_Hover, true); setAttribute(Qt::WA_AlwaysShowToolTips, true); INSTANCE = this; QCoreApplication::setOrganizationName("dirks"); QCoreApplication::setOrganizationDomain("laebisch.com"); QCoreApplication::setApplicationName("colorcode"); QTime midnight(0, 0, 0); qsrand(midnight.secsTo(QTime::currentTime())); Init(); } ColorCode::~ColorCode() { mIgnoreGuess = true; mSettings->WriteSettings(); WaitForSolver(); } void ColorCode::Init() { mGameTablesDialog = new GameTablesDialog(this); mGameInput = NULL; mFinishedGameInput = NULL; mPrefDialog = NULL; mSettings = GetSettings(); connect(mSettings, SIGNAL(ReadSettingsGamesDone()), mGameTablesDialog, SLOT(ReadSettingsGamesSlot())); connect(this, SIGNAL(NewHighScoreSignal(CCGame*)), mGameTablesDialog, SLOT(InsertHighScoreSlot(CCGame*))); connect(mGameTablesDialog, SIGNAL(NewGameInputSignal(CCGame*)), this, SLOT(NewGameInputSlot(CCGame*))); mSettings->Init(); mHighScore = new HighScore(); mCurRow = NULL; mColorCnt = 0; mGameCnt = 0; mGameId = 0; mGuessCnt = 0; mHintsCnt = 0; mSolverStrength = CCSolver::STRENGTH_HIGH; mOrigSize = NULL; mMenuBar = menuBar(); // as long as menuBar's size is invalid populated initially ... done for 4.6 #ifdef Q_WS_X11 #if QT_VERSION < 0x040600 mScene = new QGraphicsScene(0, 0, 320, 580); #else mScene = new QGraphicsScene(0, 0, 320, 560); #endif #else mScene = new QGraphicsScene(0, 0, 320, 560); #endif mScene->setBackgroundBrush(QBrush(QColor("#b0b1b3"))); mView = new QGraphicsView; mView->setScene(mScene); mView->setGeometry(0, 0, 320, 560); mView->setDragMode(QGraphicsView::NoDrag); mView->setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing); mView->setContextMenuPolicy(Qt::NoContextMenu); mView->setAlignment(Qt::AlignCenter); mView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); mView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); mView->setFrameStyle(QFrame::NoFrame); setCentralWidget(mView); mBg = new BackGround(); mScene->addItem(mBg); mBg->setPos(0, 0); mBg->setZValue(LAYER_BG); mMsg = new Msg; mScene->addItem(mMsg); mMsg->setPos(20, 0); mMsg->setZValue(LAYER_MSG); mGameNoDisplay = new GameNoDisplay; mScene->addItem(mGameNoDisplay); mGameNoDisplay->setPos(10, 534); mGameNoDisplay->setZValue(LAYER_MSG); mDoneBtn = new GraphicsBtn; mDoneBtn->SetLabel(tr("Done")); mScene->addItem(mDoneBtn); mDoneBtn->setPos(84, 118); mDoneBtn->setZValue(LAYER_BTNS); mDoneBtn->ShowBtn(false); connect(mDoneBtn, SIGNAL(BtnPressSignal(GraphicsBtn *)), this, SLOT(DoneBtnPressSlot(GraphicsBtn *))); mOkBtn = new GraphicsBtn; mOkBtn->SetWidth(38); mOkBtn->SetLabel("ok"); mScene->addItem(mOkBtn); mOkBtn->setPos(5, 329); mOkBtn->setZValue(LAYER_BTNS); mOkBtn->ShowBtn(false); connect(mOkBtn, SIGNAL(BtnPressSignal(GraphicsBtn *)), this, SLOT(DoneBtnPressSlot(GraphicsBtn *))); mTimerBtn = new GraphicsBtn; mTimerBtn->SetWidth(261); mTimerBtn->SetLabel(""); mScene->addItem(mTimerBtn); mTimerBtn->setScale(0.44); mTimerBtn->setPos(102, 110); mTimerBtn->setZValue(LAYER_HINTS); mTimerBtn->InvertStates(); mTimerBtn->ShowBtn(true); connect(mTimerBtn, SIGNAL(BtnPressSignal(GraphicsBtn *)), this, SLOT(PauseGameSlot(GraphicsBtn *))); mSolutionRowBg = new GraphicsBtn; mSolutionRowBg->SetEnabled(false); mSolutionRowBg->SetWidth(219); mSolutionRowBg->SetLabel(""); mScene->addItem(mSolutionRowBg); mSolutionRowBg->setScale(1.14); mSolutionRowBg->setPos(35, 66); mSolutionRowBg->setZValue(LAYER_ROWS); mSolutionRowBg->SetStatesOpacity(1.0, 0.1); mSolutionRowBg->InvertStates(); mSolutionRowBg->ShowBtn(true); mPegFactory = new PegFactory(); connect(mPegFactory, SIGNAL(SnapPegSignal(ColorPeg*)), this, SLOT(SnapPegSlot(ColorPeg*))); mSolver = new CCSolver(this); connect(mSolver, SIGNAL(finished()), this, SLOT(SetSolverGuessSlot())); connect(mSolver, SIGNAL(GuessDoneSignal()), this, SLOT(SetSolverGuessSlot())); mHintsDelayTimer = new QTimer(); mHintsDelayTimer->setSingleShot(true); mHintsDelayTimer->setInterval(500); connect(mHintsDelayTimer, SIGNAL(timeout()), this, SLOT(SetAutoHintsSlot())); mGameTimerBg = new TimeDisplayBg(); mScene->addItem(mGameTimerBg); mGameTimerBg->setPos(50, 108); mGameTimerBg->setZValue(LAYER_SOL); mGameTimer = new TimeDisplay(); mScene->addItem(mGameTimer); mGameTimer->setPos(49, 109); mGameTimer->setZValue(LAYER_MSG); InitActions(); InitMenus(); InitToolBars(); statusBar()->setStyleSheet("QStatusBar::item { border: 0px solid black }; "); mStatusLabel = new QLabel(); statusBar()->addPermanentWidget(mStatusLabel, 0); InitSolution(); InitRows(); ApplySettingsSlot(); } void ColorCode::InitSolution() { mSolutionRow = new SolutionRow(); mSolutionRow->SetIx(SOLUTION_ROW_IX); mSolutionRow->setPos(50, 68); mSolutionRow->setZValue(LAYER_SOL); mScene->addItem(mSolutionRow); connect(mSolutionRow, SIGNAL(RemovePegSignal(ColorPeg*)), mPegFactory, SLOT(RemovePegSlot(ColorPeg*))); connect(mSolutionRow, SIGNAL(RowSolutionSignal(int)), this, SLOT(RowSolutionSlot(int))); } void ColorCode::InitRows() { PegRow* row; RowHint* hint; int xpos = 60; int ypos = mRowY0; int i; for (i = 0; i < mMaxRowCnt; ++i) { row = new PegRow(); row->SetIx(i); row->setPos(QPoint(xpos, ypos + (mMaxRowCnt - (i + 1)) * 40)); row->setZValue(LAYER_ROWS); row->SetActive(false); mScene->addItem(row); mPegRows[i] = row; connect(row, SIGNAL(RemovePegSignal(ColorPeg*)), mPegFactory, SLOT(RemovePegSlot(ColorPeg*))); connect(row, SIGNAL(RowSolutionSignal(int)), this, SLOT(RowSolutionSlot(int))); hint = new RowHint; hint->SetIx(i); hint->setPos(QPoint(4, ypos + (mMaxRowCnt - (i + 1)) * 40)); hint->setZValue(LAYER_HINTS); hint->SetActive(false); mScene->addItem(hint); mHintBtns[i] = hint; connect(hint, SIGNAL(HintPressedSignal(int)), this, SLOT(HintPressedSlot(int))); } } void ColorCode::InitActions() { mActNewGame = new QAction(tr("&New Game"), this); mActNewGame->setIcon(QIcon(":/img/document-new.png")); mActNewGame->setShortcut(tr("Ctrl+N")); connect(mActNewGame, SIGNAL(triggered()), this, SLOT(NewGameSlot())); mActSelectGame = new QAction(tr("&Start particular Game"), this); mActSelectGame->setIcon(QIcon(":/img/document-new.png")); mActSelectGame->setShortcut(tr("Ctrl+Alt+N")); connect(mActSelectGame, SIGNAL(triggered()), mGameTablesDialog, SLOT(ShowInputSlot())); mActCopyGameNo = new QAction(tr("&Copy Game Number"), this); mActCopyGameNo->setIcon(QIcon(":/img/edit-copy.png")); mActCopyGameNo->setShortcut(tr("Ctrl+C")); connect(mActCopyGameNo, SIGNAL(triggered()), this, SLOT(CopyGameNoSlot())); mActRestartGame = new QAction(tr("&Restart Game"), this); mActRestartGame->setIcon(QIcon(":/img/view-refresh.png")); mActRestartGame->setShortcut(tr("Ctrl+Shift+R")); connect(mActRestartGame, SIGNAL(triggered()), this, SLOT(RestartGameSlot())); mActGiveIn = new QAction(tr("&Throw In The Towel"), this); mActGiveIn->setIcon(QIcon(":/img/face-sad.png")); mActGiveIn->setShortcut(tr("Ctrl+G")); connect(mActGiveIn, SIGNAL(triggered()), this, SLOT(GiveInSlot())); mActPauseGame = new QAction(tr("&Have a Break"), this); mActPauseGame->setIcon(QIcon(":/img/pause.png")); mActPauseGame->setShortcut(tr("Ctrl+P")); connect(mActPauseGame, SIGNAL(triggered()), this, SLOT(PauseGameSlot())); mActSaveGame = new QAction(tr("&Bookmark Current Game"), this); mActSaveGame->setIcon(QIcon(":/img/bookmark_add.png")); mActSaveGame->setShortcut(tr("Ctrl+B")); connect(mActSaveGame, SIGNAL(triggered()), this, SLOT(SavePrevGameSlot())); mActShowHighScores = new QAction(tr("&Highscores"), this); mActShowHighScores->setIcon(QIcon(":/img/games-highscores.png")); mActShowHighScores->setShortcut(tr("Ctrl+Alt+H")); connect(mActShowHighScores, SIGNAL(triggered()), mGameTablesDialog, SLOT(ShowHighSlot())); mActShowPrevGames = new QAction(tr("&Recent Games"), this); mActShowPrevGames->setIcon(QIcon(":/img/history.png")); mActShowPrevGames->setShortcut(tr("Ctrl+Alt+R")); connect(mActShowPrevGames, SIGNAL(triggered()), mGameTablesDialog, SLOT(ShowPrevSlot())); mActShowSavedGames = new QAction(tr("&Bookmarks"), this); mActShowSavedGames->setIcon(QIcon(":/img/bookmark.png")); mActShowSavedGames->setShortcut(tr("Ctrl+Alt+B")); connect(mActShowSavedGames, SIGNAL(triggered()), mGameTablesDialog, SLOT(ShowSavedSlot())); mActExit = new QAction(tr("E&xit"), this); mActExit->setIcon(QIcon(":/img/application-exit.png")); mActExit->setShortcut(tr("Ctrl+Q")); connect(mActExit, SIGNAL(triggered()), this, SLOT(close())); mActShowToolbar = new QAction(tr("Show Toolbar"), this); mActShowToolbar->setCheckable(true); mActShowToolbar->setChecked(true); mActShowToolbar->setShortcut(tr("Ctrl+Shift+T")); connect(mActShowToolbar, SIGNAL(triggered()), this, SLOT(ShowToolbarSlot())); mActShowMenubar = new QAction(tr("Show Menubar"), this); mActShowMenubar->setCheckable(true); mActShowMenubar->setChecked(true); mActShowMenubar->setShortcut(tr("Ctrl+M")); connect(mActShowMenubar, SIGNAL(triggered()), this, SLOT(ShowMenubarSlot())); mActShowStatusbar = new QAction(tr("Show Statusbar"), this); mActShowStatusbar->setCheckable(true); mActShowStatusbar->setChecked(true); mActShowStatusbar->setShortcut(tr("Ctrl+Shift+B")); connect(mActShowStatusbar, SIGNAL(triggered()), this, SLOT(ShowStatusbarSlot())); mActShowTimer = new QAction(tr("Show Timer"), this); mActShowTimer->setCheckable(true); mActShowTimer->setChecked(true); mActShowTimer->setShortcut(tr("Ctrl+T")); connect(mActShowTimer, SIGNAL(triggered()), this, SLOT(ShowTimerSlot())); mActShowGameNo = new QAction(tr("Display Game Number"), this); mActShowGameNo->setCheckable(true); mActShowGameNo->setChecked(true); mActShowGameNo->setShortcut(tr("Ctrl+Shift+N")); connect(mActShowGameNo, SIGNAL(triggered()), this, SLOT(ShowGameNoSlot())); mActResetColorsOrder = new QAction(tr("Reset Color Order"), this); mActResetColorsOrder->setShortcut(tr("Ctrl+Shift+C")); connect(mActResetColorsOrder, SIGNAL(triggered()), mPegFactory, SLOT(ResetColorsOrderSlot())); mActShowIndicators = new QAction(tr("Show Indicators"), this); mActShowIndicators->setCheckable(true); mActShowIndicators->setChecked(false); mActShowIndicators->setShortcut(tr("Ctrl+Shift+L")); connect(mActShowIndicators, SIGNAL(triggered()), this, SLOT(SetIndicatorsSlot())); mActDoubles = new QAction(tr("Allow Pegs of the Same Color"), this); mActDoubles->setCheckable(true); mActDoubles->setChecked(true); mActDoubles->setShortcut(tr("Ctrl+Shift+S")); connect(mActDoubles, SIGNAL(triggered(bool)), this, SLOT(DoublesChangedSlot(bool))); mActDoublesIcon = new QAction(tr("Allow Pegs of Same Color"), this); mActDoublesIcon->setCheckable(true); mActDoublesIcon->setChecked(true); mActDoublesIcon->setToolTip(tr("Disallow Pegs of Same Color")); mActDoublesIcon->setIcon(QIcon(":/img/same_color_1.png")); connect(mActDoublesIcon, SIGNAL(triggered(bool)), this, SLOT(DoublesChangedSlot(bool))); mActAutoClose = new QAction(tr("Close Rows when the last Peg is placed"), this); mActAutoClose->setCheckable(true); mActAutoClose->setChecked(false); mActAutoClose->setShortcut(tr("Ctrl+L")); connect(mActAutoClose, SIGNAL(triggered()), this, SLOT(AutoCloseSlot())); mActAutoHints = new QAction(tr("Set Hints automatically"), this); mActAutoHints->setCheckable(true); mActAutoHints->setChecked(false); mActAutoHints->setShortcut(tr("Ctrl+Shift+H")); connect(mActAutoHints, SIGNAL(triggered()), this, SLOT(AutoHintsSlot())); mLaunchHelpAction = new QAction(tr("Online &Help"), this); mLaunchHelpAction->setIcon(QIcon(":/img/help.png")); mLaunchHelpAction->setShortcut(tr("F1")); connect(mLaunchHelpAction, SIGNAL(triggered()), this, SLOT(OnlineHelpSlot())); mActAbout = new QAction(tr("About &ColorCode"), this); mActAbout->setIcon(QIcon(":/img/help-about.png")); mActAbout->setShortcut(tr("Ctrl+A")); connect(mActAbout, SIGNAL(triggered()), this, SLOT(AboutSlot())); mActAboutQt = new QAction(tr("About &Qt"), this); mActAboutQt->setIcon(QIcon(":/img/qt.png")); mActAboutQt->setShortcut(tr("Ctrl+I")); connect(mActAboutQt, SIGNAL(triggered()), this, SLOT(AboutQtSlot())); mActRandRow = new QAction(tr("Fill Row by Random"), this); mActRandRow->setIcon(QIcon(":/img/system-switch-user.png")); mActRandRow->setShortcut(tr("Ctrl+R")); connect(mActRandRow, SIGNAL(triggered()), this, SLOT(RandRowSlot())); mActPrevRow = new QAction(tr("Duplicate Previous Row"), this); mActPrevRow->setIcon(QIcon(":/img/edit-copy.png")); mActPrevRow->setShortcut(tr("Ctrl+D")); connect(mActPrevRow, SIGNAL(triggered()), this, SLOT(PrevRowSlot())); mActClearRow = new QAction(tr("Clear Row"), this); mActClearRow->setIcon(QIcon(":/img/edit-clear.png")); mActClearRow->setShortcut(tr("Ctrl+Alt+C")); connect(mActClearRow, SIGNAL(triggered()), this, SLOT(ClearRowSlot())); mActLevelEasy = new QAction(tr("Beginner (2 Colors, 2 Slots, Doubles)"), this); mActLevelEasy->setData(0); mActLevelEasy->setCheckable(true); mActLevelEasy->setChecked(false); connect(mActLevelEasy, SIGNAL(triggered()), this, SLOT(SetLevelSlot())); mActLevelClassic = new QAction(tr("Easy (4 Colors, 3 Slots, No Doubles)"), this); mActLevelClassic->setData(1); mActLevelClassic->setCheckable(true); mActLevelClassic->setChecked(false); connect(mActLevelClassic, SIGNAL(triggered()), this, SLOT(SetLevelSlot())); mActLevelMedium = new QAction(tr("Classic (6 Colors, 4 Slots, Doubles)"), this); mActLevelMedium->setData(2); mActLevelMedium->setCheckable(true); mActLevelMedium->setChecked(true); connect(mActLevelMedium, SIGNAL(triggered()), this, SLOT(SetLevelSlot())); mActLevelChallenging = new QAction(tr("Challenging (8 Colors, 4 Slots, Doubles)"), this); mActLevelChallenging->setData(3); mActLevelChallenging->setCheckable(true); mActLevelChallenging->setChecked(false); connect(mActLevelChallenging, SIGNAL(triggered()), this, SLOT(SetLevelSlot())); mActLevelHard = new QAction(tr("Hard (10 Colors, 5 Slots, Doubles)"), this); mActLevelHard->setData(4); mActLevelHard->setCheckable(true); mActLevelHard->setChecked(false); connect(mActLevelHard, SIGNAL(triggered()), this, SLOT(SetLevelSlot())); mActSetGuess = new QAction(tr("Computer's Guess"), this); mActSetGuess->setIcon(QIcon(":/img/business_user.png")); mActSetGuess->setShortcut(tr("Ctrl+H")); connect(mActSetGuess, SIGNAL(triggered()), this, SLOT(SetGuessSlot())); mActSetHints = new QAction(tr("Rate it for me"), this); mActSetHints->setIcon(QIcon(":/img/icon_female16.png")); mActSetHints->setShortcut(tr("Ctrl+H")); connect(mActSetHints, SIGNAL(triggered()), this, SLOT(SetHintsSlot())); mActModeHvM = new QAction(tr("Human vs Computer"), this); mActModeHvM->setData(MODE_HVM); mActModeHvM->setCheckable(true); mActModeHvM->setChecked(true); connect(mActModeHvM, SIGNAL(triggered()), this, SLOT(SetGameModeSlot())); mActModeMvH = new QAction(tr("Computer vs Human"), this); mActModeMvH->setData(MODE_MVH); mActModeMvH->setCheckable(true); mActModeMvH->setChecked(false); connect(mActModeMvH, SIGNAL(triggered()), this, SLOT(SetGameModeSlot())); mActPreferences = new QAction(tr("Preferences"), this); mActPreferences->setIcon(QIcon(":/img/configure.png")); mActPreferences->setShortcut(tr("Ctrl+Shift+P")); connect(mActPreferences, SIGNAL(triggered()), this, SLOT(OpenPreferencesSlot())); } void ColorCode::InitMenus() { mMenuGame = mMenuBar->addMenu(tr("&Game")); mMenuGame->addAction(mActNewGame); mMenuGame->addAction(mActSelectGame); mMenuGame->addAction(mActRestartGame); mMenuGame->addSeparator(); mMenuGame->addAction(mActPauseGame); mMenuGame->addAction(mActGiveIn); mMenuGame->addSeparator(); mMenuGame->addAction(mActCopyGameNo); mMenuGame->addAction(mActSaveGame); mMenuGame->addSeparator(); mMenuGame->addAction(mActExit); mMenuRow = mMenuBar->addMenu(tr("&Row")); mMenuRow->addAction(mActRandRow); mMenuRow->addAction(mActPrevRow); mMenuRow->addAction(mActClearRow); mMenuRow->addSeparator(); mMenuRow->addAction(mActSetGuess); mMenuRow->addAction(mActSetHints); connect(mMenuRow, SIGNAL(aboutToShow()), this, SLOT(UpdateRowMenuSlot())); mMenuGames = mMenuBar->addMenu(tr("Game &Lists")); mMenuGames->addAction(mActShowHighScores); mMenuGames->addAction(mActShowSavedGames); mMenuGames->addAction(mActShowPrevGames); mMenuSettings = mMenuBar->addMenu(tr("&Settings")); mMenuModes = mMenuSettings->addMenu(tr("Game Mode")); mActGroupModes = new QActionGroup(mMenuModes); mActGroupModes->setExclusive(true); mActGroupModes->addAction(mActModeHvM); mActGroupModes->addAction(mActModeMvH); QList modeacts = mActGroupModes->actions(); mMenuModes->addActions(modeacts); mMenuSettings->addSeparator(); mMenuSettings->addAction(mActShowMenubar); mMenuSettings->addAction(mActShowToolbar); mMenuSettings->addAction(mActShowStatusbar); mMenuSettings->addSeparator(); mMenuSettings->addAction(mActShowTimer); mMenuSettings->addAction(mActShowGameNo); mMenuSettings->addSeparator(); mMenuSettings->addAction(mActResetColorsOrder); mMenuSettings->addAction(mActShowIndicators); mMenuSettings->addSeparator(); mMenuLevels = mMenuSettings->addMenu(tr("Level Presets")); mActGroupLevels = new QActionGroup(mMenuLevels); mActGroupLevels->addAction(mActLevelEasy); mActGroupLevels->addAction(mActLevelClassic); mActGroupLevels->addAction(mActLevelMedium); mActGroupLevels->addAction(mActLevelChallenging); mActGroupLevels->addAction(mActLevelHard); QList levelacts = mActGroupLevels->actions(); mMenuLevels->addActions(levelacts); mMenuSettings->addSeparator(); mMenuSettings->addAction(mActDoubles); mMenuSettings->addSeparator(); mMenuSettings->addAction(mActAutoClose); mMenuSettings->addAction(mActAutoHints); mMenuSettings->addSeparator(); mMenuSettings->addAction(mActPreferences); mMenuHelp = mMenuBar->addMenu(tr("&Help")); mMenuHelp->addAction(mLaunchHelpAction); mMenuHelp->addSeparator(); mMenuHelp->addAction(mActAbout); mMenuHelp->addAction(mActAboutQt); mMenuRowContext = new QMenu(); mMenuRowContext->addAction(mActRandRow); mMenuRowContext->addAction(mActPrevRow); mMenuRowContext->addAction(mActClearRow); mMenuRowContext->addSeparator(); mMenuRowContext->addAction(mActSetGuess); mMenuRowContext->addAction(mActSetHints); mMenuRowContext->addSeparator(); mMenuRowContext->addAction(mActNewGame); mMenuRowContext->addAction(mActRestartGame); mMenuRowContext->addAction(mActGiveIn); mMenuRowContext->addSeparator(); mMenuRowContext->addAction(mActExit); addActions(mMenuBar->actions()); } void ColorCode::InitToolBars() { mGameToolbar = addToolBar(tr("Game")); mGameToolbar->setAllowedAreas(Qt::NoToolBarArea); mGameToolbar->setFloatable(false); mGameToolbar->setIconSize(QSize(16, 16)); mGameToolbar->setMovable(false); mGameToolbar->addAction(mActNewGame); mGameToolbar->addAction(mActRestartGame); mGameToolbar->addAction(mActGiveIn); mGameToolbar->addSeparator(); mGameToolbar->addAction(mActSetGuess); mGameToolbar->addAction(mActSetHints); mColorCntCmb = new QComboBox(); mColorCntCmb->setLayoutDirection(Qt::LeftToRight); mColorCntCmb->setFixedWidth(84); mColorCntCmb->addItem("2 " + tr("Colors"), 2); mColorCntCmb->addItem("3 " + tr("Colors"), 3); mColorCntCmb->addItem("4 " + tr("Colors"), 4); mColorCntCmb->addItem("5 " + tr("Colors"), 5); mColorCntCmb->addItem("6 " + tr("Colors"), 6); mColorCntCmb->addItem("7 " + tr("Colors"), 7); mColorCntCmb->addItem("8 " + tr("Colors"), 8); mColorCntCmb->addItem("9 " + tr("Colors"), 9); mColorCntCmb->addItem("10 " + tr("Colors"), 10); mColorCntCmb->setCurrentIndex(6); connect(mColorCntCmb, SIGNAL(currentIndexChanged(int)), this, SLOT(ColorCntChangedSlot())); mPegCntCmb = new QComboBox(); mPegCntCmb->setLayoutDirection(Qt::LeftToRight); mPegCntCmb->setFixedWidth(76); mPegCntCmb->addItem("2 " + tr("Slots"), 2); mPegCntCmb->addItem("3 " + tr("Slots"), 3); mPegCntCmb->addItem("4 " + tr("Slots"), 4); mPegCntCmb->addItem("5 " + tr("Slots"), 5); mPegCntCmb->setCurrentIndex(2); connect(mPegCntCmb, SIGNAL(currentIndexChanged(int)), this, SLOT(PegCntChangedSlot())); mLevelToolbar = addToolBar(tr("Level")); mLevelToolbar->setAllowedAreas(Qt::NoToolBarArea); mLevelToolbar->setFloatable(false); mLevelToolbar->setIconSize(QSize(16, 16)); mLevelToolbar->setMovable(false); mLevelToolbar->setLayoutDirection(Qt::RightToLeft); mLevelToolbar->addWidget(mColorCntCmb); QWidget* spacer = new QWidget(); spacer->setMinimumWidth(4); mLevelToolbar->addWidget(spacer); mLevelToolbar->addWidget(mPegCntCmb); QWidget* spacer2 = new QWidget(); spacer2->setMinimumWidth(4); mLevelToolbar->addWidget(spacer2); mLevelToolbar->addAction(mActDoublesIcon); } void ColorCode::ApplySettingsSlot() { bool restart = NeedsRestart(); mNoAct = true; mActShowToolbar->setChecked(mSettings->mShowToolBar); ShowToolbarSlot(); mActShowMenubar->setChecked(mSettings->mShowMenuBar); ShowMenubarSlot(); mActShowStatusbar->setChecked(mSettings->mShowStatusBar); ShowStatusbarSlot(); mActShowTimer->setChecked(mSettings->mShowTimer); ShowTimer(); mActShowGameNo->setChecked(mSettings->mShowGameNo); UpdateGameNoDisplay(); mActShowIndicators->setChecked(mSettings->mShowIndicators); SetIndicatorsSlot(); mActAutoClose->setChecked(mSettings->mAutoClose); mActAutoHints->setChecked(mSettings->mAutoHints); SetDoublesSlot(mSettings->mDoubles); int i; i = mColorCntCmb->findData(mSettings->mColorCnt); if (i != -1 && mColorCntCmb->currentIndex() != i) { mColorCntCmb->setCurrentIndex(i); } i = mPegCntCmb->findData(mSettings->mPegCnt); if (i != -1 && mPegCntCmb->currentIndex() != i) { mPegCntCmb->setCurrentIndex(i); } CheckLevel(); if (mSettings->mGameMode == MODE_HVM) { mActModeHvM->setChecked(true); UpdateGameNoDisplay(); } else { mActModeMvH->setChecked(true); } mHintsDelayTimer->setInterval(mSettings->mHintsDelay); mNoAct = false; if (restart) { TryNewGame(); } } void ColorCode::TryNewGame() { int r = QMessageBox::Yes; if (GamesRunning()) { r = QMessageBox::question( this, tr("Message"), tr("The changed settings will only apply to new games!\nDo you want to give in the current and start a new Game?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); } if (r == QMessageBox::Yes) { mGameInput = NULL; NewGame(); } } bool ColorCode::NeedsRestart() const { bool need = false; if ( mSettings->mDoubles != mActDoubles->isChecked() || mSettings->mColorCnt != mColorCnt || mSettings->mPegCnt != mPegCnt || mSettings->mGameMode != mGameMode || (mGameMode == MODE_MVH && mSolverStrength != mSettings->mSolverStrength) ) { need = true; } return need; } void ColorCode::contextMenuEvent(QContextMenuEvent* e) { QList list = mView->items(mView->mapFromGlobal(e->globalPos())); int i = 0; bool isrow = false; if (mGameState == STATE_RUNNING && mCurRow != NULL) { for (i = 0; i < list.size(); ++i) { if (list.at(i) == mCurRow || list.at(i) == mHintBtns[mCurRow->GetIx()]) { isrow = true; break; } } } if (isrow) { UpdateRowMenuSlot(); mMenuRowContext->exec(e->globalPos()); } else { mMenuGame->exec(e->globalPos()); } } void ColorCode::resizeEvent (QResizeEvent* e) { Q_UNUSED(e); Scale(); } void ColorCode::keyPressEvent(QKeyEvent *e) { if (mCurRow == NULL || mGameState != STATE_RUNNING) { return; } switch (e->key()) { case Qt::Key_Return: case Qt::Key_Enter: if (mGameMode == MODE_HVM) { int ix = mCurRow->GetIx(); if (mHintBtns[ix]->mActive) { std::vector s = mCurRow->GetSolution(); if (s.size() == (unsigned) mPegCnt) { mHintBtns[ix]->SetActive(false); HintPressedSlot(ix); } } } else if (mGameMode == MODE_MVH) { if (mDoneBtn->isVisible() || mOkBtn->isVisible()) { DoneBtnPressSlot(mOkBtn); } } break; } } void ColorCode::UpdateActions() { if (mGameState == STATE_PAUSED) { mActSelectGame->setEnabled(true); mActSaveGame->setEnabled(true); mActSetGuess->setEnabled(false); mActRestartGame->setEnabled(false); mActGiveIn->setEnabled(false); return; } bool running = (mGameState == STATE_RUNNING && mCurRow != NULL); if (mGameMode == MODE_HVM) { mActSelectGame->setVisible(true); mActSelectGame->setEnabled(true); mActSaveGame->setVisible(true); mActSaveGame->setEnabled(true); mActPauseGame->setVisible(true); mActShowTimer->setVisible(true); mActShowTimer->setEnabled(true); mActShowGameNo->setVisible(true); mActShowGameNo->setEnabled(true); mActCopyGameNo->setVisible(true); mActCopyGameNo->setEnabled(true); if (running) { mActSetGuess->setEnabled(true); mActRestartGame->setEnabled(true); mActGiveIn->setEnabled(true); mActPauseGame->setEnabled(true); } else { mActSetGuess->setEnabled(false); mActRestartGame->setEnabled(false); mActGiveIn->setEnabled(false); mActPauseGame->setEnabled(false); } } else if (mGameMode == MODE_MVH) { mActSelectGame->setVisible(false); mActSelectGame->setEnabled(false); mActSaveGame->setVisible(false); mActSaveGame->setEnabled(false); mActPauseGame->setVisible(false); mActPauseGame->setEnabled(false); mActShowTimer->setVisible(false); mActShowTimer->setEnabled(false); mActShowGameNo->setVisible(false); mActShowGameNo->setEnabled(false); mActCopyGameNo->setVisible(false); mActCopyGameNo->setEnabled(false); if (running) { mActRestartGame->setEnabled(true); mActGiveIn->setEnabled(true); if (mCurRow == mSolutionRow) { mActSetHints->setEnabled(false); } else { mActSetHints->setEnabled(!mSettings->mAutoHints && !mSolver->isRunning()); } UpdateRowMenuSlot(); } else { mActSetHints->setEnabled(false); mActRestartGame->setEnabled(false); mActGiveIn->setEnabled(false); } } } void ColorCode::UpdateRowMenuSlot() { if (mGameMode == MODE_HVM) { if (mGameState != STATE_RUNNING || mCurRow == NULL) { mActRandRow->setEnabled(false); mActPrevRow->setEnabled(false); mActClearRow->setEnabled(false); mActSetGuess->setEnabled(false); return; } else { mActRandRow->setEnabled(true); } if (mCurRow->GetIx() < 1) { mActPrevRow->setEnabled(false); } else { mActPrevRow->setEnabled(true); } if (mCurRow->GetPegCnt() == 0) { mActClearRow->setEnabled(false); } else { mActClearRow->setEnabled(true); } } else if (mGameMode == MODE_MVH) { if (mGameState == STATE_RUNNING) { if (mCurRow == mSolutionRow) { mActSetHints->setEnabled(false); mActRandRow->setEnabled(true); if (mSolutionRow->GetPegCnt() == 0) { mActClearRow->setEnabled(false); } else { mActClearRow->setEnabled(true); } } else { mActSetHints->setEnabled(!mSettings->mAutoHints && !mSolver->isRunning()); mActRandRow->setEnabled(false); mActClearRow->setEnabled(false); } } else { mActRandRow->setEnabled(false); mActClearRow->setEnabled(false); mActSetHints->setEnabled(false); } } } void ColorCode::PauseGameSlot(GraphicsBtn*) { if (mCurRow == NULL) { return; } bool paused = (mGameState == STATE_PAUSED); if (mGameState == STATE_RUNNING) { mGameTimer->PauseT(); mActPauseGame->setText(tr("&Resume Game")); mActPauseGame->setIcon(QIcon(":/img/resume.png")); SetState(STATE_PAUSED); UpdateGameNoDisplay(); ResolveGame(); } else if (paused) { mGameTimer->ResumeT(); mActPauseGame->setText(tr("&Have a Break")); mActPauseGame->setIcon(QIcon(":/img/pause.png")); SetState(STATE_RUNNING); UpdateGameNoDisplay(); RowSolutionSlot(mCurRow->GetIx()); } mPegFactory->SetPaused(); for (int i = 0; i < mMaxRowCnt; ++i) { mHintBtns[i]->SetPaused(paused); } UpdateActions(); } void ColorCode::RestartGameSlot() { if (mSolver->isRunning()) { WaitForSolver(); } if (mGameMode == MODE_HVM) { ResetRows(); SetState(STATE_RUNNING); SetCurRow(NULL); mSolver->RestartGame(); NextRow(); } else if (mGameMode == MODE_MVH) { mHintsDelayTimer->stop(); mOkBtn->ShowBtn(false); ResetRows(); SetCurRow(NULL); mSolver->NewGame(mColorCnt, mPegCnt, mDoubles, mSolverStrength, mMaxRowCnt); mSolutionRow->OpenRow(); GetSolution(); SetState(STATE_RUNNING); RowSolutionSlot(mSolutionRow->GetIx()); } } void ColorCode::NewGameSlot() { if (mGameState == STATE_RUNNING && mCurRow != NULL) { int r = QMessageBox::warning( this, tr("New Game"), tr("Do you want to give in\nand start a new Game?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); if (r == QMessageBox::Yes) { mGameInput = NULL; NewGame(); } } else { mGameInput = NULL; NewGame(); } } void ColorCode::GiveInSlot() { int r = QMessageBox::Yes; if (mGameState == STATE_RUNNING && mCurRow != NULL) { r = QMessageBox::warning( this, tr("Give In"), tr("Do you really want to give in?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); } if (r == QMessageBox::Yes) { SetState(STATE_GAVE_UP); if (mSolver->isRunning()) { WaitForSolver(); } if (mCurRow != NULL) { mCurRow->CloseRow(); mHintBtns[mCurRow->GetIx()]->SetActive(false); } ResolveGame(); } } void ColorCode::CopyGameNoSlot() { uint no = 0; if (mGameInput != NULL) { no = mGameInput->mGameNo; } else if (mFinishedGameInput != NULL) { no = mFinishedGameInput->mGameNo; } if (no > 0) { QClipboard* cb = QApplication::clipboard(); cb->setText(QString::number(no)); } } void ColorCode::OpenPreferencesSlot() { if (mPrefDialog == NULL) { CreatePrefDialog(); } if (mPrefDialog == NULL) { return; } mSettings->SaveLastSettings(); mPrefDialog->SetSettings(); int r = mPrefDialog->exec(); if (r == QDialog::Accepted) { ApplySettingsSlot(); } else { mSettings->RestoreLastSettings(); } } void ColorCode::OnlineHelpSlot() { QDesktopServices::openUrl(QUrl("http://colorcode.laebisch.com/documentation", QUrl::TolerantMode)); } void ColorCode::AboutSlot() { About ab(this); ab.exec(); } void ColorCode::AboutQtSlot() { QMessageBox::aboutQt( this, tr("About Qt")); } void ColorCode::ShowToolbarSlot() { mSettings->mShowToolBar = mActShowToolbar->isChecked(); if (!mActShowToolbar->isChecked()) { mGameToolbar->hide(); mLevelToolbar->hide(); } else { mGameToolbar->show(); mLevelToolbar->show(); } Scale(); } void ColorCode::ShowMenubarSlot() { mSettings->mShowMenuBar = mActShowMenubar->isChecked(); if (!mActShowMenubar->isChecked()) { mMenuBar->hide(); } else { mMenuBar->show(); } Scale(); } void ColorCode::ShowStatusbarSlot() { mSettings->mShowStatusBar = mActShowStatusbar->isChecked(); if (!mActShowStatusbar->isChecked()) { statusBar()->hide(); } else { statusBar()->show(); } Scale(); } void ColorCode::ShowTimerSlot() { mSettings->mShowTimer = mActShowTimer->isChecked(); ShowTimer(); } void ColorCode::ShowTimer() { if (mGameMode == MODE_HVM) { mGameTimer->SetTenth(mSettings->mShowTenth); mGameTimer->setVisible(mSettings->mShowTimer); mGameTimer->update(); mGameTimerBg->setVisible(mSettings->mShowTimer); mTimerBtn->ShowBtn(mSettings->mShowTimer); } else { mGameTimer->setVisible(false); mGameTimerBg->setVisible(false); mTimerBtn->ShowBtn(false); } } void ColorCode::ShowGameNoSlot() { mSettings->mShowGameNo = mActShowGameNo->isChecked(); UpdateGameNoDisplay(); } void ColorCode::UpdateGameNoDisplay() { if (mGameMode == MODE_HVM) { QString str = tr("Human vs. Computer"); CCGame* g = GetCurrentGameInput(); if (mSettings->mShowGameNo && g != NULL && mGameState != STATE_PAUSED) { str += QString(" :: ") + QString(tr("Game Number")) + QString(": ") + QString::number(g->mGameNo); } mGameNoDisplay->ShowStr(str); } else if (mGameMode == MODE_MVH) { mGameNoDisplay->ShowStr(tr("Computer vs. Human")); } } CCGame* ColorCode::GetCurrentGameInput() const { if (mGameInput != NULL && mGameInput->IsValidGame()) { return mGameInput; } else if (mFinishedGameInput != NULL && mFinishedGameInput->IsValidGame()) { return mFinishedGameInput; } return NULL; } void ColorCode::CloseHighScoreDialogSlot() { ; } void ColorCode::SetIndicatorsSlot() { mSettings->mShowIndicators = mActShowIndicators->isChecked(); mPegFactory->SetIndicators(); } void ColorCode::AutoCloseSlot() { mSettings->mAutoClose = mActAutoClose->isChecked(); } void ColorCode::AutoHintsSlot() { mSettings->mAutoHints = mActAutoHints->isChecked(); if (mGameMode == MODE_MVH && mGameState == STATE_RUNNING && mCurRow != NULL && mCurRow != mSolutionRow) { mActSetHints->setEnabled(!mSettings->mAutoHints); if (mSettings->mAutoHints) { SetHintsSlot(); SetAutoHintsSlot(); } } } void ColorCode::ColorCntChangedSlot() { SetColorCnt(); if (mNoAct) { return; } int r = QMessageBox::Yes; if (GamesRunning()) { r = QMessageBox::question( this, tr("Message"), tr("The changed settings will only apply to new games!\nDo you want to give in the current and start a new Game?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); } if (r == QMessageBox::Yes) { mGameInput = NULL; NewGame(); } } void ColorCode::PegCntChangedSlot() { SetPegCnt(); if (mNoAct) { return; } int pcnt = GetPegCntInput(); if (pcnt == mPegCnt) { return; } int r = QMessageBox::Yes; if (GamesRunning()) { r = QMessageBox::question( this, tr("Message"), tr("The changed settings will only apply to new games!\nDo you want to give in the current and start a new Game?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); } if (r == QMessageBox::Yes) { mGameInput = NULL; NewGame(); } } void ColorCode::DoublesChangedSlot(bool checked) { if (mNoAct) { return; } SetDoublesSlot(checked); if (mDoubles == mSettings->mDoubles) { return; } int r = QMessageBox::Yes; if (GamesRunning()) { r = QMessageBox::question( this, tr("Message"), tr("The changed settings will only apply to new games!\nDo you want to give in the current and start a new Game?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); } if (r == QMessageBox::Yes) { mGameInput = NULL; NewGame(); } } void ColorCode::SetLevelSlot() { mNoAct = true; int ix = mActGroupLevels->checkedAction()->data().toInt(); if (ix < 0 || ix > 4) { return; } int i; i = mColorCntCmb->findData(LEVEL_SETTINGS[ix][0]); if (i != -1 && mColorCntCmb->currentIndex() != i) { mColorCntCmb->setCurrentIndex(i); SetColorCnt(); } i = mPegCntCmb->findData(LEVEL_SETTINGS[ix][1]); if (i != -1 && mPegCntCmb->currentIndex() != i) { mPegCntCmb->setCurrentIndex(i); SetPegCnt(); } SetDoublesSlot((LEVEL_SETTINGS[ix][2] == 1)); int r = QMessageBox::Yes; if (GamesRunning()) { r = QMessageBox::question( this, tr("Message"), tr("The changed settings will only apply to new games!\nDo you want to give in the current and start a new Game?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); } mNoAct = false; if (r == QMessageBox::Yes) { mGameInput = NULL; NewGame(); } } void ColorCode::SetGameModeSlot() { SetGameMode(); int r = QMessageBox::Yes; if (GamesRunning()) { r = QMessageBox::question( this, tr("Message"), tr("The changed settings will only apply to new games!\nDo you want to give in the current and start a new Game?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); } if (r == QMessageBox::Yes) { mGameInput = NULL; NewGame(); } } void ColorCode::SetPegCnt() { mSettings->mPegCnt = GetPegCntInput(); } void ColorCode::SetColorCnt() { mSettings->mColorCnt = GetColorCntInput(); } void ColorCode::SetGameMode() { mSettings->mGameMode = GetGameModeInput(); } void ColorCode::ShowMsgSlot(QString msg) { mMsg->ShowMsg(msg); } void ColorCode::SnapPegSlot(ColorPeg* cp) { int i; bool snapped = false; if (mGameMode == MODE_HVM) { QList list = mScene->items(QPointF(cp->pos().x() + 18, cp->pos().y() + 18)); if (mSolver->isRunning()) { WaitForSolver(); } for (i = 0; i < list.size(); ++i) { if (mCurRow != NULL && list.at(i) == mCurRow) { snapped = mCurRow->SnapCP(cp); break; } } } else if (mGameMode == MODE_MVH) { snapped = mSolutionRow->SnapCP(cp); } if (!snapped) { mPegFactory->RemovePegSlot(cp); } } void ColorCode::RowSolutionSlot(int ix) { if (mGameMode == MODE_HVM) { if (ix == SOLUTION_ROW_IX) { return; } std::vector s = mPegRows[ix]->GetSolution(); if (s.size() == (unsigned) mPegCnt) { if (mActAutoClose->isChecked()) { HintPressedSlot(ix); } else { mHintBtns[ix]->SetActive(true); ShowMsgSlot(tr("Press the Hint Field or Key Enter if You're done.")); } } else { mHintBtns[ix]->SetActive(false); ShowMsgSlot(tr("Place Your pegs ...")); } } else if (mGameMode == MODE_MVH) { if (ix == SOLUTION_ROW_IX) { std::vector s = mSolutionRow->GetSolution(); if (s.size() == (unsigned) mPegCnt) { bool valid = true; if (!mActDoubles->isChecked()) { int i; int check[mColorCnt]; for (i = 0; i < mColorCnt; ++i) { check[i] = 0; } for (i = 0; (unsigned)i < s.size(); ++i) { if (s[i] >= mColorCnt) { valid = false; break; } if (check[s[i]] != 0) { valid = false; break; } check[s[i]] = 1; } } if (valid) { mDoneBtn->ShowBtn(true); ShowMsgSlot(tr("Press the button below or Key Enter if You're done.")); } else { ShowMsgSlot(tr("The chosen settings do not allow pegs of the same color!")); } } else { mDoneBtn->ShowBtn(false); ShowMsgSlot(tr("Place Your secret ColorCode ...")); } } } } void ColorCode::HintPressedSlot(int) { mCurRow->CloseRow(); ResolveRow(); NextRow(); ResolveGame(); } void ColorCode::RandRowSlot() { if (mCurRow == NULL || !mCurRow->IsActive() || mGameState != STATE_RUNNING) { return; } if (mGameMode == MODE_HVM || (mGameMode == MODE_MVH && mCurRow == mSolutionRow)) { mCurRow->ClearRow(); int i, rndm; int check[mColorCnt]; ColorPeg* peg; for (i = 0; i < mColorCnt; ++i) { check[i] = 0; } for (i = 0; i < mPegCnt; ++i) { rndm = qrand() % mColorCnt; if (mDoubles == 0 && check[rndm] != 0) { --i; continue; } check[rndm] = 1; peg = mPegFactory->CreatePeg(rndm); mCurRow->ForceSnap(peg, i); } } } void ColorCode::SetSolverGuessSlot() { if (mIgnoreGuess) { mIgnoreGuess = false; return; } if (mGameState != STATE_RUNNING || mCurRow == NULL) { return; } int* row = mSolver->GuessOut(); if (row == NULL) { SetState(STATE_ERROR); } else { ColorPeg* peg; int i; for (i = 0; i < mPegCnt; ++i) { peg = mPegFactory->CreatePeg(row[i]); mCurRow->ForceSnap(peg, i); } if (mGameMode == MODE_HVM) { return; } } if (mGameState == STATE_RUNNING) { mCurRow->CloseRow(); mHintBtns[mCurRow->GetIx()]->SetActive(true); if (mActAutoHints->isChecked()) { if (mOkBtn->isVisible()) { mOkBtn->ShowBtn(false); } ShowMsgSlot(tr("guessed and rated ...")); SetHintsSlot(); mHintBtns[mCurRow->GetIx()]->SetActive(false); std::vector rowhints = mHintBtns[mCurRow->GetIx()]->GetHints(); int b = 0; for (unsigned i = 0; i < rowhints.size(); ++i) { if (rowhints.at(i) == 2) { ++b; } } if (b == mPegCnt) { SetState(STATE_WON); ResolveGame(); } else { mHintsDelayTimer->start(); } } else { ShowMsgSlot(tr("Please rate the guess. Press OK or Key Enter if You're done.")); mOkBtn->setPos(5, mCurRow->pos().y() - 39); mOkBtn->ShowBtn(true); } } else { mCurRow->SetActive(false); ResolveGame(); } UpdateActions(); } void ColorCode::SetGuessSlot() { if (mCurRow == NULL || mCurRow == mSolutionRow || mGameState != STATE_RUNNING || mSolver->isRunning()) { return; } mCurRow->ClearRow(); ShowMsgSlot(tr("Let me think ...")); mSolver->StartGuess(); UpdateActions(); } void ColorCode::SetHintsSlot() { if (mCurRow == NULL || mGameState != STATE_RUNNING) { return; } if (mGameMode == MODE_MVH) { if (mCurRow == mSolutionRow || !mHintBtns[mCurRow->GetIx()]->IsActive()) { return; } std::vector hints = RateSol2Guess(mSolution, mCurRow->GetSolution()); mHintBtns[mCurRow->GetIx()]->DrawHints(hints); } } void ColorCode::PrevRowSlot() { if (mCurRow == NULL || mGameState != STATE_RUNNING) { return; } if (mCurRow->GetIx() < 1) { return; } mCurRow->ClearRow(); ColorPeg* peg; std::vector prev = mPegRows[mCurRow->GetIx() - 1]->GetSolution(); int i; for (i = 0; i < mPegCnt; ++i) { peg = mPegFactory->CreatePeg(prev.at(i)); mCurRow->ForceSnap(peg, i); } } void ColorCode::ClearRowSlot() { if (mCurRow == NULL || mGameState != STATE_RUNNING) { return; } mCurRow->ClearRow(); } void ColorCode::DoneBtnPressSlot(GraphicsBtn*) { mDoneBtn->ShowBtn(false); mOkBtn->ShowBtn(false); if (mCurRow == mSolutionRow) { SetSolution(); NextRow(); } else { ResolveHints(); } } void ColorCode::SetAutoHintsSlot() { DoneBtnPressSlot(mOkBtn); } void ColorCode::TestSlot() { ; } void ColorCode::ApplyPreferencesSlot() { ; } void ColorCode::CreatePrefDialog() { mPrefDialog = new PrefDialog(this); mPrefDialog->setModal(true); mPrefDialog->InitSettings(); connect(mPrefDialog, SIGNAL(accepted()), this, SLOT(ApplyPreferencesSlot())); connect(mPrefDialog, SIGNAL(accepted()), mGameTablesDialog, SLOT(SetSettingsSlot())); connect(mPrefDialog, SIGNAL(ResetColorOrderSignal()), mPegFactory, SLOT(ResetColorsOrderSlot())); } void ColorCode::CheckDoublesSetting() { if (mColorCnt < mPegCnt) { if (mActDoubles->isEnabled()) { mActDoubles->setEnabled(false); } if (mActDoublesIcon->isEnabled()) { mActDoublesIcon->setEnabled(false); } if (!mActDoubles->isChecked()) { mActDoubles->setChecked(true); } if (!mActDoublesIcon->isChecked()) { mActDoublesIcon->setChecked(true); } } else { if (!mActDoubles->isEnabled()) { mActDoubles->setEnabled(true); } if (!mActDoublesIcon->isEnabled()) { mActDoublesIcon->setEnabled(true); } } if (mActDoublesIcon->isChecked()) { mActDoublesIcon->setIcon(QIcon(":/img/same_color_1.png")); mActDoublesIcon->setToolTip(tr("Disallow Pegs of the Same Color")); } else { mActDoublesIcon->setIcon(QIcon(":/img/same_color_0.png")); mActDoublesIcon->setToolTip(tr("Allow Pegs of the Same Color")); } } void ColorCode::SetDoublesSlot(bool checked) { mSettings->mDoubles = checked; mActDoubles->setChecked(checked); mActDoublesIcon->setChecked(checked); if (checked) { mActDoublesIcon->setIcon(QIcon(":/img/same_color_1.png")); mActDoublesIcon->setToolTip(tr("Disallow Pegs of the Same Color")); } else { mActDoublesIcon->setIcon(QIcon(":/img/same_color_0.png")); mActDoublesIcon->setToolTip(tr("Allow Pegs of the Same Color")); } } void ColorCode::CheckLevel() { int ix = -1; for (int i = 0; i < 5; ++i) { if ( LEVEL_SETTINGS[i][0] == mColorCnt && LEVEL_SETTINGS[i][1] == mPegCnt && LEVEL_SETTINGS[i][2] == mDoubles ) { ix = i; break; } } if (ix > -1) { QList levelacts = mActGroupLevels->actions(); levelacts.at(ix)->setChecked(true); } else { QAction* act = mActGroupLevels->checkedAction(); if (act != NULL) { act->setChecked(false); } } } void ColorCode::ResetGame() { mDoneBtn->ShowBtn(false); mOkBtn->ShowBtn(false); ApplyPegCnt(); mSolutionRow->Reset(mPegCnt, mGameMode); ResetRows(); mGameId = qrand(); mGuessCnt = 0; ++mGameCnt; mPegFactory->ApplyColorCnt(); CheckDoublesSetting(); mDoubles = GetDoublesInput(); CheckLevel(); ApplySolverStrength(); } void ColorCode::ResetRows() { for (int i = 0; i < mMaxRowCnt; ++i) { mPegRows[i]->Reset(mPegCnt, mGameMode); mHintBtns[i]->Reset(mPegCnt, mGameMode); } } void ColorCode::NewGameInputSlot(CCGame* g) { if (g != NULL && g->IsValidGame()) { mGameInput = g; mGameInput->Anonymize(); mNoAct = true; if (mGameInput->mGameMode == MODE_HVM) { mActModeHvM->setChecked(true); } else { mActModeMvH->setChecked(true); } SetDoublesSlot((bool) mGameInput->mDoubles); int i; i = mColorCntCmb->findData(mGameInput->mColorCnt); if (i != -1 && mColorCntCmb->currentIndex() != i) { mColorCntCmb->setCurrentIndex(i); } i = mPegCntCmb->findData(mGameInput->mPegCnt); if (i != -1 && mPegCntCmb->currentIndex() != i) { mPegCntCmb->setCurrentIndex(i); } CheckLevel(); mNoAct = false; } NewGame(); } CCGame* ColorCode::GetRandGameInput() { int gameno = mSolver->GetRandGameNo(mColorCnt, mPegCnt, mDoubles); CCGame* g = mSettings->GetCurSettingsGame(); g->mGameNo = gameno; return g; } void ColorCode::NewGame() { if (mGameState == STATE_PAUSED) { PauseGameSlot(); } mHintsDelayTimer->stop(); if (mSolver->isRunning()) { WaitForSolver(); } ApplyGameMode(); ResetGame(); QString doubles = (mDoubles == 1) ? tr("Yes") : tr("No"); QString colors = QString::number(mColorCnt, 10); QString pegs = QString::number(mPegCnt, 10); mStatusLabel->setText(tr("Pegs of Same Color") + ": " + doubles + " :: " + tr("Slots") + ": " + pegs + " :: " + tr("Colors") + ": " + colors + " "); SetState(STATE_RUNNING); SetCurRow(NULL); if (mGameMode == MODE_HVM) { mFinishedGameInput = NULL; mSolver->NewGame(mColorCnt, mPegCnt, mDoubles, CCSolver::STRENGTH_HIGH, mMaxRowCnt); mHighScore->NewGame(mSolver->CalcPosCnt(mColorCnt, mPegCnt, mDoubles)); if (mGameInput == NULL) { mGameInput = mSettings->GetCurSettingsGame(); } if (mGameInput->mColorCnt != mColorCnt) { mGameInput->mColorCnt = mColorCnt; } if (mGameInput->mPegCnt != mPegCnt) { mGameInput->mPegCnt = mPegCnt; } if (mGameInput->mDoubles != mDoubles) { mGameInput->mDoubles = mDoubles; } if (mGameInput->mGameMode != mGameMode) { mGameInput->mGameMode = mGameMode; } mGameInput->mDuration = 0; mGameInput->mTime = QDateTime::currentDateTime().toTime_t(); if (mGameInput->mGameNo == 0) { mGameInput->mGameNo = mSolver->GetRandGameNo(mColorCnt, mPegCnt, mDoubles); } mGameTablesDialog->InsertPrevGameSlot(mGameInput); SetSolution(); mGameTimer->StartT(); NextRow(); } else if (mGameMode == MODE_MVH) { mSolver->NewGame(mColorCnt, mPegCnt, mDoubles, mSolverStrength, mMaxRowCnt); GetSolution(); } UpdateGameNoDisplay(); } void ColorCode::NextRow() { if (mGameState != STATE_RUNNING) { return; } if (mCurRow == NULL) { SetCurRow(mPegRows[0]); } else if (mCurRow->GetIx() < mMaxRowCnt - 1) { SetCurRow(mPegRows[mCurRow->GetIx() + 1]); } else { SetCurRow(NULL); SetState(STATE_LOST); } if (mCurRow != NULL) { ++mGuessCnt; mCurRow->SetActive(true); if (mGameMode == MODE_HVM) { ++mHighScore->mRowsCnt; ShowMsgSlot(tr("Place Your pegs ...")); } else if (mGameMode == MODE_MVH) { SetGuessSlot(); } } } void ColorCode::SetCurRow(PegRow* const &row) { mCurRow = row; UpdateActions(); } void ColorCode::ResolveRow() { std::vector rowsol = mCurRow->GetSolution(); mSolver->GuessIn(&rowsol); std::vector hints = RateSol2Guess(mSolution, rowsol); if (hints.size() == (unsigned) mPegCnt) { int bl = 0; for (int i = 0; i < mPegCnt; ++i) { if (hints.at(i) == 2) { ++bl; } } if (bl == mPegCnt) { SetState(STATE_WON); } } mSolver->ResIn(&hints); mHintBtns[mCurRow->GetIx()]->DrawHints(hints); } std::vector ColorCode::RateSol2Guess(const std::vector sol, const std::vector guess) { std::vector hints; std::vector left1; std::vector left0; int i, p0, p1; for (i = 0; i < mPegCnt; ++i) { p0 = guess.at(i); p1 = sol.at(i); if (p0 == p1) { hints.push_back(2); } else { left0.push_back(p0); left1.push_back(p1); } } if (hints.size() < (unsigned) mPegCnt) { int len0 = left0.size(); for (i = 0; i < len0; ++i) { p0 = left0.at(i); for (unsigned j = 0; j < left1.size(); ++j) { p1 = left1.at(j); if (p0 == p1) { hints.push_back(1); left1.erase(left1.begin() + j); break; } } } } return hints; } void ColorCode::ResolveHints() { if (mCurRow == NULL) { return; } mHintBtns[mCurRow->GetIx()]->SetActive(false); std::vector rowsol = mCurRow->GetSolution(); mSolver->GuessIn(&rowsol); std::vector rowhints = mHintBtns[mCurRow->GetIx()]->GetHints(); int b = 0; int w = 0; for (unsigned i = 0; i < rowhints.size(); ++i) { if (rowhints.at(i) == 2) { ++b; } else if (rowhints.at(i) == 1) { ++w; } } if (b == mPegCnt) { SetState(STATE_WON); ResolveGame(); } else if (b == mPegCnt - 1 && w == 1) { ; } else { mSolver->ResIn(&rowhints); NextRow(); ResolveGame(); } } void ColorCode::ResolveGame() { if (mGameMode == MODE_HVM) { switch (mGameState) { case STATE_WON: { ShowMsgSlot(tr("Congratulation! You have won!")); mHighScore->mTime = mGameTimer->GetGameTime(); mGameInput->mScore = mHighScore->GetScore(); mGameInput->mDuration = mGameTimer->GetGameTime(); CCGame* g = new CCGame(mGameInput->ToString()); emit NewHighScoreSignal(g); } break; case STATE_LOST: ShowMsgSlot(tr("Sorry! You lost!")); break; case STATE_GAVE_UP: ShowMsgSlot(tr("Sure, You're too weak for me!")); break; case STATE_ERROR: ShowMsgSlot(tr("The impossible happened, sorry.")); break; case STATE_PAUSED: ShowMsgSlot(tr("Paused")); return; break; case STATE_RUNNING: default: return; break; } mFinishedGameInput = new CCGame(mGameInput->ToString()); mGameInput = NULL; mGameTimer->StopT(); ShowSolution(); } else if (mGameMode == MODE_MVH) { switch (mGameState) { case STATE_WON: ShowMsgSlot(tr("Yeah! I guessed it, man!")); break; case STATE_LOST: ShowMsgSlot(tr("Embarrassing! I lost a game!")); break; case STATE_GAVE_UP: ShowMsgSlot(tr("Don't you like to see me winning? ;-)")); break; case STATE_ERROR: ShowMsgSlot(tr("Nope! Thats impossible! Did you gave me false hints?")); break; case STATE_RUNNING: default: return; break; } mDoneBtn->ShowBtn(false); mOkBtn->ShowBtn(false); } SetCurRow(NULL); } void ColorCode::ApplyGameMode() { mGameMode = GetGameModeInput(); if (mGameMode == MODE_HVM) { mActSetHints->setVisible(false); mActSetGuess->setVisible(true); mActPrevRow->setVisible(true); } else if (mGameMode == MODE_MVH) { mActSetHints->setVisible(true); mActSetGuess->setVisible(false); mActPrevRow->setVisible(false); } ShowTimer(); } int ColorCode::GetGameState() const { return mGameState; } int ColorCode::GetGameModeInput() const { int ix = mActGroupModes->checkedAction()->data().toInt(); if (ix != MODE_HVM && ix != MODE_MVH) { ix = MODE_HVM; } return ix; } int ColorCode::GetDoublesInput() const { return (int) mActDoubles->isChecked(); } int ColorCode::GetColorCntInput() const { int ccnt = mColorCntCmb->itemData(mColorCntCmb->currentIndex(), Qt::UserRole).toInt(); ccnt = max(2, min(10, ccnt)); return ccnt; } int ColorCode::GetPegCntInput() const { int pegcnt = mPegCntCmb->itemData(mPegCntCmb->currentIndex(), Qt::UserRole).toInt(); pegcnt = max(2, min(5, pegcnt)); return pegcnt; } void ColorCode::ApplyPegCnt() { mPegCnt = GetPegCntInput(); mXOffs = 160 - mPegCnt * 20; } void ColorCode::ApplySolverStrength() { mSolverStrength = mSettings->mSolverStrength; } void ColorCode::SetSolution() { mSolution.clear(); if (mGameMode == MODE_HVM) { mSolutionRow->ClearRow(); mSolution = mSolver->GetSolutionByNo(mGameInput->mGameNo); } else if (mGameMode == MODE_MVH) { std::vector s = mSolutionRow->GetSolution(); if (s.size() == (unsigned) mPegCnt) { mSolutionRow->CloseRow(); mDoneBtn->ShowBtn(false); for (int i = 0; i < mPegCnt; ++i) { mSolution.push_back(s.at(i)); } } } } void ColorCode::GetSolution() { ShowMsgSlot(tr("Place Your secret ColorCode ...")); mSolutionRow->SetActive(true); SetCurRow(mSolutionRow); } void ColorCode::ShowSolution() { mSolutionRow->SetActive(true); ColorPeg* peg; for (int i = 0; i < mPegCnt; ++i) { peg = mPegFactory->CreatePeg(mSolution.at(i)); peg->SetBtn(false); mSolutionRow->ForceSnap(peg, i); } mSolutionRow->CloseRow(); } void ColorCode::SetState(const int s) { if (mGameState != s) { mGameState = s; } } bool ColorCode::GamesRunning() { if (mGameMode == MODE_HVM) { return ((mGameState == STATE_RUNNING || mGameState == STATE_PAUSED) && mGuessCnt > 1); } else if (mGameMode == MODE_MVH) { return (mGameState == STATE_RUNNING && mCurRow != mSolutionRow); } return false; } void ColorCode::Scale() { if (mGameCnt == 0) { return; } qreal w = geometry().width(); qreal h = geometry().height(); if (mActShowStatusbar->isChecked()) { h -= statusBar()->height(); } if (mActShowMenubar->isChecked()) { h -= mMenuBar->height(); } if (mActShowToolbar->isChecked()) { h -= mGameToolbar->height(); } if (w < 50 || h < 50) { return; } if (mOrigSize == NULL) { mOrigSize = new QSize(320, 560); mScene->setSceneRect(QRectF(0, 0, 320, 560)); } else { qreal sc = min(w / mOrigSize->width(), h / mOrigSize->height()); mView->resetTransform(); mView->scale(sc, sc); } } CCSolver* ColorCode::GetCCSolver() const { return mSolver; } void ColorCode::WaitForSolver() { mIgnoreGuess = true; mSolver->Interrupt(); mSolver->wait(); } bool ColorCode::ForceRepaint() { mView->viewport()->repaint(); QApplication::processEvents(); return true; } void ColorCode::SavePrevGameSlot() { CCGame* g = GetCurrentGameInput(); if (g != NULL) { mGameTablesDialog->InsertSavedGameSlot(g); } } ColorCode-0.8.5/trans_hu.ts0000644000175000017500000011052212610773251014241 0ustar dirkdirk UTF-8 About ColorCode ColorCode A needful game to train your brain ;-) Az agytekervények megmozgatására szolgáló játék ;-) <br><br>Free MasterMind clone including a built in,<br>rather intelligent solver. <br><br>Egy ingyenes MasterMind klón,<br> kiegészítve egy meglehetÅ‘sen intelligens megoldóval. Version Verzió Author SzerzÅ‘ About ColorCode Névjegy: ColorCode &Author &SzerzÅ‘ icon ikon &License &Licensz 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. Ez a program egy szabad szoftver, amit továbbadhatsz és/vagy módosíthatsz a GNU General Public Licensz alapján, amit a Free Software Foundation adott ki; a 3. Licensz verzió szerint, vagy bármely késÅ‘bbi (tetszés szerint) verzió alapján. ButtonsCell Play this Game again Save this Game as Bookmark Remove from List Copy Game Number to Clipboard ColorCode ColorCode ColorCode Done Befejez &New Game &Új játék Ctrl+N Ctrl+N &Restart Game &Játék újrakezdése Ctrl+Shift+N Ctrl+Shift+N &Throw In The Towel Játék &feladása Ctrl+G Ctrl+G E&xit &Kilép Ctrl+Q Ctrl+Q Show Toolbar Eszköztár mutatása Ctrl+T Ctrl+T Show Menubar Menüsor mutatása Ctrl+M Ctrl+M Show Statusbar Ãllapotsor mutatása Reset Color Order Szín sorrend nullázása Ctrl+Shift+R Ctrl+Shift+R Show Indicators JelzÅ‘k használata Ctrl+Shift+L Ctrl+Shift+L Allow Pegs of the Same Color Azonos színű ékek engedélyezése Ctrl+Shift+C Ctrl+Shift+C Disallow Pegs of the Same Color Azonos színű ékek tiltása Close Rows when the last Peg is placed Sor zárolása az utolsó ék behelyezése után Ctrl+L Ctrl+L Set Hints automatically Automatikus útmutatások Ctrl+Shift+H Ctrl+Shift+H Online &Help Online &segítség F1 F1 About &ColorCode Névejgy: &ColorCode Ctrl+A Ctrl+A About &Qt Névjegy: &Qt Ctrl+I Ctrl+I Fill Row by Random Sorok kitöltése véletlenszerűen Ctrl+R Ctrl+R Duplicate Previous Row ElÅ‘zÅ‘ sor duplázása Ctrl+D Ctrl+D Clear Row Sor törlése Ctrl+C Ctrl+C Beginner (2 Colors, 2 Slots, Doubles) KezdÅ‘ (2 szín, 2 lyuk, duplázás) Easy (4 Colors, 3 Slots, No Doubles) Könnyű (4 szín, 3 lyuk, nincs duplázás) Classic (6 Colors, 4 Slots, Doubles) Klasszikus (6 szín, 4 lyuk, duplázás) Challenging (8 Colors, 4 Slots, Doubles) Kihívás (8 szín, 4 lyuk, duplázás) Hard (10 Colors, 5 Slots, Doubles) Nehéz (10 szín, 5 lyuk, duplázás) Computer's Guess Gép tippje Ctrl+H Ctrl+H Rate it for me Értékeld nekem Human vs Computer Ember kontra számítógép Computer vs Human Számítógép kontra ember Preferences Beállítások Ctrl+P Ctrl+P &Game &Játék &Row &Sor &Settings &Beállítások Game Mode Játék mód Level Presets Nehézség beállítása &Help &Segítség Game Játék Colors Színek Slots Lyukak Level Nehézség Message Üzenet The changed settings will only apply to new games! Do you want to give in the current and start a new Game? A megváltozott beállítások csak az új játékra lesznek érvényesek! Feladod a jelenlegi játékot, és indítasz egy újat? New Game Új játék Do you want to give in and start a new Game? Feladod, és kezdesz egy újat? Give In Felad Do you really want to give in? Tényleg feladod? About Qt Névjegy: Qt Press the Hint Field or Key Enter if You're done. Nyomd meg az útmutatás mezÅ‘t, vagy üsd le az entert ha kész vagy. Place Your pegs ... Helyezd el az ékeket... Press the button below or Key Enter if You're done. Nyomd meg a fenti gombot, vagy üsd le az entert ha végeztél. The chosen settings do not allow pegs of the same color! A megadott beállítások nem engedélyezik az azonos színeket! Place Your secret ColorCode ... Helyezd el a titkos színkombinációt... Yes Igen No Nem Pegs of Same Color Azonos színű ékek Please rate the guess. Press OK or Key Enter if You're done. Értékeld a tippet. Kattints az OK-ra, vagy üss entert ha kész vagy. Congratulation! You have won! Gratulálok! Nyertél! Sorry! You lost! Sajnálom! Vesztettél! Sure, You're too weak for me! Biztos, Túl kevés vagy hozzám! The impossible happened, sorry. A lehetetlen megtörtént, bocsi. Yeah! I guessed it, man! Fain! Kitalátam öcsém! Embarrassing! I lost a game! LenyűgözÅ‘! Elvesztettem a játékot! Don't you like to see me winning? ;-) Nem akarsz gyÅ‘zni látni engem? ;-) Nope! Thats impossible! Did you gave me false hints? Neee! Ez hihetetlen! Hamis útmutatást adtál nekem? &Start particular Game Ctrl+B Ctrl+Alt+H &Recent Games Ctrl+Alt+R &Bookmarks Ctrl+Alt+B Ctrl+Shift+S Game &Lists guessed and rated ... Let me think ... Computer vs. Human Számítógép kontra ember &Highscores Ctrl+Shift+B Ctrl+Alt+N &Have a Break &Bookmark Current Game Ctrl+Shift+T Show Timer Display Game Number Allow Pegs of Same Color Azonons színű ékek engedélyezése Disallow Pegs of Same Color Ctrl+Alt+C Ctrl+Shift+P &Resume Game Human vs. Computer Ember kontra számítógép Game Number Paused &Copy Game Number GameNoDisplay Human vs. Computer Ember kontra számítógép GameTablesDialog ColorCode Games Game Properties User Color Count Slot Count Pegs of Same Color Azonos színű ékek Yes Igen Game Number Date and Time Duration Insert Game Number Play Recent Games Bookmarks Highscores Clear List Close No Nem Message Üzenet This will permanently remove all entries from the List. Do You want to proceed? Game Number Input Bookmarked Games High Score List Please provide a name! Otherwise your score won't be saved. Insert an arbitrary game number greater than 0 in the input field above. <br><br>The game properties like color count, slot count etc. will be displayed in the corresponding area above.<br><br>Click the Play button or press key Enter, to play the game. If a game is currently running, it will be aborted. Game Lists GamesListModel Yes Igen No Nem Pegs of Same Color Azonos színű ékek Actions Rank User Score Date Time Colors Színek Slots Lyukak Game No. PrefDialog ... Select from predefined level settings ... Válassz az elÅ‘re meghatározott szint beállítások közül Beginner (2 Colors, 2 Slots, Doubles) KezdÅ‘ (2szín, 2 lyuk, duplázás) Easy (4 Colors, 3 Slots, No Doubles) Könnyű (4 szín, 3 lyuk, nincs duplázás) Classic (6 Colors, 4 Slots, Doubles) Klasszikus (6 szín, 4 lyuk, duplázás) Challenging (8 Colors, 4 Slots, Doubles) Kihívás (8 szín, 4 lyuk, duplázás) Hard (10 Colors, 5 Slots, Doubles) Nehéz (10 szín, 5 lyuk, duplázás) Slots Lyukak Colors Színek Human vs. Computer Ember kontra számítógép Computer vs. Human Számítógép kontra ember Low Könnyű Medium Közepes High Nehéz Preferences Beállítások Appearance Megjelenés Controls Gombok Show or hide the Menubar. Menüsor mutatása vagy elrejtése. Show Menubar Meüsor mutatása Show or hide the Toolbar. Eszköztár mutatása vagy elrejtése. Show Toolbar Eszköztár mutatása Show or hide the Statusbar. Ãllapotsor mutatása vagy elrejtése. Show Statusbar Ãllapotsor mutatása Indicators JelzÅ‘k If this option is checked, an indicator inside each peg is displayed. Ha ez az opció be van jelölve, akkor minden ékben megjelenik egy jelzÅ‘. Show Indicators inside pegs JelzÅ‘k mutatása az ékeken belül Use unique letters as indicators. Egyedi betűk használata jelzÅ‘ként. Letter Indicators Betű jelzÅ‘k Use unique numbers as indicators. Egydi számok használata jelzÅ‘ként. Number Indicators Szám jelzÅ‘k Use the same neutral background color for each peg, when indicators are shown. Egyforma sima háttér használata az ékeknél, amikor a jelzÅ‘k látszanak. Hide Colors Színek elrejtése Click here if you have changed the color order and now you want to revert it to it's initial state. Kattints ide ha megváltoztattad a szín sorrendet, és visszakarod állatani az eredetire. Reset Color Order Szín sorrend nullázása Game Settings Játék beállítások Level Presets Nehézségi beállítások Select from predefined combinations of the three different level related settings, the number of colors, the number of slots (columns) and the possibility of pegs of the same color in one row. Válassz az elÅ‘re meghatározott nehézségi szint 3 különbözÅ‘ lehetÅ‘sége közül, színek száma, lyukak (oszlop) száma, és az egy sorban lehetséges azonos színek száma. Number of Slots Lyukak száma Number of Colors Színek száma Number of pegs in a single row. Higher values are harder to guess. Ékek száma egy sorban. A nyagyobb értéket nehezebb eltalálni. Number of all possible colors. Higher values are harder to guess. A lehetséges színek száma. A nagyobb értéket nehezebb eltalálni. If this option is checked, the hidden combination may contain one or more (even all would be possible) pegs of the same color. If checked, the combination is generally harder to guess. Amennyiben ez a lehetÅ‘ség be van kapcsolva, akkor a rejtett kombináció tartalmazhat egy vagy több (akár az összes) azonos színű éket. Ha be van kapcsolva, nehezebb megfejteni a kombinációt. Allow Pegs of Same Color Azonons színű ékek engedélyezése Game Mode Játék mód Select from the different game modes. In the 1. mode you have to to guess the hidden, computer generated combination, In the 2. mode your computer will try to guess your own secret combination. Válassz a különbözÅ‘ játék módok közül. Az 1. módban neked kell kitalálnod a titkos kombinációt, amit a gép kigondolt. A 2. módban a gépnek kell kitalálnia az általad megadott kombinációt. If checked, a row is closed as soon as you place the last peg and your guess is submitted immediatly. This option only affects the Human vs. Computer game mode. Ha ez be van kapcsolva, akkor a sor zárolásra kerül, amint beraktad az utolsó éket, és a tipped azonnal ki lesz értékelve. Ez az opció csak az Ember kontra számítógép módban működik. Close Rows when the last Peg is placed Sor zárolása, amint az utolsó ék is a helyére került If checked, the computer will determine the corresponding hints for the solver's guess. This option affects only Computer vs. Human games. If checked, you only have to place your secret combination. Then the rest of the game runs automatically until the end. But you can set a delay between the guesses. Ha ezt bekapcsolod, akkor a gép automatikusan kiértékeli a tippet a jelzÅ‘k segítségével. Ez a lehetÅ‘ség csak a Számítógép kontra ember módnál működik. Bekapcsolt állapotban, csak titkos kombinációt kell megadnod, majd a játék hátralevÅ‘ részét a gép automatikusan lejátsza. De meg tudsz adni késleltetést a tippek közé. Set Hints automatically JelzÅ‘k automatikus használata Adjust the delay (in ms) between two guesses. Tippek közti késleltetés megadása. Delay in ms Késleltelés ms-ban Solver Strength Megoldási nehézség Select from 3 different strength levels for your computer opponent. This option only affects the Computer vs. Human game mode. For the computer's guess in the Human vs. Computer mode always the highest level will be used. Válassz a 3 különbözÅ‘ nehézség közül a gépi ellenfél számára. Ez az opció csak a Számítógép kontra ember módot befolyásolja. A gép tippjeinél az Ember kontra számítógép módban a legnehezebb nehézségi szint lesz használva. Show Game Timer Display Game Number Game Lists Maximum Row Count: Use Highscores Raise the dialog after a game has been won and prompt for the name Automatically insert Highscores using the name below Name (mandatory for the second option) User Interface Display the current game number in the footer. To avoid remembering, you can hide it here. Timer You may hide the timer to keep calm ;-) But note! Even hidden, time's running in the background. Game Properties Select One of the Level Presets: Or Set the Particular Properties: Game Flow Solver Limit the number of rows in game tables like highscores etc. Valid values range from 5 to 50. Use Customized Table Row Highlight Colors Foreground Background Highscores Provide a name with maximum 20 characters here to be used for highscore entries. If you checked the automatic option above, this name is mandatory, otherwise it will be used as proposal which you may change later in the dialog. Uncheck this if you are confused about the time as fast running ;-) Show Tenth and Hundredth RowHint Commit Your solution Kövesd a megoldásodat Click the circles to rate my guess. Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-) Kattints a körökbe, hogy kiértékeld a tippemet. Vagy nyomd le a Ctrl+H billentyűkombinációt, vagy használd az eszköztár adott gombját, hogy megtegyem ezt helyetted;-) ColorCode-0.8.5/INSTALL0000644000175000017500000000115112610773251013074 0ustar dirkdirk# simply run: qmake make # note: maybe your QT installation only provides # qmake-xx (not qmake). That may be ok as long as # qmake-xx -v shows something like: # "Using Qt version 5.2.x" or higher versions # in this case run: # qmake-xx # make # # in case of having multiple QT/qmake versions installed, # and QT5 isn't the default one, choose the QT5 one and run: # /path/to/qt5-version-of/qmake # make # to install: cp colorcode /usr/bin/ # to uninstall: rm /usr/bin/colorcode # If you are still using QT version 4, look # for the latest QT 4 version of ColorCode at: # http://colorcode.laebisch.com/download ColorCode-0.8.5/settings.cpp0000644000175000017500000002557512610773251014427 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include "settings.h" #include "colorcode.h" #include "ccsolver.h" #include "prevgamesmodel.h" #include "savedgamesmodel.h" #include "highscoresmodel.h" using namespace std; Settings* GetSettings() { static Settings* s = new Settings(); return s; } const int Settings::INDICATOR_LETTER = 0; const int Settings::INDICATOR_NUMBER = 1; const int Settings::DEF_COLOR_CNT = 8; const int Settings::DEF_PEG_CNT = 4; const int Settings::DEF_DOUBLES = 1; const int Settings::DEF_LIST_MAX_CNT = 15; const int Settings::HIGHSCORE_NO = 0; const int Settings::HIGHSCORE_PROMPT = 1; const int Settings::HIGHSCORE_AUTO = 2; const int Settings::MAX_LENGTH_USERNAME = 20; Settings::Settings() { } void Settings::Init() { mSettings.setDefaultFormat(QSettings::IniFormat); mSettings.setFallbacksEnabled(false); InitSettings(); SaveSettingsMap(mDefMap); ReadSettings(); SaveSettingsMap(mLastMap); emit ReadSettingsGamesDone(); } Settings::~Settings() { } void Settings::InitSettings() { mShowToolBar = true; mShowMenuBar = true; mShowStatusBar = false; mShowTimer = true; mShowTenth = true; mShowGameNo = true; mShowIndicators = false; mIndicatorType = INDICATOR_LETTER; mHideColors = false; mPegCnt = DEF_PEG_CNT; mColorCnt = DEF_COLOR_CNT; mDoubles = (bool)DEF_DOUBLES; mGameMode = ColorCode::MODE_HVM; mAutoClose = false; mAutoHints = false; mHintsDelay = 500; mSolverStrength = CCSolver::STRENGTH_HIGH; mPrevGamesStr = ""; mSavedGamesStr = ""; mHighGamesStr = ""; mGamesListMaxCnt = DEF_LIST_MAX_CNT; mCustomRowHColor = false; mRowHColorFg = QApplication::palette().color(QPalette::Active, QPalette::ButtonText).name(); mRowHColorBg = QApplication::palette().color(QPalette::Active, QPalette::Button).name(); mHighScoreHandling = HIGHSCORE_PROMPT; mHighScoreUserName = ""; } QMap Settings::GetDefaultsMap() const { return mDefMap; } void Settings::SaveLastSettings() { SaveSettingsMap(mLastMap); } void Settings::RestoreLastSettings() { RestoreSettingsMap(mLastMap); } void Settings::RestoreDefSettings() { RestoreSettingsMap(mDefMap); } void Settings::RestoreSettingsMap(QMap &map) { mShowToolBar = map["ShowToolBar"].toBool(); mShowMenuBar = map["ShowMenuBar"].toBool(); mShowStatusBar = map["ShowStatusBar"].toBool(); mShowTimer = map["ShowTimer"].toBool(); mShowTenth = map["ShowTenth"].toBool(); mShowGameNo = map["ShowGameNo"].toBool(); mShowIndicators = map["ShowIndicators"].toBool(); mIndicatorType = map["IndicatorType"].toInt(); mHideColors = map["HideColors"].toBool(); mPegCnt = map["ColumnCount"].toInt(); mColorCnt = map["ColorCount"].toInt(); mDoubles = map["Doubles"].toBool(); mGameMode = map["GameMode"].toInt(); mAutoClose = map["AutoClose"].toBool(); mAutoHints = map["AutoHints"].toBool(); mHintsDelay = map["HintsDelay"].toInt(); mSolverStrength = map["SolverStrength"].toInt(); mGamesListMaxCnt = map["GamesListMaxCnt"].toInt(); mCustomRowHColor = map["CustomRowHColor"].toBool(); mRowHColorFg = map["RowHColorFg"].toString(); mRowHColorBg = map["RowHColorBg"].toString(); mHighScoreHandling = map["HighScoreHandling"].toInt(); mHighScoreUserName = map["HighScoreUserName"].toString(); Validate(); } void Settings::SaveSettingsMap(QMap &map) { map["ShowToolBar"] = mShowToolBar; map["ShowMenuBar"] = mShowMenuBar; map["ShowStatusBar"] = mShowStatusBar; map["ShowTimer"] = mShowTimer; map["ShowTenth"] = mShowTenth; map["ShowGameNo"] = mShowGameNo; map["ShowIndicators"] = mShowIndicators; map["IndicatorType"] = mIndicatorType; map["HideColors"] = mHideColors; map["ColumnCount"] = mPegCnt; map["ColorCount"] = mColorCnt; map["Doubles"] = mDoubles; map["GameMode"] = mGameMode; map["AutoClose"] = mAutoClose; map["AutoHints"] = mAutoHints; map["HintsDelay"] = mHintsDelay; map["SolverStrength"] = mSolverStrength; map["GamesListMaxCnt"] = mGamesListMaxCnt; map["CustomRowHColor"] = mCustomRowHColor; map["RowHColorFg"] = mRowHColorFg; map["RowHColorBg"] = mRowHColorBg; map["HighScoreHandling"] = mHighScoreHandling; map["HighScoreUserName"] = mHighScoreUserName; } void Settings::ReadSettings() { mSettings.beginGroup("Appearance"); mShowToolBar = mSettings.value("ShowToolBar", mShowToolBar).toBool(); mShowMenuBar = mSettings.value("ShowMenuBar", mShowMenuBar).toBool(); mShowStatusBar = mSettings.value("ShowStatusBar", mShowStatusBar).toBool(); mShowTimer = mSettings.value("ShowTimer", mShowTimer).toBool(); mShowTenth = mSettings.value("ShowTenth", mShowTenth).toBool(); mShowGameNo = mSettings.value("ShowGameNo", mShowGameNo).toBool(); mShowIndicators = mSettings.value("ShowIndicators", mShowIndicators).toBool(); mIndicatorType = mSettings.value("IndicatorType", mIndicatorType).toInt(); mHideColors = mSettings.value("HideColors", mHideColors).toBool(); mSettings.endGroup(); mSettings.beginGroup("Game"); mPegCnt = mSettings.value("ColumnCount", mPegCnt).toInt(); mColorCnt = mSettings.value("ColorCount", mColorCnt).toInt(); mDoubles = mSettings.value("Doubles", mDoubles).toBool(); mGameMode = mSettings.value("GameMode", mGameMode).toInt(); mAutoClose = mSettings.value("AutoClose", mAutoClose).toBool(); mAutoHints = mSettings.value("AutoHints", mAutoHints).toBool(); mHintsDelay = mSettings.value("HintsDelay", mHintsDelay).toInt(); mSolverStrength = mSettings.value("SolverStrength", mSolverStrength).toInt(); mSettings.endGroup(); mSettings.beginGroup("History"); mPrevGamesStr = mSettings.value("PrevGames", "").toString(); mSavedGamesStr = mSettings.value("SavedGames", "").toString(); mHighGamesStr = mSettings.value("HighScoreList", "").toString(); mGamesListMaxCnt = mSettings.value("GamesListMaxCnt", mGamesListMaxCnt).toInt(); mCustomRowHColor = mSettings.value("CustomRowHColor", mCustomRowHColor).toBool(); mRowHColorFg = mSettings.value("RowHColorFg", mRowHColorFg).toString(); mRowHColorBg = mSettings.value("RowHColorBg", mRowHColorBg).toString(); mHighScoreHandling = mSettings.value("HighScoreHandling", mHighScoreHandling).toInt(); mHighScoreUserName = mSettings.value("HighScoreUserName", mHighScoreUserName).toString(); mSettings.endGroup(); Validate(); } void Settings::Validate() { if (mIndicatorType != INDICATOR_LETTER && mIndicatorType != INDICATOR_NUMBER) { mIndicatorType = INDICATOR_LETTER; } if (mPegCnt < 2 || mPegCnt > 5) { mPegCnt = 4; } if (mColorCnt < 2 || mColorCnt > 10) { mColorCnt = 8; } if (mGameMode != ColorCode::MODE_HVM && mGameMode != ColorCode::MODE_MVH) { mGameMode = ColorCode::MODE_HVM; } if (mSolverStrength < CCSolver::STRENGTH_LOW || mSolverStrength > CCSolver::STRENGTH_HIGH) { mSolverStrength = CCSolver::STRENGTH_HIGH; } if (mHintsDelay > 10000) { mHintsDelay = 10000; } else if (mHintsDelay < 0) { mHintsDelay = 0; } if (mHighScoreHandling == HIGHSCORE_AUTO && mHighScoreUserName == "") { mHighScoreHandling = HIGHSCORE_PROMPT; } else if (mHighScoreHandling < HIGHSCORE_NO || mHighScoreHandling > HIGHSCORE_AUTO) { mHighScoreHandling = HIGHSCORE_PROMPT; } if (mGamesListMaxCnt < 5 || mGamesListMaxCnt > 50) { mGamesListMaxCnt = DEF_LIST_MAX_CNT; } QColor color; color.setNamedColor(mRowHColorFg); if (!color.isValid()) { mRowHColorFg = mDefMap["RowHColorFg"].toString(); } color.setNamedColor(mRowHColorBg); if (!color.isValid()) { mRowHColorBg = mDefMap["RowHColorBg"].toString(); } } CCGame* Settings::GetCurSettingsGame() const { CCGame* g = new CCGame(); g->mColorCnt = mColorCnt; g->mPegCnt = mPegCnt; g->mDoubles = int(mDoubles); g->mGameMode = mGameMode; g->mTime = QDateTime::currentDateTime().toTime_t(); return g; } QString Settings::GetActiveRowHFg() const { if (mCustomRowHColor) { return mRowHColorFg; } return mDefMap["RowHColorFg"].toString(); } QString Settings::GetActiveRowHBg() const { if (mCustomRowHColor) { return mRowHColorBg; } return mDefMap["RowHColorBg"].toString(); } void Settings::WriteSettings() { mSettings.beginGroup("Appearance"); mSettings.setValue("ShowToolBar", mShowToolBar); mSettings.setValue("ShowMenuBar", mShowMenuBar); mSettings.setValue("ShowStatusBar", mShowStatusBar); mSettings.setValue("ShowTimer", mShowTimer); mSettings.setValue("ShowTenth", mShowTenth); mSettings.setValue("ShowGameNo", mShowGameNo); mSettings.setValue("ShowIndicators", mShowIndicators); mSettings.setValue("IndicatorType", mIndicatorType); mSettings.setValue("HideColors", mHideColors); mSettings.endGroup(); mSettings.beginGroup("Game"); mSettings.setValue("ColumnCount", mPegCnt); mSettings.setValue("ColorCount", mColorCnt); mSettings.setValue("Doubles", mDoubles); mSettings.setValue("GameMode", mGameMode); mSettings.setValue("AutoClose", mAutoClose); mSettings.setValue("AutoHints", mAutoHints); mSettings.setValue("HintsDelay", mHintsDelay); mSettings.setValue("SolverStrength", mSolverStrength); mSettings.endGroup(); mSettings.beginGroup("History"); mSettings.setValue("PrevGames", GetPrevGamesModel()->GetListStr()); mSettings.setValue("SavedGames", GetSavedGamesModel()->GetListStr()); mSettings.setValue("HighScoreList", GetHighScoresModel()->GetListStr()); mSettings.setValue("GamesListMaxCnt", mGamesListMaxCnt); mSettings.setValue("CustomRowHColor", mCustomRowHColor); mSettings.setValue("RowHColorFg", mRowHColorFg); mSettings.setValue("RowHColorBg", mRowHColorBg); mSettings.setValue("HighScoreUserName", mHighScoreUserName); mSettings.setValue("HighScoreHandling", mHighScoreHandling); mSettings.endGroup(); mSettings.sync(); } ColorCode-0.8.5/buttonscell.h0000644000175000017500000000142112610773251014552 0ustar dirkdirk#ifndef BUTTONSCELL_H #define BUTTONSCELL_H #include #include #include "cellbtn.h" class ButtonsCell : public QWidget { Q_OBJECT public: static const int ACTIONID_NONE; static const int ACTIONID_PLAY; static const int ACTIONID_SAVE; static const int ACTIONID_COPY; static const int ACTIONID_DELETE; ButtonsCell(QWidget* parent = 0, int hideBtn = 0); int GetActionId(); signals: void CellButtonClickedSignal(); protected slots: void ButtonClickedSlot(); private: CellBtn *mDeleteBtn; CellBtn *mPlayBtn; CellBtn *mSaveBtn; CellBtn *mCopyBtn; QList mButtonsList; int mActionId; }; #endif // BUTTONSCELL_H ColorCode-0.8.5/colorcode.h0000644000175000017500000002077412610773251014201 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef COLORCODE_H #define COLORCODE_H #include #include struct PegType { int ix; char let; QRadialGradient* grad; QColor pencolor; }; class QAction; class QActionGroup; class QComboBox; class QLabel; class QGraphicsItem; class QGraphicsTextItem; class QGraphicsScene; class QGraphicsView; class PrefDialog; class Settings; class CCSolver; class ColorPeg; class PegRow; class RowHint; class Msg; class BackGround; class SolutionRow; class GraphicsBtn; class PegFactory; class CCGame; class GameNoDisplay; class TimeDisplay; class TimeDisplayBg; class HighScore; class GameTablesDialog; class ColorCode : public QMainWindow { Q_OBJECT public: ColorCode(); ~ColorCode(); static ColorCode* INSTANCE; static const QString VERSION; static QString GAME_TITLE; static const int STATE_NONE; static const int STATE_RUNNING; static const int STATE_PAUSED; static const int STATE_WON; static const int STATE_LOST; static const int STATE_GAVE_UP; static const int STATE_ERROR; static const int LAYER_BG; static const int LAYER_ROWS; static const int LAYER_HINTS; static const int LAYER_SOL; static const int LAYER_MSG; static const int LAYER_PEGS; static const int LAYER_BTNS; static const int LAYER_DRAG; static const int MODE_HVM; static const int MODE_MVH; static const int MAX_COLOR_CNT; static const int MIN_COLOR_CNT; static const int SOLUTION_ROW_IX; static const int LEVEL_SETTINGS[5][3]; static int mMaxRowCnt; static int mRowY0; static int mColorCnt; Settings* mSettings; GameTablesDialog* mGameTablesDialog; QGraphicsScene* mScene; QGraphicsView* mView; int GetGameState() const; int GetGameModeInput() const; int GetDoublesInput() const; int GetColorCntInput() const; int GetPegCntInput() const; CCSolver* GetCCSolver() const; public slots: void SnapPegSlot(ColorPeg *cp); void RowSolutionSlot(int ix); void HintPressedSlot(int ix); void ShowMsgSlot(QString msg); void DoneBtnPressSlot(GraphicsBtn* btn = NULL); void SetSolverGuessSlot(); void ApplyPreferencesSlot(); signals: void NewHighScoreSignal(CCGame* g); protected : void resizeEvent(QResizeEvent* e); void contextMenuEvent(QContextMenuEvent* e); void keyPressEvent(QKeyEvent *e); private slots: void InitRows(); void NewGameSlot(); void NewGameInputSlot(CCGame* g); void SavePrevGameSlot(); void NewGame(); void RestartGameSlot(); void GiveInSlot(); void PauseGameSlot(GraphicsBtn* = NULL); void ResetRows(); void OnlineHelpSlot(); void AboutSlot(); void AboutQtSlot(); void OpenPreferencesSlot(); void ApplySettingsSlot(); void ShowToolbarSlot(); void ShowMenubarSlot(); void ShowStatusbarSlot(); void ShowTimerSlot(); void ShowGameNoSlot(); void CloseHighScoreDialogSlot(); void SetIndicatorsSlot(); void DoublesChangedSlot(bool checked); void SetDoublesSlot(bool checked); void AutoCloseSlot(); void AutoHintsSlot(); void SetLevelSlot(); void SetGameModeSlot(); void CopyGameNoSlot(); void RandRowSlot(); void PrevRowSlot(); void ClearRowSlot(); void ColorCntChangedSlot(); void PegCntChangedSlot(); void UpdateRowMenuSlot(); void SetGuessSlot(); void SetHintsSlot(); void SetAutoHintsSlot(); void TestSlot(); private: static int mGameMode; static int mLevel; static int mPegCnt; static int mDoubles; static int mMaxZ; static int mXOffs; volatile static bool mNoAct; volatile static bool mIgnoreGuess; int mGameState; int mGameId; int mGuessCnt; int mHintsCnt; int mGameCnt; int mSolverStrength; std::vector mSolution; QSize* mOrigSize; CCSolver* mSolver; PegFactory* mPegFactory; Msg* mMsg; BackGround* mBg; GraphicsBtn* mDoneBtn; GraphicsBtn* mOkBtn; GraphicsBtn* mTimerBtn; GraphicsBtn* mSolutionRowBg; PrefDialog* mPrefDialog; PegRow* mCurRow; SolutionRow* mSolutionRow; PegRow* mPegRows[10]; RowHint* mHintBtns[10]; QTimer* mHintsDelayTimer; TimeDisplay* mGameTimer; TimeDisplayBg* mGameTimerBg; GameNoDisplay* mGameNoDisplay; CCGame* mGameInput; CCGame* mFinishedGameInput; HighScore* mHighScore; void Init(); void InitSolution(); void InitActions(); void InitMenus(); void InitToolBars(); void CreatePrefDialog(); void ShowTimer(); void UpdateGameNoDisplay(); CCGame* GetCurrentGameInput() const; bool NeedsRestart() const; void TryNewGame(); void SetGameMode(); void UpdateActions(); void SetPegCnt(); void SetColorCnt(); void ApplyGameMode(); void ApplyPegCnt(); void ApplySolverStrength(); void CheckLevel(); void CheckDoublesSetting(); void SetState(const int s); void ResetGame(); void SetSolution(); void GetSolution(); void ShowSolution(); void NextRow(); void SetCurRow(PegRow* const &row); void ResolveRow(); std::vector RateSol2Guess(const std::vector sol, const std::vector guess); void ResolveHints(); void ResolveGame(); void WaitForSolver(); bool ForceRepaint(); bool GamesRunning(); void Scale(); CCGame* GetRandGameInput(); QMenu* mMenuGame; QMenu* mMenuRow; QMenu* mMenuRowContext; QMenu* mMenuSettings; QMenu* mMenuModes; QMenu* mMenuLevels; QMenu* mMenuGames; QMenu* mMenuHelp; QMenuBar* mMenuBar; QToolBar* mGameToolbar; QToolBar* mLevelToolbar; QComboBox* mColorCntCmb; QComboBox* mPegCntCmb; QLabel* mStatusLabel; QActionGroup* mActGroupLevels; QActionGroup* mActGroupModes; QAction* mActNewGame; QAction* mActSelectGame; QAction* mActCopyGameNo; QAction* mActRestartGame; QAction* mActGiveIn; QAction* mActSaveGame; QAction* mActPauseGame; QAction* mActShowHighScores; QAction* mActShowPrevGames; QAction* mActShowSavedGames; QAction* mActExit; QAction* mActShowToolbar; QAction* mActShowMenubar; QAction* mActShowStatusbar; QAction* mActShowTimer; QAction* mActShowGameNo; QAction* mActDoubles; QAction* mActResetColorsOrder; QAction* mActShowIndicators; QAction* mActDoublesIcon; QAction* mActAutoClose; QAction* mActAutoHints; QAction* mActPreferences; QAction* mActAbout; QAction* mActAboutQt; QAction* mActSetPegCnt; QAction* mActModeHvM; QAction* mActModeMvH; QAction* mActLevelEasy; QAction* mActLevelClassic; QAction* mActLevelMedium; QAction* mActLevelChallenging; QAction* mActLevelHard; QAction* mLaunchHelpAction; QAction* mActRandRow; QAction* mActPrevRow; QAction* mActClearRow; QAction* mActSetGuess; QAction* mActSetHints; }; #endif // COLORCODE_H ColorCode-0.8.5/ccsolver.cpp0000644000175000017500000004056112610773251014377 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include "ccsolver.h" #include #include using namespace std; const int CCSolver::STRENGTH_LOW = 0; const int CCSolver::STRENGTH_MEDIUM = 1; const int CCSolver::STRENGTH_HIGH = 2; const int CCSolver::STRENGTH_DYNAMIC = 3; const int CCSolver::mFGCnts[4][9][4] = { { {2, 0, 0, 0}, {2, 0, 0, 0}, {1, 1, 0, 0}, {1, 1, 0, 0}, {1, 1, 0, 0}, {1, 1, 0, 0}, {1, 1, 0, 0}, {1, 1, 0, 0}, {1, 1, 0, 0} }, { {3, 0, 0, 0}, {2, 1, 0, 0}, {1, 1, 1, 0}, {1, 1, 1, 0}, {1, 1, 1, 0}, {1, 1, 1, 0}, {1, 1, 1, 0}, {1, 1, 1, 0}, {1, 1, 1, 0} }, { {3, 1, 0, 0}, {3, 1, 0, 0}, {2, 1, 1, 0}, {2, 2, 0, 0}, {2, 2, 0, 0}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1} }, { {4, 1, 0, 0}, {3, 2, 0, 0}, {3, 1, 1, 0}, {2, 2, 1, 0}, {2, 1, 1, 1}, {2, 2, 1, 0}, {2, 1, 1, 1}, {2, 1, 1, 1}, {2, 1, 1, 1} } }; const int CCSolver::GAME_NOS_CNT = 66; const int CCSolver::mGameNos[66][4] = { { 2, 2, 2, 0}, { 6, 2, 2, 1}, { 12, 3, 2, 0}, { 21, 3, 2, 1}, { 33, 4, 2, 0}, { 49, 4, 2, 1}, { 69, 5, 2, 0}, { 94, 5, 2, 1}, { 124, 6, 2, 0}, { 160, 6, 2, 1}, { 202, 7, 2, 0}, { 251, 7, 2, 1}, { 307, 8, 2, 0}, { 371, 8, 2, 1}, { 443, 9, 2, 0}, { 524, 9, 2, 1}, { 614, 10, 2, 0}, { 714, 10, 2, 1}, { 722, 2, 3, 1}, { 728, 3, 3, 0}, { 755, 3, 3, 1}, { 779, 4, 3, 0}, { 843, 4, 3, 1}, { 903, 5, 3, 0}, { 1028, 5, 3, 1}, { 1148, 6, 3, 0}, { 1364, 6, 3, 1}, { 1574, 7, 3, 0}, { 1917, 7, 3, 1}, { 2253, 8, 3, 0}, { 2765, 8, 3, 1}, { 3269, 9, 3, 0}, { 3998, 9, 3, 1}, { 4718, 10, 3, 0}, { 5718, 10, 3, 1}, { 5734, 2, 4, 1}, { 5815, 3, 4, 1}, { 5839, 4, 4, 0}, { 6095, 4, 4, 1}, { 6215, 5, 4, 0}, { 6840, 5, 4, 1}, { 7200, 6, 4, 0}, { 8496, 6, 4, 1}, { 9336, 7, 4, 0}, { 11737, 7, 4, 1}, { 13417, 8, 4, 0}, { 17513, 8, 4, 1}, { 20537, 9, 4, 0}, { 27098, 9, 4, 1}, { 32138, 10, 4, 0}, { 42138, 10, 4, 1}, { 42170, 2, 5, 1}, { 42413, 3, 5, 1}, { 43437, 4, 5, 1}, { 43557, 5, 5, 0}, { 46682, 5, 5, 1}, { 47402, 6, 5, 0}, { 55178, 6, 5, 1}, { 57698, 7, 5, 0}, { 74505, 7, 5, 1}, { 81225, 8, 5, 0}, {113993, 8, 5, 1}, {129113, 9, 5, 0}, {188162, 9, 5, 1}, {218402, 10, 5, 0}, {318402, 10, 5, 1} }; CCSolver::CCSolver(QObject* parent) : QThread(parent) { mColorCnt = 0; mPegCnt = 0; mDoubles = -1; mLevel = -1; mMaxGuessCnt = 0; mAllCnt = 0; mPosCnt = 0; mHistCnt = 0; mGuessCnt = 0; mMaxRes = 0; mResCnt = 0; mRestartCnt = 0; mResTable = NULL; mCascade = NULL; mPossible = NULL; mPos2AllIx = NULL; mAllTable = NULL; mHist = NULL; mS = NULL; mP = NULL; mInterrupt = false; } CCSolver::~CCSolver() { wait(); FreeTables(); } int CCSolver::GetRandGameNo(const int ccnt, const int pcnt, const int doubles) const { int min = 0; int max = 0; int i; for (i = 0; i < GAME_NOS_CNT; ++i) { if (mGameNos[i][1] == ccnt && mGameNos[i][2] == pcnt && mGameNos[i][3] == doubles) { max = mGameNos[i][0]; if (i > 0) { min = mGameNos[i - 1][0]; } break; } } if (max == 0) { return 1; } int range = max - min; int rndm = (qrand() % range) + 1; return min + rndm; } int CCSolver::GetRealGameNo(const uint no) const { int realno = 1; if (no > 0) { realno = no % mGameNos[GAME_NOS_CNT - 1][0]; } return realno; } int CCSolver::GetGameIxByNo(const int no) const { int ix = -1; int i; for (i = 0; i < GAME_NOS_CNT; ++i) { if (mGameNos[i][0] >= no) { ix = i; break; } } if (ix == -1) { ix = 0; } return ix; } const int* CCSolver::GetGameByNo(const int no) const { int realno = GetRealGameNo(no); int ix = GetGameIxByNo(realno); return mGameNos[ix]; } vector CCSolver::GetSolutionByNo(const uint no) const { int realno = GetRealGameNo(no); int gameix = GetGameIxByNo(realno); if (gameix > 0) { realno -= mGameNos[gameix - 1][0]; } vector solvec; int* sol = mAllTable[mPos2AllIx[realno - 1]]; for (int i = 0; i < mPegCnt; ++i) { solvec.push_back(sol[i]); } return solvec; } void CCSolver::NewGame(const int ccnt, const int pcnt, const int doubles, const int level, const int gcnt) { FreeTables(); mColorCnt = ccnt; mPegCnt = pcnt; mDoubles = doubles; mLevel = level; mMaxGuessCnt = gcnt; mMaxPosCnt = 0; mAllCnt = 0; mPosCnt = 0; mHistCnt = 0; mGuessCnt = 0; mMaxRes = 0; mResCnt = 0; mRestartCnt = 0; mLastPosCnt = 0; InitTables(); } void CCSolver::RestartGame() { if (mGuessCnt > 0) { ++mRestartCnt; } for (int i = 0 ; i < mMaxGuessCnt ; ++i) { mHist[i] = NULL; } mGuessCnt = 0; } void CCSolver::Interrupt() { mInterrupt = true; } void CCSolver::run() { mInterrupt = false; mLastGuess = Guess(); if (mLastGuess < 0 || mLastGuess >= mAllCnt) { ; } else { mLastPosCnt = mPosCnt; } } int CCSolver::GetAllCnt() const { return mAllCnt; } void CCSolver::GuessIn(string str) { int ix = Row2Ix(str); mHist[mGuessCnt] = new int[2]; mHist[mGuessCnt][0] = ix; } void CCSolver::GuessIn(const vector* rowsol) { int ix = Row2Ix(rowsol); mHist[mGuessCnt] = new int[2]; mHist[mGuessCnt][0] = ix; } void CCSolver::StartGuess() { if (mPosCnt == mLastPosCnt && (mGuessCnt > 0 || mRestartCnt > 0)) { emit GuessDoneSignal(); return; } mLastGuess = -1; start(QThread::NormalPriority); } int* CCSolver::GuessOut() { if (mLastGuess < 0 || mLastGuess >= mAllCnt) { return NULL; } return mAllTable[mLastGuess]; } int CCSolver::ResIn(const vector* res) { int r = 0; int len = res->size(); int i; for (i = 0; i < len; ++i) { if (res->at(i) == 2) { r += 10; } else if (res->at(i) == 1) { r += 1; } } mHist[mGuessCnt][1] = r; UpdPos(mHist[mGuessCnt][0], r); ++mGuessCnt; return r; } void CCSolver::FreeTables() { int i; delete [] mPos2AllIx; mPos2AllIx = NULL; delete [] mCascade; mCascade = NULL; delete [] mPossible; mPossible = NULL; for (i = 0 ; i < mAllCnt ; ++i) { delete [] mAllTable[i] ; } delete [] mAllTable; mAllTable = NULL; for (i = 0 ; i < mMaxGuessCnt ; ++i) { delete [] mHist[i] ; } delete [] mHist; mHist = NULL; delete [] mResTable; mResTable = NULL; delete [] mS; mS = NULL; delete [] mP; mP = NULL; } void CCSolver::InitTables() { int i, j, k; if (mDoubles != 1 && mColorCnt < mPegCnt) { return; } mMaxPosCnt = CalcPosCnt(mColorCnt, mPegCnt, mDoubles); mPos2AllIx = new int [mMaxPosCnt]; mCascade = new int [mPegCnt]; for (i = 0; i < mPegCnt; ++i) { mCascade[i] = IntPow(mColorCnt, mPegCnt - i - 1); } mAllCnt = CalcAllCnt(mColorCnt, mPegCnt); mAllTable = new int* [mAllCnt]; for (i = 0; i < mAllCnt; ++i) { mAllTable[i] = new int [mPegCnt]; } mPossible = new int [mAllCnt]; for (i = 0; i < mAllCnt; ++i) { FillTable(i); } mHist = new int* [mMaxGuessCnt]; for (i = 0 ; i < mMaxGuessCnt ; ++i) { mHist[i] = NULL; } mS = new int [mColorCnt]; mP = new int [mColorCnt]; mMaxRes = mPegCnt * 10; mResCnt = (IntFac(mPegCnt + 2)) / (IntFac(mPegCnt) * 2) - 1; mResTable = new int[mResCnt]; k = 0; for (i = 0; i <= mPegCnt; ++i) { for (j = 0; j <= mPegCnt - i; ++j, ++k) { if (i == mPegCnt - 1 && j == 1) { --k; continue; } mResTable[k] = i * 10 + j; } } } void CCSolver::FillTable(const int ix) { int i; int v = ix; int pos = 1; int j; for (i = 0; i < mPegCnt; ++i) { mAllTable[ix][i] = 0; } for (i = 0; i < mPegCnt; ++i) { while (v >= mCascade[i]) { ++mAllTable[ix][i]; v -= mCascade[i]; } if (mDoubles != 1 && pos == 1) { for (j = 0; j < i; j++) { if (mAllTable[ix][j] == mAllTable[ix][i]) { pos = 0; break; } } } } if (pos == 1) { mPos2AllIx[mPosCnt] = ix; } mPosCnt += pos; mPossible[ix] = pos; } int CCSolver::RowCmp(const int* sol, const int* pat) { int bl = 0; int wh = 0; int i; for (i = 0; i < mColorCnt; ++i) { mS[i] = mP[i] = 0; } for (i = 0; i < mPegCnt; ++i) { if (sol[i] == pat[i]) { ++bl; } else { if (mP[sol[i]] > 0) { ++wh; --mP[sol[i]]; } else { ++mS[sol[i]]; } if (mS[pat[i]] > 0) { ++wh; --mS[pat[i]]; } else { ++mP[pat[i]]; } } } return (10 * bl + wh); } void CCSolver::UpdPos(const int ix, const int res) { int i; for (i = 0; i < mAllCnt; ++i) { if (!mPossible[i]) { continue; } if (RowCmp(mAllTable[i], mAllTable[ix]) != res) { mPossible[i] = 0; --mPosCnt; } } } string CCSolver::FirstGuess() { int i, j, r; int pegcnt = 0; int diffcnt = 0; const int* fg = mFGCnts[mPegCnt-2][mColorCnt-2]; char s[mPegCnt]; int t[mColorCnt]; for (i = 0; i < mColorCnt; ++i) { t[i] = 0; } if (mDoubles == 1) { for (i = 0; i < 4; ++i) { if (fg[i] == 0) { break; } do { r = rand() % mColorCnt; } while (t[r] > 0); ++t[r]; ++diffcnt; for (j = 0; j < fg[i]; ++j) { s[pegcnt++] = 'A' + r; } if (pegcnt == mPegCnt) { break; } } if (mPegCnt > 2 && diffcnt > 1) { for (int i = 0; i < (mPegCnt - 1); ++i) { r = i + (rand() % (mPegCnt - i)); if (i != r) { char tmp = s[i]; s[i] = s[r]; s[r] = tmp; } } } } else { for (i = 0; i < mPegCnt; ++i) { do { r = rand() % mColorCnt; } while (t[r] > 0); ++t[r]; s[i] = 'A' + r; } } return string(s, mPegCnt); } int CCSolver::Guess() { //clock_t start, finish; //start = clock(); if (mLevel > STRENGTH_LOW && mGuessCnt == 0 && mRestartCnt == 0) { return Row2Ix(FirstGuess()); } int level = mLevel; if (level == STRENGTH_HIGH && mPosCnt > 10000) { level = STRENGTH_MEDIUM; } int i, j; if (level == STRENGTH_LOW) { for (i = 0; i < mAllCnt; ++i) { if (mPossible[i]) { break; } } } else if (level == STRENGTH_MEDIUM) { int m = mPosCnt >> 1; for (i = 0; i < mAllCnt; ++i) { if (mPossible[i]) { if (--m <= 0) { break; } } } } else { // Donald E. Knuth. The Computer as Master Mind. J. Recreational Mathematics, 9 (1976-77), 1-6. // Kenji Koyama, Tony W. Lai. An optimal Mastermind Strategy. J. Recreational Mathematics, 1994. // we'll only take the still possible ones into account, but ... int solix = -1; int shortest = 1000000; int longest; int res2pos[mMaxRes]; for (j = 0; j <= mMaxRes; ++j) { res2pos[j] = 0; } for (i = 0; i < mAllCnt; ++i) { if (mInterrupt) { i = -1; break; } if (!mPossible[i]) { continue; } for (j = 0; j < mAllCnt; ++j) { if (!mPossible[j]) { continue; } ++res2pos[RowCmp(mAllTable[j], mAllTable[i])]; } longest = 0; for (j = 0; j < mResCnt; ++j) { if (res2pos[mResTable[j]] > longest) { longest = res2pos[mResTable[j]]; } res2pos[mResTable[j]] = 0; } if (longest < shortest) { shortest = longest; solix = i; } } i = solix; } //finish = clock(); return i; } string CCSolver::RowOut(const int* r) { char s[mPegCnt]; int i; for (i = 0; i < mPegCnt; ++i) { s[i] = 'A' + r[i]; } return string(s, mPegCnt); } int CCSolver::Row2Ix(const vector* v) { int i; int ix = 0; int len = v->size(); if (len != mPegCnt) { return -1; } int j; for (i = 0; i < mPegCnt; ++i) { j = v->at(i); if (j >= mColorCnt) { ix = -1; break; } ix += j * mCascade[i]; } if (ix >= 0 && ix < mAllCnt) { return ix; } return -1; } int CCSolver::Row2Ix(const string str) { int i; int ix = 0; int len = int(str.size()); if (len != mPegCnt) { return -1; } int j; for (i = 0; i < mPegCnt; ++i) { j = toupper(int(str[i])) - 'A'; if (j >= mColorCnt) { ix = -1; break; } ix += j * mCascade[i]; } if (ix >= 0 && ix < mAllCnt) { return ix; } return -1; } int CCSolver::IntPow(const int b, const int e) const { int i; int ret = 1; for (i = 0; i < e; ++i) { ret *= b; } return ret; } int CCSolver::IntFac(const int n) const { int fac = 1; int i; for (i = n; i > 1; --i) { fac *= i; } return fac; } int CCSolver::CalcAllCnt(const int ccnt, const int pcnt) const { if (ccnt < 2 || pcnt < 2) { return 0; } return IntPow(ccnt, pcnt); } int CCSolver::CalcPosCnt(const int ccnt, const int pcnt, const int doubles) const { if (ccnt < 2 || pcnt < 2 || (doubles != 0 && doubles != 1)) { return 0; } if (ccnt < pcnt && doubles == 0) { return 0; } if (doubles == 1) { return CalcAllCnt(ccnt, pcnt); } return IntFac(ccnt) / IntFac(ccnt - pcnt); } ColorCode-0.8.5/prevgamesmodel.h0000644000175000017500000000252612610773251015235 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef PREVGAMESMODEL_H #define PREVGAMESMODEL_H #include #include #include #include #include "ccgame.h" #include "buttonscell.h" #include "gametableview.h" #include "gameslistmodel.h" class PrevGamesModel : public GamesListModel { Q_OBJECT public: PrevGamesModel(QObject* parent = 0); virtual int GetColIx(const int ix) const; virtual int GetMaxColCnt() const; protected: virtual void DoSort(QList &list); }; PrevGamesModel* GetPrevGamesModel(); #endif // PREVGAMESMODEL_H ColorCode-0.8.5/colorcode.rc0000644000175000017500000000007312610773251014344 0ustar dirkdirkIDI_ICON1 ICON DISCARDABLE "cc32.ico" ColorCode-0.8.5/prefdialog.ui0000644000175000017500000010164212610773251014524 0ustar dirkdirk PrefDialog Qt::ApplicationModal 0 0 476 527 Preferences :/img/configure.png:/img/configure.png true 0 User Interface Indicators 0 0 If this option is checked, an indicator inside each peg is displayed. Show Indicators inside pegs Qt::Horizontal QSizePolicy::Fixed 20 20 Use unique letters as indicators. Letter Indicators true Qt::Horizontal 40 20 Use unique numbers as indicators. Number Indicators Qt::Horizontal 276 20 Use the same neutral background color for each peg, when indicators are shown. Hide Colors Qt::Horizontal 310 20 0 0 Click here if you have changed the color order and now you want to revert it to it's initial state. Reset Color Order true Controls 0 0 Show or hide the Menubar. Show Menubar 0 0 Show or hide the Toolbar. Show Toolbar 0 0 Show or hide the Statusbar. Show Statusbar Qt::Horizontal QSizePolicy::Fixed 70 20 Qt::Horizontal 40 20 Display the current game number in the footer. To avoid remembering, you can hide it here. Display Game Number Timer 0 0 You may hide the timer to keep calm ;-) But note! Even hidden, time's running in the background. Show Game Timer Qt::Horizontal QSizePolicy::Fixed 20 20 Uncheck this if you are confused about the time as fast running ;-) Show Tenth and Hundredth Qt::Horizontal 245 20 Qt::Vertical 20 40 Game Settings Game Properties Select One of the Level Presets: Select from predefined combinations of the three different level related settings, the number of colors, the number of slots (columns) and the possibility of pegs of the same color in one row. Or Set the Particular Properties: Number of pegs in a single row. Higher values are harder to guess. Number of Slots Number of all possible colors. Higher values are harder to guess. Number of Colors If this option is checked, the hidden combination may contain one or more (even all would be possible) pegs of the same color. If checked, the combination is generally harder to guess. Allow Pegs of Same Color Qt::Horizontal 40 20 Qt::Horizontal 40 20 Qt::Horizontal 40 20 Qt::Vertical QSizePolicy::Fixed 20 10 Game Flow 0 0 If checked, a row is closed as soon as you place the last peg and your guess is submitted immediatly. This option only affects the Human vs. Computer game mode. Close Rows when the last Peg is placed 0 0 If checked, the computer will determine the corresponding hints for the solver's guess. This option affects only Computer vs. Human games. If checked, you only have to place your secret combination. Then the rest of the game runs automatically until the end. But you can set a delay between the guesses. Set Hints automatically 0 0 Adjust the delay (in ms) between two guesses. Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter Delay in ms Qt::Horizontal 40 20 Solver Select from 3 different strength levels for your computer opponent. This option only affects the Computer vs. Human game mode. For the computer's guess in the Human vs. Computer mode always the highest level will be used. Qt::Horizontal 40 20 Solver Strength Game Mode Select from the different game modes. In the 1. mode you have to to guess the hidden, computer generated combination, In the 2. mode your computer will try to guess your own secret combination. Qt::Horizontal 40 20 Qt::Vertical 20 40 Game Lists Game Lists Maximum Row Count: Limit the number of rows in game tables like highscores etc. Valid values range from 5 to 50. Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 5 50 5 15 Qt::Horizontal 40 20 Use Customized Table Row Highlight Colors Qt::Horizontal QSizePolicy::Fixed 20 20 0 0 24 24 24 24 false Foreground 0 0 24 24 24 24 false Background Qt::Horizontal 40 20 Highscores Use Highscores Qt::Horizontal QSizePolicy::Fixed 20 20 Raise the dialog after a game has been won and prompt for the name true Automatically insert Highscores using the name below Qt::Horizontal 0 20 0 0 Provide a name with maximum 20 characters here to be used for highscore entries. If you checked the automatic option above, this name is mandatory, otherwise it will be used as proposal which you may change later in the dialog. 20 Name (mandatory for the second option) Qt::Horizontal 81 21 Qt::Horizontal 40 20 Qt::Vertical 20 40 Qt::Horizontal QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults 10 10 true true true ColorCode-0.8.5/about.h0000644000175000017500000000211212610773251013324 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef ABOUT_H #define ABOUT_H #include "ui_about.h" #include "colorcode.h" #include #include class About : public QDialog, public Ui::About { Q_OBJECT public: About(QWidget* parent = 0, Qt::WindowFlags f = 0); ~About(); virtual QSize sizeHint () const; }; #endif // ABOUT_H ColorCode-0.8.5/timedisplaybg.cpp0000644000175000017500000000310612610773251015406 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include "timedisplaybg.h" TimeDisplayBg::TimeDisplayBg() { setCacheMode(QGraphicsItem::DeviceCoordinateCache); mUpdateRect = QRectF(0, 0, 220, 20); mRect = QRectF(65.5, 3.5, 89, 14); QLinearGradient solgrad(0, 1, 0, 15); solgrad.setColorAt(0.0, QColor("#9fa0a2")); solgrad.setColorAt(1.0, QColor("#8c8d8f")); mBgBrush = QBrush(solgrad); QLinearGradient framegrad(0, 1, 0, 15); framegrad.setColorAt(0.0, QColor("#4e4f51")); framegrad.setColorAt(1.0, QColor("#ebecee")); mFramePen = QPen(QBrush(framegrad), 1); } QRectF TimeDisplayBg::boundingRect() const { return mUpdateRect; } void TimeDisplayBg::paint(QPainter* painter, const QStyleOptionGraphicsItem* , QWidget* ) { painter->setBrush(mBgBrush); painter->setPen(mFramePen); painter->drawRoundedRect(mRect, 7.5, 7.5); } ColorCode-0.8.5/highscore.cpp0000644000175000017500000000247712610773251014536 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include "highscore.h" using namespace std; HighScore::HighScore() { mCombinationsCnt = 0; mRowsCnt = 0; mTime = 0; } void HighScore::NewGame(int ccnt) { mRowsCnt = 0; mTime = 0; mCombinationsCnt = ccnt; } int HighScore::GetScore(int rcnt, int t) { mRowsCnt = rcnt; mTime = t; return GetScore(); } int HighScore::GetScore() const { if (mCombinationsCnt == 0 || mRowsCnt == 0 || mTime == 0) { return 0; } double dd = mCombinationsCnt * 10000; double dv = mRowsCnt * mTime / 100; return int(dd / dv); } ColorCode-0.8.5/trans_de.ts0000644000175000017500000011077512610773251014227 0ustar dirkdirk UTF-8 About &Author &Autor icon &License &Lizenz A needful game to train your brain ;-) Ein Spiel, um den Verstand<br>wachzuhalten ;-) About ColorCode Info ColorCode <br><br>Free MasterMind clone including a built in,<br>rather intelligent solver. <br><br>Freie MasterMind-Variante mit ziemlich <br>intelligentem Rechner-Spieler. Version Version Author Autor 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. Dieses Programm ist freie Software. Sie können es unter den Bedingungen der GNU General Public License, wie von der Free Software Foundation veröffentlicht, weitergeben und/oder modifizieren, entweder gemäß Version 3 der Lizenz oder (nach Ihrer Option) jeder späteren Version. ButtonsCell Play this Game again Spiel starten Save this Game as Bookmark Spiel als Favorit speichern Remove from List Aus der Liste löschen Copy Game Number to Clipboard Spiel-Nummer in die Zwischenablage kopieren ColorCode New Game Neues Spiel Do you want to give in and start a new Game? Wollen Sie aufgeben und ein neues Spiel beginnen? About Qt Info Qt &New Game &Neues Spiel Ctrl+N &Restart Game Spiel neu &beginnen Ctrl+R E&xit B&eenden Ctrl+Q Ctrl+T Ctrl+C Ctrl+A About &Qt Info &Qt &Game &Spiel &Settings &Einstellungen &Help &Hilfe Game Spiel Message Hinweis The changed settings will only apply to new games! Do you want to give in the current and start a new Game? Die geänderten Einstellungen werden erst in neuen Spielen berücksichtigt! Möchten Sie das gegenwärtige Spiel aufgeben und ein neues Spiel beginnen? Place Your pegs ... Setzen Sie Ihre Steine ... Congratulation! You have won! Glückwunsch! Sie haben gewonnen! Sorry! You lost! Schade, aber Sie haben es nicht vermocht! Ctrl+I Give In Aufgeben Do you really want to give in? Wollen Sie wirklich aufgeben? &Throw In The Towel &Handtuch werfen Ctrl+G Sure, You're too weak for me! Klar, Sie sind zu schwach für mich! Ctrl+Shift+R Ctrl+Shift+C Fill Row by Random Reihe zufällig füllen Duplicate Previous Row Vorherige Reihe duplizieren Ctrl+D Clear Row Reihe leeren &Row &Reihe About &ColorCode Info &ColorCode Ctrl+M Show Toolbar Werkzeugleiste anzeigen Show Menubar Menüleiste anzeigen Show Statusbar Statusleiste anzeigen Allow Pegs of the Same Color Steine gleicher Farbe erlauben Level Schwierigkeitsstufe Computer's Guess Lassen Sie Ihren Rechner raten Ctrl+H Press the Hint Field or Key Enter if You're done. Fertig? Benutzen Sie das Hinweis-Feld oder die Eingabetaste. Disallow Pegs of the Same Color Keine Steine gleicher Farbe erlauben Close Rows when the last Peg is placed Reihen nach Setzen des letzten Steins auswerten Ctrl+L Beginner (2 Colors, 2 Slots, Doubles) Anfänger (2 Farben, 2 Slots, Doppelte) Easy (4 Colors, 3 Slots, No Doubles) Leicht (4 Farben, 3 Slots, Keine Doppelten) Classic (6 Colors, 4 Slots, Doubles) Klassisch (6 Farben, 4 Slots, Doppelte) Challenging (8 Colors, 4 Slots, Doubles) Fordernd (8 Farben, 4 Slots, Doppelte) Hard (10 Colors, 5 Slots, Doubles) Schwer (10 Farben, 5 Slots, Doppelte) Level Presets Schwierigkeitsstufen Colors Farben Pegs of Same Color Steine gleicher Farbe Slots Felder Yes Ja No Nein Reset Color Order Farbreihenfolge zurücksetzen Ctrl+Shift+L Online &Help Online-&Hilfe F1 Done Fertig Ctrl+Shift+N Rate it for me Bewerte für mich Human vs Computer Mensch gegen Rechner Computer vs Human Rechner gegen Mensch Game Mode Spiel Modus Press the button below or Key Enter if You're done. Fertig? Benutzen Sie den Button oder die Eingabetaste. Place Your secret ColorCode ... Platzieren Sie den geheimen ColorCode ... Please rate the guess. Press OK or Key Enter if You're done. Bitte bewerten Sie meinen Vorschlag. Nutzen Sie Ok-Button oder Eingabetaste wenn fertig. The impossible happened, sorry. Das Unmögliche ist eingetreten, leider. Yeah! I guessed it, man! Ich hab's geahnt! Embarrassing! I lost a game! Peinlich! Ich hab ein Spiel verloren! Nope! Thats impossible! Did you gave me false hints? Nein! Das ist unmöglich! Haben Sie falsch bewertet? Don't you like to see me winning? ;-) Ertragen Sie es nicht, mich gewinnen zu sehen? ;-) Set Hints automatically Hinweise automatisch setzen Ctrl+Shift+H Preferences Einstellungen Ctrl+P Show Indicators Bezeichner anzeigen The chosen settings do not allow pegs of the same color! Die gewählten Einstellungen erlauben keine Steine gleicher Farbe! &Start particular Game &Bestimmtes Spiel starten Ctrl+B Strg+B Ctrl+Alt+H Strg+Alt+H &Recent Games &Zuletzt gespielte Spiele Ctrl+Alt+R Strg+Alt+R &Bookmarks &Favoriten Ctrl+Alt+B Strg+Alt+B Ctrl+Shift+S Strg+Umschalt+S Game &Lists Spiele-&Listen guessed and rated ... geraten und bewertet ... Let me think ... Ich muß nachdenken ... Computer vs. Human Rechner gegen Mensch &Highscores &Bestenliste Ctrl+Shift+B Strg+Umschalt+B Ctrl+Alt+N &Have a Break &Denk-Pause &Bookmark Current Game &Spiel in den Favoriten speichern Ctrl+Shift+T Show Timer Spielzeit anzeigen Display Game Number Spiel-Nummer anzeigen Allow Pegs of Same Color Steine gleicher Farbe erlauben Disallow Pegs of Same Color Keine Steine gleicher Farbe erlauben Ctrl+Alt+C Ctrl+Shift+P &Resume Game Spiel &weiterspielen Human vs. Computer Mensch gegen Rechner Game Number Spiel-Nummer Paused Pause &Copy Game Number Spiel &Nummer kopieren ColorCode ColorCode GameTablesDialog ColorCode Games ColorCode-Spiele Game Properties Spiel-Eigenschaften User Spieler Color Count Farben Slot Count Felder Pegs of Same Color Steine gleicher Farbe Yes Ja Game Number Spiel-Nummer Date and Time Datum Duration Spieldauer Insert Game Number Spiel-Nummer eingeben Play Spielen Recent Games Letzte Spiele Bookmarks Favoriten Highscores Bestenliste Clear List Liste leeren Close Schließen No Nein Message Hinweis This will permanently remove all entries from the List. Do You want to proceed? Es werden unwideruflich alle Einträge aus der Liste entfernt Möchten Sie fortfahren? Game Number Input Spiel-Nummern Bookmarked Games Favoriten High Score List Bestenliste Please provide a name! Otherwise your score won't be saved. Bitte vergeben Sie einen Namen. Ansonsten wird das Spiel nicht gespeichert. Insert an arbitrary game number greater than 0 in the input field above. <br><br>The game properties like color count, slot count etc. will be displayed in the corresponding area above.<br><br>Click the Play button or press key Enter, to play the game. If a game is currently running, it will be aborted. Geben Sie eine beliebige Spiel-Nummer größer als 0 in das Eingabefeld ein.&lt;br&gt;&lt;br&gt;Die Spieleigenschaften wie Anzahl der Farben und Felder etc. werden im Eigenschaftsbereich darüber angezeigt.&lt;br&gt;&lt;br&gt;Drücken Sie auf Spielen oder die Eingabetaste, um ein Spiel zu spielen. Falls gerade ein Spiel läuft, wird dieses abgebrochen. Game Lists Spiele-Listen GamesListModel Yes Ja No Nein Pegs of Same Color Steine gleicher Farbe Actions Aktionen Rank Platz User Spieler Score Punkte Date Datum Time Zeit Colors Farben Slots Felder Game No. Spiel-Nr. PrefDialog ... Select from predefined level settings ... Schwierigkeitsstufe auswählen Beginner (2 Colors, 2 Slots, Doubles) Anfänger (2 Farben, 2 Slots, Doppelte) Easy (4 Colors, 3 Slots, No Doubles) Leicht (4 Farben, 3 Slots, Keine Doppelten) Classic (6 Colors, 4 Slots, Doubles) Klassisch (6 Farben, 4 Slots, Doppelte) Challenging (8 Colors, 4 Slots, Doubles) Fordernd (8 Farben, 4 Slots, Doppelte) Hard (10 Colors, 5 Slots, Doubles) Schwer (10 Farben, 5 Slots, Doppelte) Slots Felder Colors Farben Human vs. Computer Mensch gegen Rechner Computer vs. Human Rechner gegen Mensch Low Schwach Medium Mittel High Stark Preferences Einstellungen Controls Bedienelemente Show or hide the Menubar. Menüleiste anzeigen oder ausblenden. Show Menubar Menüleiste anzeigen Show or hide the Toolbar. Werkzeugleiste anzeigen oder ausblenden. Show Toolbar Werkzeugleiste anzeigen Show or hide the Statusbar. Statusleiste anzeigen oder ausblenden. Show Statusbar Statusleiste anzeigen Indicators Bezeichner If this option is checked, an indicator inside each peg is displayed. Wenn diese Option aktiv ist, wird ein zusätzlicher Bezeichner für jeden Stein angezeigt. Show Indicators inside pegs Bezeichner für Steine anzeigen Use unique letters as indicators. Buchstaben als Bezeichner verwenden. Letter Indicators Buchstaben-Bezeichner Use unique numbers as indicators. Zahlen als Bezeichner verwenden. Number Indicators Zahlen-Bezeichner Use the same neutral background color for each peg, when indicators are shown. Die gleiche, neutrale Farbe für alle Steine verwenden, falls Bezeichner angezeigt werden. Hide Colors Farben ausblenden Click here if you have changed the color order and now you want to revert it to it's initial state. Klicken Sie hier, falls Sie die Farben-Anordnung geändert haben, um diese wieder in den ursprünglichen Zustand zurückzuversetzen. Reset Color Order Farbreihenfolge zurücksetzen Game Settings Spiel-Einstellungen Select from predefined combinations of the three different level related settings, the number of colors, the number of slots (columns) and the possibility of pegs of the same color in one row. Wählen Sie eine vordefinierte Kombination der drei verschiedenen, die Schwierigkeitsstufe beeinflussenden Einstellungen. Number of Slots Anzahl der Felder Number of Colors Anzahl der Farben Number of pegs in a single row. Higher values are harder to guess. Die Anzahl der Steine in einer einzelnen Reihe. Höhere Werte sind schwerer zu erraten. Number of all possible colors. Higher values are harder to guess. Gesamtanzahl der möglichen Farben. Höhere Werte sind schwerer zu erraten. If this option is checked, the hidden combination may contain one or more (even all would be possible) pegs of the same color. If checked, the combination is generally harder to guess. Wenn diese Option aktiv ist, können Kombinationen Steine gleicher Farbe enthalten. Solche Kombinationen sind etwas schwerer zu erraten. Allow Pegs of Same Color Steine gleicher Farbe erlauben Game Mode Spiel Modus Select from the different game modes. In the 1. mode you have to to guess the hidden, computer generated combination, In the 2. mode your computer will try to guess your own secret combination. Wählen Sie einen Spiel-Modus aus. Im 1. Fall müssen Sie versuchen, die verborgene, rechnergenerierte Kombination zu erraten. Im 2. Fall wird Ihr Rechner versuchen, eine geheime Kombination Ihrer Wahl zu erraten. If checked, a row is closed as soon as you place the last peg and your guess is submitted immediatly. This option only affects the Human vs. Computer game mode. Wenn aktiv, wird eine Reihe als geschlossen betrachtet, sobald Sie den letzten Stein platziert haben, und Ihr Vorschlag wird sofort ausgewertet. Diese Option hat nur Auswirkungen in Mensch-gegen-Rechner-Spielen. Close Rows when the last Peg is placed Reihen nach Setzen des letzten Steins auswerten If checked, the computer will determine the corresponding hints for the solver's guess. This option affects only Computer vs. Human games. If checked, you only have to place your secret combination. Then the rest of the game runs automatically until the end. But you can set a delay between the guesses. Wenn aktiv, werden die Hinweisfelder zu den Rechner-Schätzungen automatisch ausgefüllt. Diese Option betrifft nur Rechner-gegen-Mensch-Spiele. Falls aktiv, müssen Sie nur Ihre geheime Kombination anordnen. Der Rest des Spiels läuft dann automatisch bis zum Ende ab. Sie können allerdings eine Verzögerung bestimmen. Set Hints automatically Hinweise automatisch setzen Adjust the delay (in ms) between two guesses. Verzögerung (in ms) zwischen den Spielzügen. Delay in ms Verzögerung in ms Solver Strength Rechner-Stärke Select from 3 different strength levels for your computer opponent. This option only affects the Computer vs. Human game mode. For the computer's guess in the Human vs. Computer mode always the highest level will be used. Wählen Sie eine der 3 verschiedenen Spielstärken für Ihren Rechner-Gegner aus. Diese Option hat nur Einfluß auf Rechner-gegen-Mensch-Spiele. Für die Rechner-Rat-Funktion im Mensch-gegen-Rechner-Modus wird immer die höchste Spielstärke verwendet. Show Game Timer Spiel-Zeit anzeigen Display Game Number Spiel-Nummer anzeigen Game Lists Spiele-Listen Maximum Row Count: Maximale Zeilenanzahl: Use Highscores Bestenliste verwenden Raise the dialog after a game has been won and prompt for the name Bestenliste mit Namens-Eingabe anzeigen, wenn ein Spiel gewonnen wurde Automatically insert Highscores using the name below Automatischer Eintrag in die Bestenliste mit untenstehendem Namen Name (mandatory for the second option) Name (erforderlich für die zweite Option) User Interface Benutzeroberfläche Display the current game number in the footer. To avoid remembering, you can hide it here. Zeigt die gegenwärtige Spiel-Nummer unterhalb des Spieles an. Um Erinnerungen zu vermeiden, kann die Anzeige hiermit unterdrückt werden. Timer Zeitmesser You may hide the timer to keep calm ;-) But note! Even hidden, time's running in the background. Um die Ruhe zu bewahren ;-), können Sie den Zeitmesser verbergen. Doch wie stets, auch verborgen läuft die Zeit hinterrücks weiter. Uncheck this if you are confused about the time as fast running ;-) Sollte Sie die Zeitanzeige unruhig machen, wählen Sie diese Option ab Show Tenth and Hundredth Zehntel- und Hunderstel-Sekunden anzeigen Game Properties Spiel-Eigenschaften Select One of the Level Presets: Wählen Sie eine Schwierigkeitsstufe: Or Set the Particular Properties: Oder setzen Sie die einzelnen Eigenschaften: Game Flow Spielablauf Solver Rechner-Spieler Limit the number of rows in game tables like highscores etc. Valid values range from 5 to 50. Begrenzen Sie die Anzahl der Einträge in den Tabellen wie etwa der Bestenliste etc. Werte zwischen 5 und 50 sind möglich. Use Customized Table Row Highlight Colors Farben zur Markierung der gegenwärtigen Zeile ändern Foreground Vordergrund Background Hintergrund Highscores Bestenliste Provide a name with maximum 20 characters here to be used for highscore entries. If you checked the automatic option above, this name is mandatory, otherwise it will be used as proposal which you may change later in the dialog. Geben Sie einen Namen mit maximal 20 Zeichen für Einträge in die Bestenliste an. Sollten Sie die obenstehende Option für automatische Einträge gewählt haben, ist dieser Name zwingend erforderlich. Sollten Sie die andere Option gewählt haben, wird dieser Name als Vorschlag genutzt, den Sie jedoch im Dialogfenster ändern können. RowHint Commit Your solution Kombination testen Click the circles to rate my guess. Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-) Klicken Sie die Kreise, um meinen Vorschlag zu bewerten. Drücken Sie Strg+H oder die entsprechende Werkzeugleisten-Schaltfläche, um die Bewertung einem unparteiischen Teil von mir zu übertragen ;-) ColorCode-0.8.5/about.ui0000644000175000017500000001123412610773251013517 0ustar dirkdirk About Qt::ApplicationModal 0 0 360 270 About ColorCode 6 9 QTabWidget::Rounded 0 &Author 6 9 6 0 icon Qt::Vertical 20 111 QFrame::NoFrame QFrame::Plain true &License 6 9 6 0 icon Qt::Vertical 20 111 QFrame::NoFrame QFrame::Plain true Qt::Horizontal QDialogButtonBox::Ok tabWidget mAuthorText buttonBox mLicenseText buttonBox accepted() About accept() 248 254 157 274 ColorCode-0.8.5/buttonscell.cpp0000644000175000017500000000655212610773251015117 0ustar dirkdirk#include "buttonscell.h" const int ButtonsCell::ACTIONID_NONE = 0; const int ButtonsCell::ACTIONID_PLAY = 1; const int ButtonsCell::ACTIONID_SAVE = 2; const int ButtonsCell::ACTIONID_COPY = 4; const int ButtonsCell::ACTIONID_DELETE = 8; ButtonsCell::ButtonsCell(QWidget* parent, int hideBtn) : QWidget(parent) { setAutoFillBackground(false); setMouseTracking(true); setAttribute(Qt::WA_Hover, true); setAttribute(Qt::WA_AlwaysShowToolTips, true); mActionId = ACTIONID_NONE; QHBoxLayout* lay = new QHBoxLayout; lay->setSpacing(0); lay->setContentsMargins(0, 0, 0, 0); lay->setAlignment(Qt::AlignLeft); int hide_cnt = 0; if ((hideBtn & ACTIONID_PLAY) == 0) { mPlayBtn = new CellBtn(parent); mPlayBtn->setIcon(QIcon(":/img/document-new.png")); mPlayBtn->setToolTip(tr("Play this Game again")); mPlayBtn->setFixedSize(QSize(18, 18)); mPlayBtn->setAutoRaise(true); connect(mPlayBtn, SIGNAL(clicked()), this, SLOT(ButtonClickedSlot())); lay->addWidget(mPlayBtn); lay->addSpacing(2); mButtonsList.append(mPlayBtn); } else { ++hide_cnt; } if ((hideBtn & ACTIONID_SAVE) == 0) { mSaveBtn = new CellBtn(parent); mSaveBtn->setIcon(QIcon(":/img/bookmark_add.png")); mSaveBtn->setToolTip(tr("Save this Game as Bookmark")); mSaveBtn->setFixedSize(QSize(18, 18)); mSaveBtn->setAutoRaise(true); connect(mSaveBtn, SIGNAL(clicked()), this, SLOT(ButtonClickedSlot())); lay->addWidget(mSaveBtn); lay->addSpacing(2); mButtonsList.append(mSaveBtn); } else { ++hide_cnt; } if ((hideBtn & ACTIONID_COPY) == 0) { mCopyBtn = new CellBtn(parent); mCopyBtn->setIcon(QIcon(":/img/edit-copy.png")); mCopyBtn->setToolTip(tr("Copy Game Number to Clipboard")); mCopyBtn->setFixedSize(QSize(18, 18)); mCopyBtn->setAutoRaise(true); connect(mCopyBtn, SIGNAL(clicked()), this, SLOT(ButtonClickedSlot())); lay->addWidget(mCopyBtn); lay->addSpacing(2); mButtonsList.append(mCopyBtn); } else { ++hide_cnt; } if ((hideBtn & ACTIONID_DELETE) == 0) { if (hide_cnt > 0) { lay->addSpacing(hide_cnt * 20); } mDeleteBtn = new CellBtn(parent); mDeleteBtn->setIcon(QIcon(":/img/edit-delete.png")); mDeleteBtn->setToolTip(tr("Remove from List")); mDeleteBtn->setFixedSize(QSize(18, 18)); mDeleteBtn->setAutoRaise(true); connect(mDeleteBtn, SIGNAL(clicked()), this, SLOT(ButtonClickedSlot())); lay->addWidget(mDeleteBtn); mButtonsList.append(mDeleteBtn); } setLayout(lay); } int ButtonsCell::GetActionId() { int aid = mActionId; mActionId = ACTIONID_NONE; return aid; } void ButtonsCell::ButtonClickedSlot() { if (sender() == 0) { return; } CellBtn* btn = qobject_cast(sender()); if (btn == mDeleteBtn) { mActionId = ACTIONID_DELETE; } else if (btn == mPlayBtn) { mActionId = ACTIONID_PLAY; } else if (btn == mSaveBtn) { mActionId = ACTIONID_SAVE; } else if (btn == mCopyBtn) { mActionId = ACTIONID_COPY; } emit CellButtonClickedSignal(); } ColorCode-0.8.5/solutionrow.h0000644000175000017500000000244612610773251014630 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef SOLUTIONROW_H #define SOLUTIONROW_H #include #include #include #include "pegrow.h" class SolutionRow : public PegRow { public: SolutionRow(QObject* parent = 0); ~SolutionRow(); void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); QRectF boundingRect() const; protected: void SetXOffs(); private: void InitGraphics(); QRectF mRect; QRectF mRectC; QBrush mBgBrush; QPen mFramePen; QFont mFont; }; #endif // SOLUTIONROW_H ColorCode-0.8.5/about.cpp0000644000175000017500000000445512610773251013673 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include "about.h" About::About(QWidget* parent, Qt::WindowFlags f) : QDialog(parent, f) { setupUi(this); setWindowIcon(QIcon(QPixmap(":/img/help-about.png"))); mAuthorIcon->setPixmap(QPixmap(":/img/cc32.png")); mLicenseIcon->setPixmap(QPixmap(":/img/GNU-icon32.png")); mAuthorText->setText("" + ColorCode::GAME_TITLE + "
" + tr("A needful game to train your brain ;-)") + tr("

Free MasterMind clone including a built in,
rather intelligent solver.") + "

" + tr("Version") + ": " + ColorCode::VERSION + "
" + tr("Author") + ": Dirk Laebisch"); QString license_file = ":/docs/GPL.html"; if (QFile::exists(license_file)) { QFont fixed_font; fixed_font.setStyleHint(QFont::TypeWriter); fixed_font.setFamily("Courier"); mLicenseText->setFont(fixed_font); QFile f(license_file); if (f.open(QIODevice::ReadOnly)) { mLicenseText->setText(QString::fromUtf8(f.readAll().constData())); } f.close(); } else { mLicenseText->setText( "" + tr("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.") + "" ); } } About::~About() { } QSize About::sizeHint () const { return QSize(360, 270); } ColorCode-0.8.5/prevgamesmodel.cpp0000644000175000017500000000306112610773251015563 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include "prevgamesmodel.h" #include "gametableview.h" PrevGamesModel* GetPrevGamesModel() { static PrevGamesModel* m = new PrevGamesModel(); return m; } PrevGamesModel::PrevGamesModel(QObject* parent) : GamesListModel(parent) { mId = MODEL_ID_PREV; mEditIndex = QModelIndex(); mMaxSize = 20; } int PrevGamesModel::GetColIx(const int ix) const { int ret = -1; if (ix == COL_RANKING) { ret = 0; } else if (ix == COL_DATE) { ret = 1; } else if (ix == COL_TIME) { ret = 2; } else if (ix == COL_DELETE) { ret = 3; } return ret; } int PrevGamesModel::GetMaxColCnt() const { return 4; } void PrevGamesModel::DoSort(QList &list) { qSort(list.begin(), list.end(), GamesListModel::SortListTime); } ColorCode-0.8.5/pegrow.h0000644000175000017500000000433512610773251013526 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef PEGROW_H #define PEGROW_H #include #include #include #include #include #include #include #include "colorcode.h" class ColorPeg; class PegRow : public QObject, public QGraphicsItem { Q_OBJECT Q_INTERFACES(QGraphicsItem) public: PegRow(QObject* parent = 0); ~PegRow(); int GetIx() const; bool IsActive() const; int GetPegCnt() const; ColorPeg** GetPegs(); std::vector GetSolution() const; void SetIx(const int ix); void SetPegCnt(const int pegcnt); void SetGameMode(const int gamemode); void SetActive(const bool b); bool SnapCP(ColorPeg* cp); void ForceSnap(ColorPeg* cp, int posix); void RemovePeg(ColorPeg* cp); void CloseRow(); void OpenRow(); void ClearRow(); void Reset(const int pegcnt, const int gamemode); void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); QRectF boundingRect() const; QPainterPath shape() const; signals: void RowSolutionSignal(int ix); void RemovePegSignal(ColorPeg* cp); protected: std::vector mSolution; QColor mPend; QColor mPenl; QColor mGrad0; QColor mGrad1; bool mIsActive; bool mSolved; int mIx; int mPegCnt; int mGameMode; int mXOffs; virtual void SetXOffs(); void CheckSolution(); ColorPeg** mColorPegs; QRectF outlineRect() const; }; #endif // PEGROW_H ColorCode-0.8.5/changelog0000644000175000017500000001652112610773251013724 0ustar dirkdirk* 0.8.5 released, October 18, 2015 * Summary - first feature complete QT 5 version of ColorCode - adjustments to compile and run with QT 5 * 0.7.2 released, March 18, 2011 * Summary - pause/resume a game - copy game numbers to clipboard - redesigned preferences dialog - some new settings options like cutomized table row highlight colors and the possibility to hide hundredth and tenth of seconds - some minor bug fixes - this is the latest QT 4 version of ColorCode * 0.7.1 released, February 17, 2011 * Summary - bookmark a game after the game has been finished (bug fix) * 0.7.0 released, February 16, 2011 * Summary - threads, game timer, game numbers, highscores, game lists - some refactoring and minor bug fixes * Threads - solver and timer got separate threads to keep the user interface responsive even under heavy load * Game Timer - takes and displays elapsed game time * Highscores - time and game setting will be taken into account * Game Numbers - this enables you to play the very same game at different computers at any time * Game Lists - dialog for highscores, favorites and previous games, you may select any of the games listed and play those again or you may start a game by arbitrary number input * Settings options - games lists and highscore related settings - if you're afraid to remember a game by number, you may hide the game number displayed at the bottom - you may hide the timer to keep calm ;-) * Translation - czech tarnslation updated - thanks to Pavel Fric - french tarnslation updated - thanks to Filippo Rusconi - added hungarian translation (unfinished yet) - thanks to Németh Gábor - added spanish translation (unfinished yet) - thanks to Marcos del Puerto García * 0.6.1 released, February 16, 2010 * Translation - Added french translation - thanks to Filippo Rusconi. * 0.6.0 released, February 14, 2010 * Summary - Second game mode (Computer vs. Human) - Preferences dialog for persistent settings - Additional settings options * Preferences dialog - To examine all available settings options, a preferences dialog has been introduced. - The chosen preferences/settings are now persistent, so when starting the application, the last used settings are applied. * Settings options - Game modes (Human vs Computer or Computer versus Human) - To get a fair chance you may select a weaker solver strength level for your computer opponent ;-) - Let an impartial part :-) of your computer determine the corresponding hints for the computer's guess. This option affects only Computer vs. Human games. If checked, you only have to place your secret combination. Then the rest of the game runs automatically until the end. - To better watch your computer trying hard to break your code, you may define a timeout between the guesses - Select letters or numbers as text indicators and - if convenient - do not use colors as indicators at all - but it's still ColorCode ;-) * Layout/Design - Some minor changes and new buttons for the second game mode. * 0.5.5 released, October 31, 2009 * Summary - Accessibility and usability improvements * Settings options - For the color sensitive of us ;-) the posibility to change the color order by drag and drop has been added. - Press CTRL while dragging to flip two colors or CTRL+SHIFT to cyclic shift the color order. You can do this even while a game is running - the whole existing display will change. - New 'Reset Color Order' option in the settings menu to revert your changes. - Also - and more important - for the more text aimed a settings option has been added, to toggle the display of letter indicators for the different peg colors. - Make the documentations page accessible from the game's help menu. * Layout/Design - Some minor changes. * 0.5 released, October 21, 2009 * Summary - The number of columns in the game is now customizable. The column count can be any number from 2 untill 5. - Updated translation files * Solver - Changed how the solver determines the first guess. Also - for the following really calculated guesses - if the number of possibilities is very high (mostly at the early phase of a 10 colors/ 5 columns game) the solver will automatically fallback to a weaker algorithm until the number of possibilities has been narrowed, to reduce calculating time * Layout/Design - Some minor changes to handle the variable number of columns. Added toolbar controls to enable the change of all level related settings here. The statusbar now permanently shows the current game's settings. * 0.4 released, October 7, 2009 * Summary - The GUI has been changed completely and the Usability was improved by adding some keyboard shortcuts for often needed interactions. - Added czech translation. Thanks to Pavel Fric. * Fixes - To avoid those 'QGraphicsItem::ungrabMouse: not a mouse grabber' warnings emit the mouse event only if the hint button hasn't been disabled just before ... * License - The License had been changed from the GPL v2 to GPL v3. * Layout/Design - Complete Change, so all paint methods had to be changed and optimized. The background is now drawn by its own class, no more brushed metall background image anymore. * 0.3 released, September 26, 2009 * Summary - Introduced a rather perfect MasterMind solver. It will watch any move you take and any hints you have gotten, so you can at any time in a running game let your computer guess for you. Of course you can change or discard it's suggestion :-) . * Solver - The solver has 3 built in levels of stregth. For the suggestions, currently only the most powerfull is used. For the first guess it will use a reasonable random guess based on pre- calculated combinations to reduce computation time. * Layout/Design - Make the solver's guess action accessible at the toolbar. * 0.2 released, September 10, 2009 * Summary - Added 3 levels of difficulty (Easy, Medium, Hard) based on the possibility to change the available number of colors for a game. You can play games with 6, 8 or 10 colors. * Layout/Design - Added a combo-box (select) control to the toolbar, to easily access the level (color count) settings. - Enable hiding the menubar, toolbar and statusbar. - Changed to a centered layout (message display and game board). * 0.1 released, September 6, 2009 * Summary - This is the initial release of ColorCode, a free MasterMind clone. Try to guess a combination of 8 colors within at most 10 guesses. - You may allow or not pegs of the same color. You can fill the rows by random or duplicate a previous one. * GUI - English and German translations are available. ColorCode-0.8.5/docs/0000755000175000017500000000000012610773251012775 5ustar dirkdirkColorCode-0.8.5/docs/GPL.html0000644000175000017500000011053312610773251014310 0ustar dirkdirk GNU General Public License - GNU Project - Free Software Foundation (FSF)

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

Preamble

The GNU General Public License is a free, copyleft license for software and other kinds of works.

The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.

To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.

For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.

Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.

Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.

The precise terms and conditions for copying, distribution and modification follow.

TERMS AND CONDITIONS

0. Definitions.

“This License” refers to version 3 of the GNU General Public License.

“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.

“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.

To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.

A “covered work” means either the unmodified Program or a work based on the Program.

To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.

To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.

An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.

1. Source Code.

The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.

A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.

The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.

The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.

The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.

The Corresponding Source for a work in source code form is that same work.

2. Basic Permissions.

All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.

You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.

Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.

3. Protecting Users' Legal Rights From Anti-Circumvention Law.

No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.

When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.

4. Conveying Verbatim Copies.

You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.

You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.

5. Conveying Modified Source Versions.

You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:

  • a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
  • b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
  • c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
  • d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.

A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

6. Conveying Non-Source Forms.

You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:

  • a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
  • b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
  • c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
  • d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
  • e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.

A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.

A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.

“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.

If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).

The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.

Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.

7. Additional Terms.

“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.

When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.

Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:

  • a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
  • b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
  • c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
  • d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
  • e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
  • f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.

All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.

If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.

Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.

8. Termination.

You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).

However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.

9. Acceptance Not Required for Having Copies.

You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.

10. Automatic Licensing of Downstream Recipients.

Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.

An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.

You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.

11. Patents.

A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.

A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.

In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.

If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.

If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.

A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.

Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.

12. No Surrender of Others' Freedom.

If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.

13. Use with the GNU Affero General Public License.

Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.

14. Revised Versions of this License.

The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.

If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.

15. Disclaimer of Warranty.

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. Limitation of Liability.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

17. Interpretation of Sections 15 and 16.

If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:

    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.

You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.

ColorCode-0.8.5/highscoresmodel.h0000644000175000017500000000267512610773251015407 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef HIGHSCORESMODEL_H #define HIGHSCORESMODEL_H #include #include #include #include #include "ccgame.h" #include "buttonscell.h" #include "gametableview.h" #include "gameslistmodel.h" class HighScoresModel : public GamesListModel { Q_OBJECT public: HighScoresModel(QObject* parent = 0); virtual void InsertRow(CCGame g); virtual int GetColIx(const int ix) const; virtual int GetMaxColCnt() const; bool IsValidHighScore(const int score) const; protected: virtual void DoSort(QList &list); }; HighScoresModel* GetHighScoresModel(); #endif // HIGHSCORESMODEL_H ColorCode-0.8.5/gameslistmodel.cpp0000644000175000017500000003005512610773251015565 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include "gameslistmodel.h" #include "gametableview.h" const int GamesListModel::MODEL_ID_DEFAULT = 0; const int GamesListModel::MODEL_ID_PREV = 1; const int GamesListModel::MODEL_ID_SAVED = 2; const int GamesListModel::MODEL_ID_HIGH = 3; const int GamesListModel::COL_RANKING = 0; const int GamesListModel::COL_SCORE = 1; const int GamesListModel::COL_USERNAME = 2; const int GamesListModel::COL_DELETE = 3; const int GamesListModel::COL_GAMENO = 4; const int GamesListModel::COL_DATE = 5; const int GamesListModel::COL_TIME = 6; const int GamesListModel::COL_CCNT = 7; const int GamesListModel::COL_PCNT = 8; const int GamesListModel::COL_DOUBLES = 9; bool GamesListModel::SortListScore(CCGame a, CCGame b) { if (a.GetScore() > b.GetScore()) { return true; } return false; } bool GamesListModel::SortListTime(CCGame a, CCGame b) { if (a.mTime > b.mTime) { return true; } return false; } GamesListModel::GamesListModel(QObject* parent) : QAbstractTableModel(parent) { mId = MODEL_ID_DEFAULT; mEditIndex = QModelIndex(); mMaxSize = 20; mHoverRow = -1; mRowHFg = QApplication::palette().color(QPalette::Active, QPalette::ButtonText); mRowHBg = QApplication::palette().color(QPalette::Active, QPalette::Button); } int GamesListModel::GetId() { return mId; } QString GamesListModel::GetListStr() const { QStringList strl; for (int i = 0; i < mGamesList.size(); ++i) { strl << mGamesList.at(i).ToString(); } return strl.join(";"); } void GamesListModel::SetView(GameTableView* view) { mView = view; } void GamesListModel::SetMaxSize(const int max) { if (max != mMaxSize) { mMaxSize = max; LimitGamesListSize(); } } void GamesListModel::SetRowHColors(QString fg, QString bg) { mRowHFg.setNamedColor(fg); mRowHBg.setNamedColor(bg); } void GamesListModel::InsertRow(CCGame g) { mView->clearSelection(); bool found = false; for (int i = 0; i < mGamesList.size(); ++i) { if (mGamesList.at(i).mGameNo == g.mGameNo) { mGamesList.replace(i, g); found = true; break; } } if (!found) { beginInsertRows(QModelIndex(), rowCount(), rowCount()); mGamesList.push_back(g); endInsertRows(); QModelIndex mix = index(rowCount() - 1, GetColIx(COL_DELETE), QModelIndex()); mView->openPersistentEditor(mix); } DoSort(mGamesList); LimitGamesListSize(); emit layoutChanged(); } void GamesListModel::LimitGamesListSize() { if (!mGamesList.isEmpty() && mGamesList.size() > mMaxSize) { removeRows(mMaxSize, mGamesList.size() - mMaxSize); } } void GamesListModel::EditField() { if (mView != NULL && mEditIndex.isValid()) { mView->setCurrentIndex(mEditIndex); mView->selectRow(mEditIndex.row()); mView->edit(mEditIndex); } } void GamesListModel::SetEditIndex(QModelIndex ix) { mEditIndex = ix; } QModelIndex GamesListModel::GetEditIndex() const { return mEditIndex; } QString GamesListModel::GetEditValue() const { QString val = ""; const CCGame* eg; if (mEditIndex.isValid()) { eg = GetGameAt(mEditIndex.row()); val = eg->GetUserName(); } return val; } const CCGame* GamesListModel::GetGameAt(const int row) const { if (row > -1 && mGamesList.size() > row) { return &mGamesList.at(row); } return NULL; } void GamesListModel::ReadList(const QString &str) { mEditIndex = QModelIndex(); if (rowCount() > 0) { removeRows(0, rowCount()); } QStringList games = str.split(QString(";")); CCGame* g; QModelIndex mix; for (int i = 0; i < games.size(); ++i) { g = new CCGame(games.at(i)); if (g->IsValidGame()) { beginInsertRows(QModelIndex(), rowCount(), rowCount()); mGamesList.push_back(*g); endInsertRows(); mix = index(rowCount() - 1, GetColIx(COL_DELETE), QModelIndex()); mView->openPersistentEditor(mix); } } DoSort(mGamesList); LimitGamesListSize(); emit layoutChanged(); } void GamesListModel::HoverRowSlot(int row) { if (mHoverRow == row) { return; } int tmprow; if (row == -1) { tmprow = mHoverRow; } else { tmprow = row; } mHoverRow = row; emit dataChanged(index(tmprow, 0), index(tmprow, columnCount() - 1)); } bool GamesListModel::removeRows(int row, int count, const QModelIndex &parent) { if (row < 0 || row + count > rowCount() || count == 0) { return false; } if (mEditIndex.isValid()) { if (mEditIndex.row() >= row && mEditIndex.row() < row + count) { mEditIndex = QModelIndex(); } else if (mEditIndex.row() >= row + count) { mEditIndex = createIndex(mEditIndex.row() - count, GetColIx(COL_USERNAME)); } } beginRemoveRows(parent, row, row + count - 1); for (int i = row; i < row + count; ++i) { mGamesList.removeAt(row); } endRemoveRows(); return true; } Qt::ItemFlags GamesListModel::flags(const QModelIndex &index) const { if (index.isValid() && index == mEditIndex) { return Qt::ItemIsEnabled|Qt::ItemIsEditable; } return Qt::ItemIsEnabled; } bool GamesListModel::setData(const QModelIndex &index, const QVariant &value, int role) { if (role == Qt::EditRole && index.isValid() && index.row() < rowCount()) { if (index.column() == GetColIx(COL_USERNAME)) { if (index == mEditIndex) { CCGame g = mGamesList.at(index.row()); g.SetUserName(value.toString()); mGamesList.replace(index.row(), g); if (g.GetUserName() != "") { emit ValidNameCommitSignal(); } } } else if (index.column() == GetColIx(COL_DELETE)) { bool ok; int aid = value.toInt(&ok); if (ok) { if (aid == ButtonsCell::ACTIONID_DELETE) { removeRows(index.row(), 1); } else { CCGame g = mGamesList.at(index.row()); if (aid == ButtonsCell::ACTIONID_SAVE) { CCGame* gc = new CCGame(g.ToString()); emit SaveListGameSignal(gc); } else if (aid == ButtonsCell::ACTIONID_PLAY) { CCGame* gc = new CCGame(g.ToString()); emit NewGameInputSignal(gc); } else if (aid == ButtonsCell::ACTIONID_COPY) { QClipboard* cb = QApplication::clipboard(); cb->setText(QString::number(g.mGameNo)); } } } } return true; } return false; } int GamesListModel::rowCount(const QModelIndex &) const { return mGamesList.size(); } int GamesListModel::columnCount(const QModelIndex &) const { return GetMaxColCnt(); } QVariant GamesListModel::data(const QModelIndex &index, int role) const { if (!(index.row() < mGamesList.size()) || !index.isValid()) { return QVariant(); } else if (role == Qt::TextAlignmentRole) { if (index.column() == GetColIx(COL_USERNAME) || index.column() == GetColIx(COL_DATE) || index.column() == GetColIx(COL_TIME) || index.column() == GetColIx(COL_DOUBLES)) { return QVariant(Qt::AlignHCenter | Qt::AlignVCenter); } return QVariant(Qt::AlignRight | Qt::AlignVCenter); } else if (role == Qt::BackgroundRole) { if (index == mEditIndex) { return QVariant(QApplication::palette().color(QPalette::Active, QPalette::Highlight)); } else if (index.row() == mHoverRow) { return QVariant(mRowHBg); } } else if (role == Qt::ForegroundRole) { if (index == mEditIndex) { return QVariant(QApplication::palette().color(QPalette::Active, QPalette::HighlightedText)); } else if (index.row() == mHoverRow) { return QVariant(mRowHFg); } } else if (role == Qt::DisplayRole || role == Qt::EditRole) { CCGame g = mGamesList.at(index.row()); if (index.column() == GetColIx(COL_RANKING)) { return index.row() + 1; } else if (index.column() == GetColIx(COL_USERNAME)) { return g.GetUserName(); } else if (index.column() == GetColIx(COL_SCORE)) { return g.GetScore(); } else if (index.column() == GetColIx(COL_DATE)) { return g.GetDatePartStr(); } else if (index.column() == GetColIx(COL_TIME)) { return g.GetTimePartStr(); } else if (index.column() == GetColIx(COL_CCNT)) { return g.mColorCnt; } else if (index.column() == GetColIx(COL_PCNT)) { return g.mPegCnt; } else if (index.column() == GetColIx(COL_GAMENO)) { return g.mGameNo; } else if (index.column() == GetColIx(COL_DOUBLES)) { return (g.mDoubles == 1) ? tr("Yes") : tr("No"); } else { return QVariant(); } } return QVariant(); } QVariant GamesListModel::headerData(int section, Qt::Orientation orientation, int role) const { if (role == Qt::DisplayRole && orientation == Qt::Horizontal) { return GetHHeaderLabel(section); } else if (role == Qt::DecorationRole && orientation == Qt::Horizontal) { if (section == GetColIx(COL_DOUBLES)) { return QVariant(QIcon(":/img/same_color_header.png")); } } else if (role == Qt::ToolTipRole && orientation == Qt::Horizontal) { if (section == GetColIx(COL_DOUBLES)) { return QVariant(QString(tr("Pegs of Same Color"))); } else if (section == GetColIx(COL_DELETE)) { return QVariant(QString(tr("Actions"))); } else if (section == GetColIx(COL_RANKING)) { return QVariant(QString(tr("Rank"))); } } return QVariant(); } QString GamesListModel::GetHHeaderLabel(const int col) const { QString str; if (col == GetColIx(COL_RANKING)) { str = ""; } else if (col == GetColIx(COL_USERNAME)) { str = tr("User"); } else if (col == GetColIx(COL_SCORE)) { str = tr("Score"); } else if (col == GetColIx(COL_DATE)) { str = tr("Date"); } else if (col == GetColIx(COL_TIME)) { str = tr("Time"); } else if (col == GetColIx(COL_CCNT)) { str = tr("Colors"); } else if (col == GetColIx(COL_PCNT)) { str = tr("Slots"); } else if (col == GetColIx(COL_GAMENO)) { str = tr("Game No."); } else { str = ""; } return str; } ColorCode-0.8.5/img/0000755000175000017500000000000012610773251012621 5ustar dirkdirkColorCode-0.8.5/img/cc64.png0000644000175000017500000004027412610773251014075 0ustar dirkdirk‰PNG  IHDR@@ªiqÞsRGB®ÎétIMEÙ ,M¿WX IDATx@@¿¿AAA666ðüûûôóòöõòüøúþ    ÿÿÿÿÿÿÿÿÿüüü÷÷÷øøøððòðñóôõ÷þþ  ËË˾¾¾ñKKK%%%êòðïÚÒÐù( ü õýóóÿÿÿÿÿÿüüüðððïïïÊËÒôóò'$#  ýÿ÷÷ñöëòþýúÕÕÔ¸¸¸ëuuuÿéééʾú  <[,<úû ûýýþ÷þ÷ú÷÷øóþë"úß#äùúü ÿÿÿôôôååå½¾ÄôòëWO LH!!ýüþüüúüúöôòïð ÞæÖåïòûûùõŒŒŒKKK&&&úÄÃÂáâã LmRaýþÿ÷üÿøýúþùþÿûÿýûþýùÿýùþùÿ ùöÿéAÖøäþÿÿÿîîîÁÁÂÊÊÌGCƒ3ÿüúþýûþüýÿýùþÿýúÿüþûýúûùïî ÓÞ"ÑãììéÕÔÔ¸¸¸ûJJJ&&&ú³¯­ò Œ¸7/þÿ÷ýúüþÿþÿÿÿÿÿýÿÿÿýøÙ÷äø@ Û0Öðððÿÿÿììì°°²ßÞÚ–‘8QS2ÿýøýüúÿþÿþýÿÿýÿÿÿÿÿÿûí< í$ÆÜ'úþþþºººü(((û²­«ò’²#þøþûþÿÿþÿÿþþÿ÷ý·í'ò ?Íòòñÿÿÿïïï±±³ààÚ³²H45.ÿþúþýüÿÿÿÿÿû#× ô¿4ÿÿÿûºººvvvÿÀ¿½êû—¸$ÿùþÿÿþþÿÿþþÿþþþÿÿþþþþþÿÿýþþÿýàñ  æøøøÁÂÃÌÊɱ¯H682ÿþüÿþÿÿþÿþÿþÿþÿÿþþÿÿÿÿÿÿÿÿÿÿÿÿÿ î öíû'++.€ÆÆÅQQQåååâãå~¥#þøþÿÿþÿÿÿÿÿ¾ää%õôóåå建½Š…489/ÿþúÿÿÿÿÿÿÝ8"Ý KKK"""ïÌÆÂ Lm7/þøþÿþÿÿýÿÿþþÿþþÿÿÿÿùþµå ññññññ²³¸><Z[2ÿüÿýúÿÿýÿýÿýÿÿþÿþÿþÿÿþÿ Ñ/!+,-ïNNNìéèü Raþÿÿúþÿûÿÿüüÿÿýÿÿþþÿÿþÿÿÿÿÿäñ Öùø÷÷ççèöõðuo) þüøÿýÿûÿýÿÿýÿÿÿÿÿÿÿÿÿÿÿÿ÷&ÖKKL)))ñÛ×Ó ýûøÿþûÿþúÿÿûÿþûþûÿþýÿýÿÿÿÿýþýÿÿÿÿÿÿÿÿþÿõíôññ 'ü÷ýþûþþûÿþûÿûÿÿüÿþüÿüÿþüÿýÿþÿÿýÿÿýÿýÿÿþþÿþþÿýÿÿÿÿÿÿÐïüüûììí95þûùþüÿþüÿýüþýÿþüÿÿýÿýþþÿÿþÿýÿÿýÿýþþÿýÿýþÿÿÿÿÿÿÿþá øöó%ú ÿ÷üÿÿÿÿÿÿÿýþÿÿþÿÿüýÿÿÿÿÿÿÿþÿýÿÿýþýÿþÿýþþþÿÿâðïðï þýûÿÿÿÿÿþÿÿÿÿýþþÿÿÿÿÿþÿÿÿÿÿÿýÿýÿþÿÿþÿÿÿþ ì ûùùûûþÿÿÿÿýÿÿýÿýÿÿýÿýÿýÿþýÿýÿýÿÿÿþÿÿÿþÿýÿÿÿÿÿÿïôôóõ ÿÿýüþþÿÿÿþþÿüÿÿþýÿÿÿþÿþþÿÿÿÿÿÿÿÿò  üýüýÿþÿÿÿþÿÿýÿþÿýÿýÿÿüýÿþýÿýÿýÿýÿþýÿþþÿÿþøüÿÿþ ýÿýÿþÿÿÿÿÿÿþÿÿÿÿÿýþÿÿÿÿÿÿþÿÿÿÿþþÿÿþÿÿÿÿÿÿÿþú ÿ÷ýþÿÿÿÿÿÿÿþýÿÿÿÿýÿÿüüþþüÿüÿþÿÿýÿþýÿÿýÿýÿÿÿÿþÿÿÿÿÿý þýñÿÿÿÿÿÿÿÿþÿÿþþþþþÿÿýýÿÿÿþýÿÿþÿþÿÿÿÿÿÿÿÿÿÿþüúüý  ü÷úþýýþþþÿþýÿýÿþüÿÿüÿüþûÿýÿýþÿýÿýþýÿÿýþÿýýÿ ûÿÿüùýú÷ ûÿÿÿÿþÿÿÿÿÿÿýÿþÿÿýýýÿÿÿþþÿþþÿÿþýÿþþýÿþþÿýÿÿþþþùýôöú ÿõö÷÷ ÿÿÿÿýþÿÿýÿþýüÿüþÿûÿÿüÿýÿÿûÿýÿÿýÿÿÿÿýÿýþÿþÿýý÷êèõôñøþÿÿþÿÿÿÿÿÿÿýþÿþÿÿþÿÿÿÿýÿÿÿþýÿÿÿþþÿÿþþýÿÿÿýõûõ÷û ýó ùóô ÿÿÿÿýÿýÿÿýÿþÿûÿüÿýÿÿüþýÿÿýþýûÿÿüÿÿýþÿÿüý'õ ççæëìôÿÿÿþþÿÿþýÿÿÿÿÿÿÿýýÿþÿýýþÿÿþÿÿÿþÿÿÿÿÿÿþÿüûðûùûÿ þóþëþùÿÿùþÿùþÿùÿÿûÿÿûÿÿûÿÿûÿÿúÿÿúÿÿúþÿüÿüÿÿûÿþýþüÿÿüþþÿýÿýÿÿýÿÿþÿþÿÿþÿÿù'ñ àëÿýûÿþüÿýüýþýüþüýýþüýþýþýüÿþÿþÿþÿÿýýÿþÿþþþÿþÿÿþýþÿþÿþÿÿÿÿþúûýäò ýúø"ûáÙþ!øÿÿÿþÿÿÿþýÿþýþÿûÿýÿÿýÿüþÿûÿüþýÿÿýÿüÿùøþ0ð äêýòï òþÿþÿÿþþÿÿÿÿÿþÿýýÿýþÿÿþþÿþþþýÿþÿþÿÿûùïøàê þßÿéþùþþùÿþùþþùþÿùÿúÿÿùÿÿúÿþùþþúÿûÿþûÿþúþþúÿüÿÿüþüþÿûÿÿüþÿüþÿûÿüþýüþüöH è ïøÚãþüýÿýýÿýüÿýüÿüüÿýýÿüýÿýýÿýüÿýýÿþþÿýþÿýýÿýýÿüÿýþÿþýþþþþÿþýÿþþþþþþûûüÝñ-÷û òñð@ Õäø÷üÿÿÿÿÿþÿÿÿþÿýÿýþÿýÿýÿýÿüþüþÿûÿþþÿüÿùôûB(é!Ïá åéþÿÿÿþÿÿþÿÿÿÿÿÿþþþþÿþÿÿýþÿýþþþÿþÿûøëöÕé ÿÿÿ ÷å@ ÜúûþøÿÿøþÿùþÿùþÿúþÿùþÿúþÿùÿÿøþÿúþúþúÿÿüÿÿúþÿûþÿüÿÿûÿþþÿüÿùöüïI ê""!ûÿÍÞ-øôýùûýýýÿüüÿüüÿüüýþüýüýÿýþÿýýÿýýþþÿþþýýýÿÿýþÿþÿÿþÿüùñ÷ Ìê> 0Õ;âþùüýùÿÿúýÿúýÿùýÿúýúþûþúþúþüÿÿúþúþÿûþýÿÿúÿÿþþÿúÿùóü ïa.à(# -+)ÞìÏá4úøþùÿûýÿýüÿýüÿýüÿýüÿþýÿýýþýþþýþÿüþüýþþÿýþýÿÿþþûøòõËêBêô ññð?Îü¾åùþÿÿÿÿþÿÿÿýÿýÿÿýÿÿüÿþüþøôû ïa.à.$ÿÿÿ'&#ÔÜÿ=.Æ ñþþÿÿÿÿÿþÿÿþÿÿþÿÿÿþÿýþÿüöðö ÌëCâñ ýýýòññ8Ð!óµæ!åð þÿÿÿþÿýÿþÿþÿÿþÿù÷ýý÷A(èKë(#ÖÚòøG.Ì Ýÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿüúúúúåó#Ïí;ôû  ýýý’’’ÿøøøöõóÿÔùÄãêò ÿÿÿþÿÿÿÿýýÿûýþø)ðJ!é ÿÿÿÿÿÿÿÿÿ÷÷÷ßßàùøô#í!ÎåÿÿÿÿÿÿÿþþÿýþùùýíúÛð6âñ ýýýýýýýýýýýýýýý òòò.Ô0$ óÐïâðïôøüý ú÷'ô&òÿÿÿ (('ïïïàåÞí ü äã ïöþøýöüîøæõðö þþþýýýùùù õïBêÿÿÿ  öööììíÙï üü#ÿÿýýýÿ ýýýýýý þþþÿÿÿþþþýýýþþþþþþýýýþþþýýýýKBv IDATýýÿÿÿÿÿÿ÷÷÷ðððíîîïïïõõõþþþ  øøøëëëçççêêêðððùùù ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿìììêëëÏÔÕñîî   ùøùöôéòðçåå ÿÿÿîîîÝÝÝËËËâââ øøøùùùéééÿÿÿÿÿÿõõõèèè²»¼ôëê,Mü4ûõúùûûýÿüÿöò íë#îõõÏññ#"" ÿÿÿÿÿÿÿÿÿÿÿÿ÷÷÷×××···ÖÖÖ!!!111...""" øøøðððìììäääìììÜÜÜ ’’’ÿñññÊÌ̹¾À9þoü3üô ýüûÿûÿýýÿýÿüþþþýüÿüÿîè-0å02ÿ *''ÿÿÿÿÿÿïïï¹¹¹¬¬¬QQQBBB$$$ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿÿÿþþþìììÞÞÞØØØôôôýýýýýýýýýýýýÿÿÿÿÿÿííí±´´ØÓÓ…þ\ö ýýûûÿþÿÿþÿþÿêé »ºØÚãHHÖ&""ÿÿÿëë묬¬°°°JJJggg...ýýüþþÿþþþýýýüüü ÒÒÒÛÛÛûûûÿÿÿÿÿÿIII€ððð®±²àÔÓ®úPôÿÿüÿÿÿÿÿÿÿþþïí ÚÝã ðð𪪪°°°dddsss%%%ÿÿþÿþþþ ãããüüüÿÿÿÿÿÿÿÿÿÿÿÿõõõ¿ÀÁߨֲú6÷ýþþÿÿÿôó±³Ù-)) ÷÷÷¹¹¹°°°dddlllþþüÿÿÿÿÿþþûûû,,,ÏÏÏ ÿÿÿÿÿÿýýýãããÌÐÏŽü5÷ýÿÿÿÿÿÿÿöö²´ íðàââþþþÿÿÿÿÿÿÿÿÿÿÿÿþþþØØØ­­­KKKfff)))%%%óóóýýýÿÿÿòòò½ÅÆCüRöýÿþÿþþÿÿîì³¶öòòïïïþþþþþþþþþþþþïïï´´´fffÿ***òòòýýýèééôëê} úþþþþþÿÿþÿÿÿÿÿÿÿþþÿÿÿÿ××ÞáåææÿÿÿÿÿÿÿÿÿÿÿÿÚÚÚØØØRRR...üüü%%%ûûûýýýø÷÷ÎØÙM ýùýÿýÿþþÿÿÿþÿþþÿÿÿÿÿÿÿÿÿÿ ¾Âü÷ùö÷÷þþþþþþ÷÷÷ÍÍÍ"""CCCöööö÷÷ôððGûýüûÿþÿþÿþÿþÿÿÿÿþþþÿÿÿÿÿÿáâ ÷öìììÿÿÿÿÿÿêêêááá***###ýýüÿÿÿùùùñôô# üùûÿþÿþÿþÿþþÿþÿþþÿÿþÿÿþÿÿÿÿÿÿÿÿÿÕÙöõõþþþþþþèèè ---ÿÿÿÿÿÿÿÿñôõûúûýÿýÿþÿþÿþþþþÿþÿþÿþþÿþÿþÿÿÿÿÿÿÿÿÜàûûüÿÿÿÿÿÿééé """þþþÿÿÿÿÿþþýÿÿÿÿÿõøø(úüýþÿþÿþÿÿÿÿÿÿÿþÿþÿÿþÿþÿÿÿÿþþýÿÿìíþþþñññ ÿþÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿ ý üþüÿÿÿþÿÿÿÿþÿþýÿþýÿþÿþþþþþÿÿÿÿÿÿööýýýùùù ÿÿÿþþÿÿÿÿþÿÿÿÿÿÿ ýþýÿÿÿÿÿÿÿÿþÿÿþÿÿþþÿÿþÿÿÿÿÿÿÿÿþÿÿÿÿÿÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýýý ýóøþÿÿÿÿÿÿÿþÿÿýÿÿþÿþýýÿþþþÿÿÿÿþüþþþþþþ ùùùøøø ÿÿÿÿÿÿÿÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿùùùûûû û ÷ þýüÿýÿýÿýÿýÿýÿýÿþÿýþþÿþÿýÿþÿýÿýýþýÿÿþþþýþÿÿþþÿýýýýýýðððÿÿÿýýþÿÿþþþþÿþÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþÿþþþÿÿÿÿÿÿõõõ÷÷÷ö ñ üýÿüþüþüþüþüþüþýþýþýüþýÿþþþÿýýþþÿÿýÿþÿþýÿýÿýÿþÿþÿÿý#!þþþþþþíííýýýþþþþþþþÿÿÿÿÿÿÿþÿÿþþþþþþþÿÿþÿÿþÿÿþÿÿþÿÿþþþþÿÿÿÿÿÿÿþþþþþþþþþþþþþþþñññûûûôñþýÿýÿüÿýÿüÿüÿüÿüÿüÿýÿýÿýÿüüÿýþýýÿýþÿþþÿýÿýþýøÿù)% ýýýýýýãããþþþüüüüüþÿÿþþýýþþÿÿÿÿþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþÿþþýýýýýýýþþþþþþëëëþþþÕÕÕÿè ÷ üýÿýÿüÿþÿþÿþÿþÿýÿýÿýýÿýÿýýþÿýþÿþþÿýÿÿÿÿýûüü÷ ýýýýýýìììëëëÿÿÿýýüþþÿÿÿÿÿÿÿþþþþþþÿÿÿÿþþÿÿþþþþÿÿÿÿÿÿþþÿþþþþþþþþþÿÿÿÿÿÿïïïæææÕÕÕ³³³òÿúúç$&ðüýþûÿûÿûÿûÿüûÿüÿûÿüÿüüÿüÿüÿýþÿýüýþÿýÿþýþøþþúE> ýýýýýýýýýýýýïïïÞÞÞþþþûûûúúúþþþþþþþÿÿþþÿÿýýýýþþþþþþþþþþÿÿþþÿýýýýýýýýýþþþüüüûûûâââñññ´´´òÖÕÕóüüã9<øüýüÿúÿüûÿüüýÿýÿýÿýÿýþþÿüÿýýýÿýÿüýýÿúøùü((õ ýýýýýýýýýýýýØØØêêêÿÿÿûûûúúûüüýýýÿýýþþýýÿÿÿÿÿÿþþÿÿÿÿÿÿýýþýýýýýýýýýýýýýýýþþþíííÛÛÛØØØ¶¶¶ðûööå##ë25ûþûþýþûþûþüþûþüþûþûþüÿýüþÿýÿûþýÿüÿýþýÿúúûùóOG ýýýýýýþþþþþþýýýýýýòòòÒÒÒõõõýýýûûûûûûûûüýýþýýÿþþþþþþþþþþþþýýþüüüüüüüüüüüüüüüüüüýýýõõõÖÖÖòòò²²²ðÆÆÆ/..€0/ èéëìÿþþþþþþþþþüÿüýÿþýÿþÿüûûü÷õYSü ÿÿÿÿÿÿÿÿÿÿÿÿþþþåååÿÿÿÿÿÿþþÿÿÿÿÿÿÿþþÿþþÿÿÿÿþþþýýýýýýüüüýýýýýýýýýýýýöööÖÖÖ×××ŠŠŠ… ~67íîèêÿÿÿÿÿÿþþÿýþÿÿýýÿýþýÿúúúø õUPö!ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿÿÿýýýãããþþþþþþþþþÿÿÿþþþþþþýýýþþþþþþýýýýýýþþþüüüýýýõõõÖÖÖÒÒÒÐÐÐÝÝÝþÜÜÜþ † }þ76çéÿöøþþýýþþÿþüÿþþýÿûùûøýýùóZSöÿÿÿÿÿÿÿÿÿþþþÿÿÿÿÿÿþþþÿÿÿÿÿÿÿÿÿ üüüâââøøø ÿÿÿýýýÿÿÿþþþþþþþþþýýýþþþýýýýýýýýýþþþüüüëëëÐÐÐØØØÐÐй¹¹üuuuÿ÷÷ÄÉÖØóòÿÿÿýÿÿÿþþýûýùýù96í*# ÿÿÿóóóóóó%%%ÿÿÿÿÿÿÿÿÿüüüðððåå娨Øñññ‹‹‹KKK,.-ê üý àäÙÛèèÿòóúúþü þÿõ*%ï û ÿÿÿÿÿÿüüüòòòýýý ùùùõõõòòòêêêæææñññØØØ²²²ëIJJ///ð   ûýü÷ûûøýýûÿþÿÿÿÿÿÿÿÿÿüüü÷÷÷ùùùÈKIDATýýýûûûùùùùùùþþþÕÕÕ´´´ñýý¥VkIEND®B`‚ColorCode-0.8.5/img/help-about.png0000644000175000017500000000133612610773251015372 0ustar dirkdirk‰PNG  IHDRóÿasBIT|dˆ pHYs»»:ìãâtEXtSoftwarewww.inkscape.org›î<[IDATxÚ¥“1hA†ÿ73;{›Ë].¹Ó\R)D“B°P,¼Jì,Œ…‘D‹4ÐVbc!h#’& UBbái‘*v‚6*6bÃ]Ü5â]în÷nwœ]×Íiìüác‡7;ÿ¼÷xCJ)üþY1‘mNcSÃéÁè«üh¿WÀ"È\VN;èÒÐä³ñBŸœ;{¬Xî…]ó@²)¬Uš(¿±§î«‡§^ì1 K+¥‘bÏóó'†¤à ßj.îL˜]ZC¶×B'PxüÚñÖm;Y†Ó€.¯æó9«\+H»á£Rï Ÿ169z$ÇP.…J͇ÝP:Ô/ YkŽ®­›»=4qp0“w  @Cøøµ…¥WUp¬®Õ²¬0q`ºhoÔ§<ˆ iN TµA(ßÐp}Üxú):éí·(DLÀæÅÄ Mâð»j9KÀ48Ü–‹êÝãø­Áëoa¦È@ûâ{ËG›IÀmO l5 uÀnK°+/] ¾ì;„­ƒG Œþ®HçW} Š(*H q(&¢¦Á‡® ä‚&Ì$FFu&â"¼1FÆ_sq×Àcó:¸™ü@,ì$…k¢h/2c̆4—uÄ—37Ê ãéØÑÝî¼&b¹ ~NÍfœ½£|k«Åž°À/EÆ}iÒƒ¥ð¹eÁöØ&€u3_Þ3ÊIàv-Ž;E“Œ0ªÙÖ#6y¹íyuuÄýçc"" Õ…©q™¾¦­ñ4­˜¦>Ûù Ïšã•%ì„vIEND®B`‚ColorCode-0.8.5/img/games-highscores.png0000644000175000017500000000325012610773251016557 0ustar dirkdirk‰PNG  IHDROc#" pHYs7\7\ËǤ¹ vpAg\Æ­ÃbKGDÿÿÿÿÿÿ X÷ÜIDATxÚÍÑûS—UÀñ÷yžïýÂõk* ^ÖL³Úœ] s¼¥m²-¥–Ö‹Ò¬åÀÊàevLlË‘-]¼ä µµ«[kа˜(– Šh¡(7AáËø>Ïs–ø¥ÿ`ß¿¼fΙóùás#¥ŒI8 €f@bàBéC®Éï(†@ :Ñ…H¦‘LÈvôã°tÐ$‡ÿ]ÎÿC‚‘–ºƒ@0ô]Ù æñ‰èâõÀóÆ½œÅ{‡+Éý9ÊAõE5‡ÞÊûÝ5bšnŠ'ÍøBfÉ äß_+RÈYÈ  À½£-Wf˜ɵ×^#K‚:<Œ!†0R¹@FÐ-æÊYûm¦Xª´Š££žg•ÞWü­¬6á¾x<°Á]+ZLR3ÎɈŽf<¢„ÂYóÉ`¹]…Üå&õ\CÊv0íÌ[ž ê»Æ<ý+ ¯ÿ­þ8åúj¿m•Æ›+úï˜ÖiÙú%1!d†aÖ“er`æ/O>» Û}™4™ÃRZ Ç 1¢Šwä9 䜂Åx&1\ÆÏ¾ kêüøzXM>U¸™#RĦàOÅÇWŸ3nè²Þc›ý`ÑûkÂ¥{rí£Îù\Göï¨{Iw´3Ú–ÿtjJ³hjLFïß5ùLgþCœ¯ð½èò, þä ‹ÕÀeÊMy¾6ãO˜2A_?8$o(ãM›™¥yÍ£í£åDÇ·Æ1#‘:§Ó8¦WcA÷_]$²dŽÖÒ÷¶»£ Å>Ðù¯S)þ&®‹?Š5²Çc;,-À ù)Hggtoœù§/f˜,»Ô åɘðad#îq_O¯X2“¢öÛ*j힦úï"ùµZ`s*¢ësµw ÀqÄ~A1“iÙf^$î²Ëù–í¨ÞÆ=ó÷Šh‘(Ê’ …ýçÚ 4wOTÃÛ`jŠžþÈÎ=Å+½€b H·7‚fs;ª`Ê3b§ïö­}g|Ü™|ö±[Kóñj{îåÕ¤³XN4Jõ¿ªvãœ$é?Meèí¦†½'ÎPçLµÔOÈBq!è'¹@.“Þê3ŸO2»'Yã7#|ð_5Å?¶¬»$å*ÿ“¾Ó²”¢ðÅÓï,ú'~"+¾tÌm?¬<ý(Ÿš­"Ø<4ºäVŠí ‹ xY gH.RJȧt³¬ûå°ÀØnp‡Ç-;–æ ¯BïŠëyå  8r•XY*{&ºžœ»,ž„ñKf‹—ºp)þ7;³ p»Ï¶™æj9–@‹TOqƒ ón±Rž²E-¢Š u‹ôÈ^F©OÐ*k¥´-ÖÈ)rVGz] ÒÒÚ‚/UÊQ¶e®ÁVð£c=ÈPSàk_ƒ¸‹Ú™V5]5çÿÛðg¬¿•çû]X£Ô\þ¢¥ Œäû˜†´ë^ŠA·êÅÒY%ÄN‘H±€(±]¾ÀUelØ Ì­»7¤³ÌÛÜo{Nýu+€Éý´³î…J»fo«oè[ºBÚ ÏXèï³|f.¦ËiF5e$sÄ&qZ†, —(½J Büïi€Toªk¹J›˜jzhÉ=Ê$y•OA\; ª»]9{‚FK«9h7Kv—AÈ-[—ã†3•ãÖfÛL×VÖË‹~ï@¸üƒ¶©/©[È4ÖëeLf£¾QóÒ(÷øùŸFRîUûšÏƒ]Þ¯ûyئ&Y'#DžòAo6‚"K}G†Ø§¿>®‚Iâ=52ØG+ÉÊϿ֔?r=0¬3vXwŰé#®9?À §2òî"@t¼é5€Ë " àìVÈÅ*æt?œ j啤æ4°ÿÂgõG€{‰vR¯×^¹J¶;O†°\ûä:YözŽð Xs—và&Ѹa –,€¾Ñ¢IìoвY4AÏZ5Bü}ÈßÛ¿´œ€ÞSñy‘_‚¯÷)øœê¢$t"zTXtSoftwarexÚ+//×ËÌË.NN,HÕË/J6ØXSÊ\IEND®B`‚ColorCode-0.8.5/img/edit-copy.png0000644000175000017500000000074512610773251015232 0ustar dirkdirk‰PNG  IHDRóÿasRGB®ÎébKGDÿÿÿ ½§“ pHYsììu85tIMEØ#;ºbg¡eIDATxÚ•ÏJÃ@Æg7¦¥^Ч<†xñÔ¬oàÅs½ØS-ø¾KÏ>€ <ûVÚTJ‚%w:³l蚢||»ìÌowVÀ€|FpXH~!CMWø71`5U7¯Â¤” …A)8Ù¦°ßïsˆ&ÀÈq ˆ£‚ - Ðív9NÈ©5Ò+/FHÚl6Å1ÎçsüÇHÃÆ øVV¸^ƒÃ# ²=’çy²è" 1ÝL{U3gÛH«Ðì÷ëS¡`Ù@§¦lê6`> hBD­¹( Ã:z=¤²‚ŠÑu]Qݬ³v+7û¾¬íög³gZ¼?&ßoŸ”$ fY† /Ë_ TJaÇ8¾¿QÝ)´hÈ€4M1ÏsèÆåj©›'“ûwª¹&Ë6À5*´”%~.W8}˜ò“/}>45 Ÿ›"[hfþ +0Úh èˆq{+}IEND®B`‚ColorCode-0.8.5/img/qt.png0000644000175000017500000000100212610773251013744 0ustar dirkdirk‰PNG  IHDR<< ")@3PLTEuŒ0žÃ7+*"DK&…¢3ew-<@%Ta)–¸6LV(\l+# ¦Î9}—135#­4m.¼ÌŽŠIDATx^íÖËnã0 P‘z¿lÿÿ×v&ÀE™’DbtÓEî.Q!ж°~‘??8åyNŽ=§{8Už"\ÓÛ8Å©Ó[˜ú4Óé5Þ<ð~…€• ±o} ìÛ8rQi'!ëÆÂ®B'O$¶%ÒúD˜\uoºŸjã”Ï'Ø‹ }š¸›}­0ÃSéjá{=[tqA7g è§…ÆÐ²‹9 ÌW ²hܰ¤-4Ê7…7:Ö5ñq+œQÖ¶$6—%–Oûv-ư$g}«£±¶­ oâ"¬ÒØ;mXK»§G7)«±Ka¬ lOëú /qUt)B£3ûwGÐ…Hh¼UÝÀh”tÁ&T /–/4•‡54/ ç§‹†êÃjML,4¢4“‰×žHi®ÞKc8’oCà ±Ñ^çy”„¶1®v?þ¨îk`¤•׸zxÑðÌ!,°J:Lš¨Àš ŠÀ6ráË81JX`/”®ü/W"ñ]þüßþà{ùX?Eôö©IEND®B`‚ColorCode-0.8.5/img/system-switch-user.png0000644000175000017500000000137112610773251017130 0ustar dirkdirk‰PNG  IHDRóÿabKGDÿÿÿ ½§“ pHYs¯¯^‘tIME× ô‚†IDATxÚ‘ËKUA‡¿™3Ó=jÆ-IŠ’Ù¢=6QЛPÁ@¶0ƒ ‹Z´ü‚ËZFQh¤»ò†wÓB KMÌBÑâÞS÷žçLœsª…ôÁÇÌæû10àøÒ‘B Ç"%™BdfX›kL®– DqMÞ‰Œ::ˆ¼ûxjqª'6u¡h´G’‘ˆrcpõ»çþg~tõ¼²–‹÷“=':N S1`A% ¦æK=i«ügÝ[•Z…‚_ k_¡›c#êA]¤­ b„ø$Õ„îÝ8›ÆgÇù^ûÎo‚‰Âˆ´UaŒl4 ôêÃ-¸T¼ …N6DJIŒ~%H‚¿∴UA‚´´«1‰ÁmrÙÖ¸-ý–L?ññV ¥ òÓ³ÀÐÜE]ÄÖ-¦j¸X¼H{k;¥ååå7¼@ °ä YîºOF ®ék´íi£´R¢ÿA?­±KŠl³Û1!à? PÍïGöáõÚkúöS¯×)( `•µTw5µN(Il?ò»Va ܘ»1ìŽPn3"Ti+ZΡlÿ‡µP]Nô Lý+~;3ôIEND®B`‚ColorCode-0.8.5/img/games-highscores_tab.png0000644000175000017500000000414112610773251017405 0ustar dirkdirk‰PNG  IHDR w}YsRGB®ÎéIDATH ï÷X.¨ÒÿT*þý õñðþÿÿñ¬Õÿ ÿÊõûþ ÿþÿì5ï‹Tþýøø·ü üýþýÿ;Nd ­’ÿþÿu¬ý üþþý ÿ%2=Ò»˜üüùþ†KzµÿŠS€ûùÿýúü ÿ þþ þýûóåÿüö üûÿÿzµÿ 0MëÜÆëÞÏýüþ  ýþþGüóÙ0ÿ  ü!&÷äÃ%6OüîÒÿþýþþýòÞëÙ¹ ýÿÿÿÿÌ$ þ9*÷éÒþú÷®nÿû÷ÿ0Kþ÷êÖ¾ÿÿÿÿþÿýÿ ) 'OöãÆôÝ ÿÿ#:P7[ûí ÿÿÿÿÿÿÿÿì×ÿüêÑÿ ÿ ÿíÆïÈÙÿøúüþÿþýýýÿÿÿÿ1üôí   îÿüêýïêþûÿþþüÿýüûüóßÿ*ëÅ %  ÿûùÿüöðÿýýüÿûûõöòõþôðÓÆý  "Ô=(Õã ÷û üý ÿÿ ÿ ÿÿ ùöõóó ô-÷÷Ò ÏȪ¯IEND®B`‚ColorCode-0.8.5/img/same_color_1.png0000755000175000017500000000115212610773251015674 0ustar dirkdirk‰PNG  IHDRóÿatEXtSoftwareAdobe ImageReadyqÉe< IDATxÚì“ÏkÓ`Ç¿IÓ$ÍÖµnµ¥“v¨0¥…uT†(X=h‰*œxòÒ«°ƒˆ2tGADˆ ºƒøƒí<=8·ÎlÒ9«në’Ú-m’ƤMÚøŠþ;xñïåù|ßçù¾/¼”ëºØNÑØfýûÌÄãG0KÖ¨¥‹fÿ»³†ÑàCÕäÌáðñ;ž.REÅVѹgîª+µVÝkz:œt|*í‹jßÂ8}~<'ÌUàM~ú„]•Ĭïò1mÕÂVzjž_ ж u˜Î¿tĉ˜Ýmñù€@âÚeÀß„€…™ÒØõ€eÔð¼èc è6Y€‡˜Z6°TyŸ‹§Zm›ô´Í¿Ü: Òh àÎ^`Z§É$V#4u"’¢Aà:7Ìšæ•¿îü9lj@x\2Ôç:Éfèva±TÉÔÀ2y‡‹E*𾳆îo,EÒ«É€B’Ö€8Î>>}—ÞÓ›=7OÊ ý;1•Öp³gB£WX//íÆO:£c¶Áo^&K’ÞÔf64’a)þ35ùì ‚ÌN(-%™¯½½äØM~Ç©t﫚-#èÐÍôbÅZ?©EâÔ„zȸ|As* þÿü`ljç÷Å,BIEND®B`‚ColorCode-0.8.5/img/cc32.png0000644000175000017500000001020412610773251014056 0ustar dirkdirk‰PNG  IHDR szzôsRGB®ÎétIMEÙ -SÉ¢+IDATX  ßïrrrƒåÜ×|û      ÿÿÿýýüÞßãàßâ  ÷ý úúü„“’Œ}†ˆˆ/ĽºÐÔÿ `|ùúùýòûïöôæCýÇñ ÿÿÿêêꪩ«nhYU! üýöþ÷øõñÿÖÜÿ»Ìåèå0˜—™Ñ‰Š‹/«£¡Ðåi‹hoþ þýûûýüþÿòý Êö(ÿã æææ³²ÇÅX45ÿýüÿüûþþýüí4#âïø-h'°ÌÌÌéÿüèåhŒ>=ÿ÷ýþÿÿüüÿÿýÿÿüÿüýüÙî þñÿœšÍÏhþüþýÿÿüÿþþþþþþþþÿü,Úáñ/h¹º¿srrƒÀñ=hnÿ÷ýÿüþÿüþüþûÿûÿÿúþÿüÿûýýÓé7Þ©ª±‰( ÿýÿÿûÿÿüÿýþûþýÿþýÿþþýþýü ôÿTãÜ×|`zýîùÿøýÿúÿÿûÿüÿþÿþÿÿÿÿÅë ýüûÿûä38ÿü÷ÿýøÿýúÿûþþþÿÿÿÿÿÿÿÿÜ"|üúöýÿÿÿûÿüþÿûþûþÿþþþÿÿýþÿþÿÔðÿéííôHCþóôþÿýÿÿþÿþúþýþüþþÿÿþþÿþÿ è úûûýÿþÿúþÿûÿÿûÿÿúÿÿûÿþüþþþìóôôî$ üúøÿþÿþþÿüÿýüÿþýþýþþÿÿÿÿÿþ ö ýñûþýþÿüþÿúÿþùþùþÿûþÿùþÿýÿÿüÿþý ûøÿÿÿÿþüÿýüüûÿýüÿýýÿýýþýÿþøùþ ïöþÿÿþþÿúÿùþþøþÿøþûþÿúþÿûþ ôñé üòÿÿÿÿþýÿýþÿýüÿýüüüÿýýÿüýýúéóõææúÿýÿÿüÿÿûþÿ÷þÿúþÿùýÿûÿýùÿ.èÄØûàÿÿÿýÿþþýüÿûýýüüýþþüùüäó BûÆøñÿýóûþóýþôýýôüþöýþôýÿøýÿ÷üþ÷ýÿùýúôW5'ÔÚÿúöþùøÿúùþúøþúúþùúþúûûûÿûüÿüûüûÒé*þÿòEÔøïþþóûþóûþôýÿòûÿõüþõüþ÷þÿùþõðûs;Ü&$ Êà4õðÿùùþùøÿúúÿùùÿûúÿúûÿûúÿúüüüëð Íê: ?÷Òú¯ã)ÿÿþþÿüþûÿüùÿúó}@ÜE6"ÿÿÿ110²ÒB$º áýÿÿþþþþÿýÿûôßíÃèJ øøø“““ÿýüúïøÆë Óðìòÿü ó.èX6ÿÿÿþþþÞßåøÒ&ÙãõøüéòØî*ó"ùùùúúú“““ÿýüûÿûþþþþþþÿÿÿþþþêëîøùýýþÿýüúøøøûûûùùùúúúíîôôõî ÿðîçööö ýüü¤®¯úÝÚBþ÷æ×*.,,% ÿÿÿÿÿÿÿÿÿÿÿÿÓÓÓ©©©666ùùùÖÖÖúúú ÿÿÿãä䪜š™î6ý÷ôýøúýûØÔø¿¼Ý06ËTU200ÿÿÿ•••ìììúúúþþþþþþÿÿÿììì¿¿¿íííÿÿÿIII€ííí²“Îêÿüûþÿþÿþýý åè ÏÑØ""ÿÿÿÿÿÿ–––––– ý$$$öööäääþþþ©¬­Áòûÿÿÿÿÿïï› àççÿÿÿÿÿÿÔÔÔììì„„„û666úúúÝââgòâýÿýýýþýÿþÿÿÿ Ø×õÄÇþþþ¨¨¨‰‰‰ýýúÿ999õõõáãäTúùþûÿýÿþÿýÿÿÿÿÿÿ  ÊÍëîîììì üú ùüúÿÿþÿýÿýþýÿÿþÿÿÿÿÿÿÚÝúþþíææ666úúúÿÿÿþþÿÿÿÿÿÿ üúþûþþþýÿüÿüÿüüÿþýÿÿõöýÿöööþþþÿÿþþþýÿÿÿÿÿÿÿÿÿ  öÿÿÿÿÿÿþÿýÿüþüÿûÿýýÿýÿü ýûû ùùùþþþýýþÿÿüÿÿÿÿÿþÿþþÿÿþþþóóóþï ûøþýÿþüÿûþüÿüÿúÿüÿ÷%"þþ×××ÿÿÿýýÿþþÿÿÿüüÿÿýýýüüüÿÿÿéééûþý„Þ*/ÿùûÿùþúþùþúÿúþùÿûÿûûÿüÿú÷ùô72ùùùìììùùúýýÿýýýýþþþþüüþþüüþûûûûûûïïïÿæææ„‚ÿE™™ýûÿþþýÿýúÿûÿùýðürgöööùùùOOOÿÿÿÿÿýýþûûûúúúúúú´´´pppåææ0Ìbbøýøýøþùøÿù÷þùÿùüÿòòcYÿÿûûûûûûõõõÈÈÈùùùöööøøøøøúùùúøøù÷÷÷÷÷÷úúúÆÆÆ×××0hhg/"Ð,¶ºÿÕÖÿýÿýúüøýÿð:7ôNE ÿÿÿììì999 ÿÿÿÿÿÿñññÿÀÀÀÙÙÙ0˜˜˜Ñu€ƒüþ| Üà ôõúÿÿö÷*%ÿÿÿùùùööö ôôôèèèååå„ŽŽŽ} ƒ'¹mALÞIEND®B`‚ColorCode-0.8.5/img/history.png0000644000175000017500000000203112610773251015024 0ustar dirkdirk‰PNG  IHDRóÿa pHYs  šœgAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅFIDATxÚbd@*ñ»þÿùðï÷oû¿ÿ*üûõ›áßï?þþü}ðߟ?^Mü€¬ €‘9ª‰{þÿý;ÿŸ§€©¡8ƒªß¿ÿ®=úÄpæÄ#†_ן|ø÷ëO⻋™`zŽÔ’÷ÍWË<ø?mã“ÿ·?ýùÿíïÿÿK¯ÿ¯™xâÿ£ïÿÿŸÿðïîšûÿE¬çýçSí›Ó@0ÍêY‡þO½òåÿËŸÿÿ¿ýõÿÿ; ¾pÿãÿ“7ßý¿ÿíÿÿŸüÿÿwžýô_ÐhÚ.©¶^€bVMÚ+Àðïÿ~'?uŽx#!†ÿ@Á@ t9';'Ão @yF"ñû¼~‰ 2\Ù~Ƀ‰Õv&@1ýÿû/€KŠO ÒBœáPáÏ¿ü„A| .KOdؽiƒ±³Ã €¬ž,Ÿª„À¿?ˆéÿŸ¿ö *B ,L` üJƒ )jÞÔ\0m9Ã_M;†ýO¾2Üÿø“AÎQ;öÄŠ*1aN†¥ëo2Ø›I2ÈHó10㦯²íû† K0¸gU2¼øÉÈ ôÛ¯? 7Þf–à @L@‚(ñæõg†7_ÿÈÀðˆï?xÀ`ooäÓÚæ¦x1püúÊÀËôŸõëWN -ÿÿ3 (‘|}÷•Á2Ȉhõ‡Ÿÿ8˜ÿ3ôÏe¸vüü·xE%€ÞùÏðã? 7/3ƒC¬ÃñµgAf?  ¿Þ:ù ÁÒZŽ•‰<¬Œ ¢‚ A K€±ðŸáÛŸÿ ŸÑÁ é?ÿ®m¹2à @½ðwãkÏ?¼¼ýŠ è,^ f>6&~6FV0æccc \@ žœ}ÀðàÌ}P’Þ@LÏ÷Eƒ“çÊ)‡þýø 6„›™èR†oŸ~2|zȉƒüý÷ë†Ek@¶'ƒú@1ƒXßžnºñÓYáøž›êj" ʲü@¯00¬Úpáꙇ æær@g30œ:|—¡*rÃë'ï'5Oé ”ÌÄ«ÜÌ}ó ¥"BtTäøþþýÇpóÞ;†e‹Nƒ øµž™ˆ=SqŠ·€SÐ { VEóÿÿ€ äg³‘Õô&ŸF‘ûð¡IEND®B`‚ColorCode-0.8.5/img/bookmark_add.png0000644000175000017500000000137312610773251015750 0ustar dirkdirk‰PNG  IHDRóÿaÂIDAT8}’MhTg†ŸïÞ›› 77ó£Q£É$Ä‚…h@´"X‰«ÚU‘P]((ˆJMWЏh(´BŒ&Sݨ i7m©±RL)ºP¡ÿ±&Ú¦·ãÌt~2¹wîÏ×Eˆ8àxà,Î9ïyàp^¤”Tʱ mý#­½ïÓT UZçþ¹j¿~:_È¥3ùLÒÊe“ÓÓSÖÌPM熵«?A—àÙ sPÈ€óJ•/ÆÿfâuÕ¯2ëÍÀ<³skœ|lcò¯ÉœvÿñŸÝn±úh˦NU·¡”éBàAàƒ/ù%c°½k 7®áLO0öàî÷“©ìI¥ï9õû´u`üöí1?‚bŠ˜sÀvÁñÈ“§ÚЩ6t®?ŸaôÞoßM¤³‡úrFH)8sX4v¬_Þ¾®¡°ùZ×/Q£„(ijì>² €Äþb*U¸b›h!=tç à‡¡þO×7žBJÚoš|°g‹š£4EâÌÙs蚎çxàÂÈ©ÑѲ7Ö‡ôU¸ø®ë•ý[ø”|UÕJ.¥°]ª®ÄñÅÜüöW‚¸‡!b4o‹`ßÒ¨5 ‚œ$V­zì‹?kª¤ó®s¶iêî“‚sIµDèË‘ˆFæ^þË>õ¡Þ7$Ý2'ê‚¥NIw¦’÷ÿø/uqVÊŸ>’Ö`PȈDáÕì¼÷A•F °ÊÌŒXÖG2Ù7$_,ô{ÏÉ ±w-Ö6KŒeà=›]˜ÿü6pé;£mIEND®B`‚ColorCode-0.8.5/img/same_color_0.png0000755000175000017500000000140612610773251015675 0ustar dirkdirk‰PNG  IHDRóÿatEXtSoftwareAdobe ImageReadyqÉe<¨IDATxÚ¤“[HaÇÿßìÌÞ¦h½d7ÊD[Ô•52Š*£‡ÊÒ(ëA+D "衇¢Ç žz |HÔ +èò ],ÁJ C%5aÍ.›Êº×uÝÙ[g¶m©— <Ìÿ˜9¿sÎ÷ó1]×±ão·µ!!ÅòûŒ3acÎ dçæcßûKȘÄ´ÿIÒ5ÒÐC”ŸiEåî?’pi-©j BmÁ:§ƒ_´A:`²X–m†‰3þh¿áºœ6½Äxs¼áX‰ðòx¾çQÏüÖö>»`’WAà¬F”cä×™¢`ÄT6<–v=ãT |dÒŒ`îÀ-vâF£]Ð }ú_퇊+Uñ)AwÓ°L ÔdIH8,늾ÛÀÍØ<Ç¥ªÎF‘`6˜¢@˜vYòµµÁá}ó¶œT pº(Ó!æ?9_Xî,åÂ9£»ë4¢ÓÀB €SƒÀÕòf fœ’‘YU€³´ëOÛŠLÀôÂo àÕóœÏC¢íŽ\Û4¾ ÈN²¨d…Ôà$¸ pS@UªP¥Ì¬ÌqEâÁû¾ñÍñîp¤‡àç)Ø(ݘ1YDu¦ˆ—y@!Uâóc_€\VæÏ³8ïp.Ñþ®B«¯jzmGsïpªƒ—õC7£Žúëåz<À4(\Êþì–Ú¦‡™Ül¡žg¹Y$:Ì©ÌdWPs¯7¾¡iç 1èÚær–FjÅ<»É^Úžc¡ˆÏ/ÒüêSÕÉÃ2ýwõÃy®€óƒò<¬º{¸ØºwX–#ÔYÄÔE˜hìyIÿ‰äš†k»ÞÂÙR€™@œzÈqg›qÞ]¥éñi¸ÆI‚EîøâŒÑ íæ6vƒ]lÜZ‡ï‹h7Jí$žw8 ϘGˆ8|-ÞBt/B°€2.V‹µB¨ß­ÃÒ m©¾ÞW—çö‰"óD¯‡ôN‚µà&ZwZ0í i¬¿$ÿ‚YÛà€r„"H©gõLvvßn¸JŒÎric”ùÔ´˜Lô5„)bC—5Ì(à¸Öt'\üÏ!FôMPŸ®e\ [ª»èÄÈá©Ì¾pmñ8¤„> ëÎP. ‡–ØOìyúDäØü\iØK‡²Ó‰¢Õ¸”nZËl‹.Ò&áY<ä¹b#på@ _Ø(86Ê܇jhcà ð4¤ô¯X¥‹¡”˪•­E¿©¯¢Ô*ËÃZŽbõº¿#”Ë;sçyî Çl²&ÉþL|»ÚåØã%ÛKôkñVz9{;ûNc+ü¦ç¦›ô0® a÷`ŒCšƒ1Zý ŠÜ©F×åé°)—|‡œýÇD^î>à¾år¯2Vdñ±í²„u‹áî\ÛèkYÞSox;ï\"ç~ç|À‹¹ž°7”³à‡\ïçÆuìãQrkIpß,IEND®B`‚ColorCode-0.8.5/img/configure.png0000644000175000017500000000203712610773251015312 0ustar dirkdirk‰PNG  IHDRóÿagAMA¯È7ŠétEXtSoftwareAdobe ImageReadyqÉe<±IDATxÚbìéYÄ --ÎÀÀð_턦¦’ô¿ÿ¿}ûñųg¯&~þü}þïß¾222ÀÁ¿LMµ¬¬ôˆéÇ_ ~aàåådÐÑQË ó7WW[E` ­xñâÍAgg³Luu†¿5²0¼{÷áñ³÷Ï…þÜüäÌ»‹áÐ_µZÃÁËÍ›XYéky{Ûj½~ýNKEE–áýû@©ÀÀbfxýú=×oÿÄ=9÷ê3}¸òñÃgx ³˜˜æŸÿÿ|54äDD¾}ûÅðïß``ýexôèÇ/ òœw”$ûþýõïÏ÷ïÿO1r 1ÈÚ&³‚‚ A¾ÿ((9ÍØØÞýêêï:ÿÿööøêêí÷÷ø ìÆå‘øåIóöôòééÇñèØÿ ÿˆ14´”áË—/@ ?½999ìyy¹4¾~ýùBHLÒ0ÌAÀDæÕ$©ß÷D€Ö}ãdexÄÈûçîmæâ¯_Lúüí/@±€üÁÈÈÄÀÊʲÊ[?}úÆù‘黨¿½æÿ/Þܦ¤õQˆ— ì_îÿ ÊL?Xþþçì»r•a@1kk[ƒÇ¿ÿ€^`øÏÈöG‚óCìé§_>ÿûÆÆÃæ*¡ÆÊÌÀÏÎÀ¤˜ÿþgåúÅô‰ÙãùkÆ—Ä€üg`døõ—iÊ‘3 l¿þ3ô˜º±22¼ûÁÀðà ãŸÿ ºÂ¿ r7NÀQÄÌÀL[}ûŽ0üùùýGŸê_f`â}ÿ› ˜È¸™þ ^`†½6i׆ŸÏþ÷9[±03°ÿgxÿ’áÊ#æKDÐpzZúhÈ-N†{/Ô ñ0°ß{Ï~ýí¦€ïax¨`a&IEND®B`‚ColorCode-0.8.5/img/history_tab.png0000644000175000017500000000414112610773251015656 0ustar dirkdirk‰PNG  IHDR w}YsRGB®ÎéIDATH ï÷$_»ÿüþPþûû?þûý þúûþûüàýùûÁþüü°êÅað%a½PÿýýŸþ 51% üýÿÖâòÌÈâú×äðþúüaîÑi°&c¾Ÿ&iÁÿf±äÿÛòüÿöýÿÿˆ¥×ÿ|‘Èÿâ÷ÿÿÏðþÿm¬ßÿ;žÿ%ŽŸ&c¾P'jÂÿ•ÔôÿéùÿÿíúÿÿîúÿÿÐßñÿÉÙîÿßöÿÿØóÿÿÐñÿÿ‰Íòÿ2–ÿ †P%b½þÿ¿BN'_2ÿþýÿ   ûþwhaÆÀ¾KPPúÔ·ÒH=™ÿýþP Y8úþùýùýøýøþùþvga»²®3CJìùþ.%þüýPÿüý? $øþøþ÷þøþøýwgaº²®p–§ý)>¿äõßñùA)þûü?þûý  ¥¯Ù?6Žyq÷ð°¥ GjyèùÿúüÙÁÛþûü þûüÿìëóìõýìùíùßàà???¹–‡dJúõ ÿõõ ÿÿþûüàõîõ9R2ðùÿÿpÖÇÀžÈÚ øýÿøÿ @]8Ç­ÍàþûûÁÚÉà`9;   PRÿÿûþÿöüÿóûþúþüÿÖ´ÐÁþûý°âÖçðéÛê    äÍààÌßð°ç¾[ðþúüa©”Ãþøû   öòùóîõ   ýõø¢x¬aŽðö岨þ C ǼÙ0'&# ª°×ÕÌá77üÿÊÃÝzYœëä #PþúûŸ31XT-$ýýþÙÞËÊÃÝðaް „þüýPþúû?þúû þûüÿþÿàÁ°Žð€)ŸFhú5#IEND®B`‚ColorCode-0.8.5/img/bookmark_tab.png0000644000175000017500000000414112610773251015762 0ustar dirkdirk‰PNG  IHDR w}YsRGB®ÎéIDATH ï÷»™*‚³"n–o"÷è¥øìÙë’i)/7x  "')n•mEQ`•þþ %Çš¸Íû“kL8/11ˆ&.15÷òúö óìß8$íÑH4÷·Ëÿ´‡p ?    ÿüÿÿõòóóôòîïóïëéòñëâÁ!³>@@LÿüøÿÿýýÿÿÿþóöÍ×ßlûöö @:7Cøúòÿûþüþýýÿþýÿ ùø »ÎÈ­¹Íñ/%õÁöïê+ #üôûùûýüýüþûüûúúùúóùÿºÒÕ©ÛïókºÌñ/'ø¿úõö/! "üÿüÿüÿüÿüþýÿþúÿÿ¹Ùæ«Ùðõjt—ít˜äïõùÆùüùýúýùýùýùþùþùýïøú»t—î 'ûþýþþÿýýýþ)ü#ùüýìô÷÷ ÿýüû*‘k7 z  îòÿùÆäìÅÁéí„Öðõ½ö÷ÿ û÷÷,ù˜¹ËþùúÇáëÍÒðíšõÿÿ±s–é‘lÿÌóð´ÚôñV2 dÿ é“lÿ3ùÿÛr–à‘lþþ&þÉm”ô7ì_eœìIEND®B`‚ColorCode-0.8.5/img/story-editor.png0000644000175000017500000000137412610773251016000 0ustar dirkdirk‰PNG  IHDRóÿasBIT|dˆ pHYs»»:ìãâtEXtSoftwarewww.inkscape.org›î<yIDAT8•‘[HTA€¿9{ÚÝvm5Ô4+3ì¢RTdt¡ËK$[¡‰t¨‡¢¢H"}‰Œ ‚ˆØŠBR¨ ÝN²„‚ˆ¢è¡¢2´‹éºž\÷ÒÙþt7-‰˜ùg¾ïÿg~%"TUU €¦iÔÖÖ*†Æïñã;UÞyÿÄ{ù3Š^…Ãá ])5 (îêêJ0(¥Êëáñy³'ïj<±ò°ñðAOkëç…‡£^eÔÐØPмx)µ†IiJÚ ÅÂao"=c¯øÎ]P)Ím¾k‘˜>x••¤ºdyRȲRø‰àsæ‹ÙÏ~[´ÛðßÌTuuu|뜸´èòœ¤€}ftFˆL{€þØwÖ8¿19ÏÍÁ‹™¬^x¯ÝzÓç|Óéô–ì—AÁ R$h.…Ý¥¡;l,øbËÔ4¶W{˜5×âÈöìñ='ËK6¿}™xrY(’îîn ÒÛÛ+Á`PLÓ”×O¯ŠÙV,+–ÊÆõ‹¥çÑ9´ÙsTDHL5$hŒF£†R MÓð{ÖÎl¢¢:Ä@ÌÎõ“9è9[qç–—‹HS"»>Ô6”R”––b³Ùˆôw2®ó4{N ¿ ·|ùÄS—á™’ì.# ‰¦iX1ׇ«·¸ÿØÄ8[ˆ›Ëø‚}À#*0 ƒ@G¯\¹åì¡ „B}<Xɺù£ò¿*Ð4 ¯×ËýÛ23ÒÉɾÃôI¹«üÌÖ]£Ó€6\ÐÒrƒ1ò gü–Gú¢+Øþÿñç}g°kÊ7ídwõ¶¿‚#º®#"4ûïb·Ûÿ L&fóþƒy,"Áü¨<1Ý<IEND®B`‚ColorCode-0.8.5/img/document-new_tab.png0000644000175000017500000000414112610773251016562 0ustar dirkdirk‰PNG  IHDR w}YsRGB®ÎéIDATH ï÷*uN)3)_22ÏçÏéÖõÖ†a˜*êêêÅþÿÿŸÞž§ð§BB‡*‡{Öy ë •ËËÿþÿ’×’ç÷çÇß±àç±þüèþuèïèöYö¥CÖ”ÿÿ¡1Ë_ÿe±Îÿæt)tÿ æÒÑþþ ŠeeŽåŽ ° öäƒHš:òòòÅ;Æþþþþþþõõöÿûâââæææ ¶·¹ÉÐ:öööÿøøøÿúúúÿûûûÿüüüÿýýýÿþþþÿûûûÿÄÄÄÿýýýÿ€……Õ :ö÷÷ÿøøøÿúúúÿûûûÿüüüÿýýýÿþþþÿôôôÿÌÌÌÿ~ƒƒÕ9ö÷÷þùùùÿûûûÿûûûÿüüüÿýýýÿÿÿÿÿééêþ~Ç 2ûÐû"œÚGå%IIEND®B`‚ColorCode-0.8.5/img/colorcode32.xpm0000644000175000017500000002701312610773251015470 0ustar dirkdirk/* XPM */ static char * colorcode32_xpm[] = { "32 32 597 2", " c None", ". c #727272", "+ c #574E49", "@ c #52575C", "# c #54606B", "$ c #616D78", "% c #757779", "& c #86807B", "* c #8B8B8B", "= c #929292", "- c #939393", "; c #8F8F8E", "> c #6D6E71", ", c #4D4D53", "' c #656155", ") c #746E5D", "! c #7C776D", "~ c #737478", "{ c #6D6E74", "] c #4A4542", "^ c #1E4C60", "/ c #27ACDC", "( c #20BDF8", "_ c #1AB6F9", ": c #17A8F4", "< c #1B97EA", "[ c #338BD0", "} c #768897", "| c #8D8A88", "1 c #9A9A9A", "2 c #999999", "3 c #848484", "4 c #2E2D2F", "5 c #9C954A", "6 c #F5EA6B", "7 c #FFF467", "8 c #FFF15D", "9 c #FDE855", "0 c #F2D954", "a c #C8B567", "b c #838182", "c c #322C2A", "d c #23A1C1", "e c #28DEFF", "f c #25CCF8", "g c #22C2F5", "h c #20B7F2", "i c #1EACEF", "j c #1C9FEB", "k c #1992E7", "l c #1183E7", "m c #568ABA", "n c #94918D", "o c #A0A0A0", "p c #838383", "q c #363520", "r c #F9F67F", "s c #FEFA80", "t c #FBF474", "u c #FAF06C", "v c #F8EB62", "w c #F8E65B", "x c #F6E053", "y c #F7DB4A", "z c #F1D148", "A c #9B9584", "B c #4A4441", "C c #23A0C1", "D c #29DEFE", "E c #27D5FB", "F c #26CEF8", "G c #23C4F6", "H c #21B9F3", "I c #1EAFF0", "J c #1CA3EC", "K c #1A96E9", "L c #1789E4", "M c #0F77E2", "N c #5E89B5", "O c #9D9C9B", "P c #A5A5A5", "Q c #A2A2A1", "R c #2E2C21", "S c #FFFF88", "T c #FDFA85", "U c #FDF87E", "V c #FCF476", "W c #FAF16D", "X c #F9ED65", "Y c #F8E75E", "Z c #F7E156", "` c #F5DC4E", " . c #F4D547", ".. c #F3CE3F", "+. c #8E8C83", "@. c #737272", "#. c #1E4C61", "$. c #26D1F9", "%. c #25CBF8", "&. c #22C3F5", "*. c #1FAFF0", "=. c #1A98E9", "-. c #188BE6", ";. c #177EE1", ">. c #0D6CDE", ",. c #8C949A", "'. c #ADADAD", "). c #505158", "!. c #CCC764", "~. c #FDFA81", "{. c #FDF980", "]. c #FCF77A", "^. c #F9ED64", "/. c #F9E85E", "(. c #F7E257", "_. c #F5DD50", ":. c #F4D649", "<. c #F3CF40", "[. c #E0C055", "}. c #72757E", "|. c #564E49", "1. c #26ACDB", "2. c #26CDF8", "3. c #24C6F7", "4. c #22BFF5", "5. c #20B7F3", "6. c #1EADF0", "7. c #1CA2ED", "8. c #1A97E9", "9. c #167EE1", "0. c #146FDD", "a. c #517FBA", "b. c #AAA9A8", "c. c #AEAEAE", "d. c #4F4C3C", "e. c #FFFF78", "f. c #FCF678", "g. c #FBF36F", "h. c #FAEF6B", "i. c #F9EB63", "j. c #F6E256", "k. c #F6DC4F", "l. c #F4D749", "m. c #F2CF42", "n. c #F4C831", "o. c #948F82", "p. c #52565B", "q. c #20BCF8", "r. c #22BEF5", "s. c #21BAF3", "t. c #1FB2F1", "u. c #1EA8EE", "v. c #1BA0EB", "w. c #1A95E8", "x. c #1788E4", "y. c #157CE1", "z. c #1570DC", "A. c #256FCF", "B. c #ABA8A3", "C. c #9B9B9C", "D. c #978F51", "E. c #FDF26C", "F. c #FAF270", "G. c #FBF270", "H. c #FBF16D", "I. c #FAF06B", "J. c #F9E960", "K. c #F8E55A", "L. c #F6E054", "M. c #F3CE40", "N. c #F3C838", "O. c #B4A06A", "P. c #53606B", "Q. c #1AB7F9", "R. c #1FB1F1", "S. c #1EACF0", "T. c #1DA3ED", "U. c #1A9AEA", "V. c #1990E7", "W. c #1786E4", "X. c #1678DF", "Y. c #146EDC", "Z. c #1161D4", "`. c #B2AEA7", " + c #8F8F91", ".+ c #B3A95C", "++ c #F9EC64", "@+ c #F9EE67", "#+ c #FAEF69", "$+ c #FAEE67", "%+ c #F9EC65", "&+ c #F9EB61", "*+ c #F8E65C", "=+ c #F7E357", "-+ c #F6DE51", ";+ c #F5DA4C", ">+ c #F4D446", ",+ c #F2CD40", "'+ c #F1C639", ")+ c #C8AD60", "!+ c #626E78", "~+ c #1FADF0", "{+ c #1EA9EE", "]+ c #1B9CEB", "^+ c #1A93E8", "/+ c #188BE5", "(+ c #167FE2", "_+ c #1575DE", ":+ c #136ADB", "<+ c #125FD1", "[+ c #B5B0AA", "}+ c #9C9C9D", "|+ c #B7AC61", "1+ c #F9E75C", "2+ c #F8E95F", "3+ c #F9E95F", "4+ c #F8E85F", "5+ c #F7DF52", "6+ c #F5DB4D", "7+ c #F3D143", "8+ c #F2CB3D", "9+ c #F1C537", "0+ c #C0A65E", "a+ c #1783E3", "b+ c #167AE0", "c+ c #146FDC", "d+ c #1265D9", "e+ c #2D6BC5", "f+ c #B9B6B2", "g+ c #B2B2B2", "h+ c #A89B6A", "i+ c #F9E353", "j+ c #F7E457", "k+ c #F7E459", "l+ c #F7E458", "m+ c #F7E254", "n+ c #F6DF52", "o+ c #F4D849", "p+ c #F4D345", "q+ c #F2CE40", "r+ c #F1C73A", "s+ c #F3C231", "t+ c #A9996C", "u+ c #857F7B", "v+ c #338CD0", "w+ c #1991E8", "x+ c #1A94E8", "y+ c #1782E3", "z+ c #167CE1", "A+ c #1573DD", "B+ c #0F5ED8", "C+ c #5B7CAD", "D+ c #C7C7C7", "E+ c #C8C8C8", "F+ c #8C8A84", "G+ c #FADE4A", "H+ c #F6DE50", "I+ c #F6DF51", "J+ c #F6DE52", "K+ c #F6DD4F", "L+ c #F5D849", "M+ c #F3D346", "N+ c #F3D041", "O+ c #F2CA3D", "P+ c #F1C538", "Q+ c #EFBB2D", "R+ c #8D8C89", "S+ c #8C8C8D", "T+ c #758796", "U+ c #1182E7", "V+ c #136ADA", "W+ c #1263D8", "X+ c #1158CC", "Y+ c #B2B1AE", "Z+ c #C9C9C9", "`+ c #A5A7AB", " @ c #CEB865", ".@ c #F5D846", "+@ c #F5D94B", "@@ c #F4D84A", "#@ c #F3D447", "$@ c #F3D244", "%@ c #F3CE41", "&@ c #F1C638", "*@ c #F1C133", "=@ c #C1A457", "-@ c #8B8B8D", ";@ c #5689BB", ">@ c #0F78E2", ",@ c #1574DE", "'@ c #0753D3", ")@ c #8493A8", "!@ c #CBCBCB", "~@ c #CACACA", "{@ c #989899", "]@ c #EAC84D", "^@ c #F3D142", "/@ c #F3D243", "(@ c #F3D042", "_@ c #F2CF41", ":@ c #F2CC3F", "<@ c #F2C93B", "[@ c #F1C539", "}@ c #F1C234", "|@ c #DCB13D", "1@ c #8E8E91", "2@ c #95918D", "3@ c #1365D9", "4@ c #1058CB", "5@ c #8493A7", "6@ c #CCCCCC", "7@ c #9C9B9B", "8@ c #DEBF55", "9@ c #F5CB36", "0@ c #F1C83B", "a@ c #F0C338", "b@ c #F2BE2C", "c@ c #D1AB49", "d@ c #949393", "e@ c #9D9C9A", "f@ c #527FBA", "g@ c #1161D5", "h@ c #1260D1", "i@ c #2D6AC4", "j@ c #5B7BAC", "k@ c #B3B1AE", "l@ c #CDCDCD", "m@ c #CECECE", "n@ c #CCCCCB", "o@ c #AAABB0", "p@ c #AFA382", "q@ c #D5B65B", "r@ c #E9BE3E", "s@ c #EEBF33", "t@ c #E6BB3B", "u@ c #CFAD54", "v@ c #A79B7E", "w@ c #9A9CA0", "x@ c #B3AEA7", "y@ c #B5B0AB", "z@ c #B8B6B2", "A@ c #B1B2B5", "B@ c #A9ABB2", "C@ c #A6A9B1", "D@ c #A3A5AB", "E@ c #A8A9AB", "F@ c #9B9C9C", "G@ c #8F9191", "H@ c #9C9E9E", "I@ c #C8C7C7", "J@ c #B4B4B4", "K@ c #8F8F8F", "L@ c #ABABAB", "M@ c #A2A1A1", "N@ c #515B5C", "O@ c #4B3836", "P@ c #8D362D", "Q@ c #A63A30", "R@ c #A83F38", "S@ c #985652", "T@ c #898080", "U@ c #A7ACAC", "V@ c #9F9F9F", "W@ c #484848", "X@ c #595959", "Y@ c #A3A3A3", "Z@ c #9C9C9C", "`@ c #818181", " # c #7B7B7B", ".# c #9B9B9B", "+# c #838484", "@# c #2D201E", "## c #C6260C", "$# c #FC2303", "%# c #F02007", "&# c #E8200B", "*# c #E21D0D", "=# c #DD170C", "-# c #D5150E", ";# c #B24544", "># c #979999", ",# c #616161", "'# c #4D4D4D", ")# c #D7D7D7", "!# c #F5F5F5", "~# c #EFEFEF", "{# c #EDEDED", "]# c #EBEBEB", "^# c #EAEAEA", "/# c #D6D6D6", "(# c #959595", "_# c #888888", ":# c #351612", "<# c #FF2A02", "[# c #F92703", "}# c #F52605", "|# c #F02208", "1# c #EA200A", "2# c #E41F0C", "3# c #DD1C0F", "4# c #D61A11", "5# c #CD1412", "6# c #BF2526", "7# c #9C9999", "8# c #626262", "9# c #717171", "0# c #F3F3EF", "a# c #F6F6EF", "b# c #F6F6F0", "c# c #F3F3F0", "d# c #F0F0EF", "e# c #E9E9E9", "f# c #E3E3E3", "g# c #868686", "h# c #909090", "i# c #2C2F30", "j# c #F62904", "k# c #FA2902", "l# c #F82704", "m# c #F52506", "n# c #F12308", "o# c #EA210A", "p# c #E51F0D", "q# c #DE1C0E", "r# c #D81A10", "s# c #CF1714", "t# c #C71415", "u# c #B53439", "v# c #ABB2B2", "w# c #4E4E4E", "x# c #F5F5F0", "y# c #F9F9F2", "z# c #F9F9F5", "A# c #F9F9F4", "B# c #F8F8F2", "C# c #F7F7F0", "D# c #F1F1F0", "E# c #E8E8E8", "F# c #E1E1E1", "G# c #8C8C8C", "H# c #6D7272", "I# c #932112", "J# c #F92603", "K# c #F72605", "L# c #F22406", "M# c #EF2209", "N# c #E41E0D", "O# c #DE1C0F", "P# c #D01814", "Q# c #C71615", "R# c #BF0C10", "S# c #A07679", "T# c #F2F2EF", "U# c #FCFCF9", "V# c #FDFDFB", "W# c #FAFAF6", "X# c #F4F4EF", "Y# c #EEEEEF", "Z# c #E4E4E4", "`# c #D3D3D3", " $ c #4E5556", ".$ c #E7250C", "+$ c #F22407", "@$ c #F22506", "#$ c #F02307", "$$ c #EC2109", "%$ c #E9200B", "&$ c #D81A11", "*$ c #BF1518", "=$ c #AC4046", "-$ c #B2B5B5", ";$ c #B5B5B5", ">$ c #FDFDFD", ",$ c #FBFBF6", "'$ c #F8F8F0", ")$ c #F0F0F0", "!$ c #E0E0E0", "~$ c #615150", "{$ c #F01E08", "]$ c #EC2209", "^$ c #EE2309", "/$ c #EE2208", "($ c #EC210A", "_$ c #E61E0C", ":$ c #E11E0D", "<$ c #DC1B10", "[$ c #D61911", "}$ c #CE1715", "|$ c #C61516", "1$ c #BE1419", "2$ c #B11A23", "3$ c #ACB3B3", "4$ c #FCFCF8", "5$ c #FAFAF5", "6$ c #F2F2F0", "7$ c #A8A8A8", "8$ c #6D5856", "9$ c #EC1806", "0$ c #E71F0B", "a$ c #E7200B", "b$ c #E51E0D", "c$ c #D21912", "d$ c #CA1615", "e$ c #C41616", "f$ c #BB1419", "g$ c #B00F19", "h$ c #A9B3B2", "i$ c #F9F9F3", "j$ c #DFDFDF", "k$ c #B1B1B1", "l$ c #766866", "m$ c #E2170A", "n$ c #E11E0E", "o$ c #E31E0D", "p$ c #E21E0D", "q$ c #E01D0E", "r$ c #D91A10", "s$ c #D41912", "t$ c #CD1814", "u$ c #C11517", "v$ c #B8131A", "w$ c #AC1824", "x$ c #A6AEAD", "y$ c #F8F8F1", "z$ c #F7F7EF", "A$ c #A4A4A4", "B$ c #74797A", "C$ c #D12019", "D$ c #D91B11", "E$ c #DB1B0F", "F$ c #DC1B0F", "G$ c #D71A11", "H$ c #D31912", "I$ c #CE1714", "J$ c #C91615", "K$ c #C31517", "L$ c #BB1418", "M$ c #B4121B", "N$ c #A33D46", "O$ c #A9ACAB", "P$ c #828282", "Q$ c #F4F4F0", "R$ c #DEDEDE", "S$ c #8D8D8D", "T$ c #6F7777", "U$ c #AF4A48", "V$ c #D21610", "W$ c #D51911", "X$ c #D51912", "Y$ c #D11813", "Z$ c #CC1815", "`$ c #BE1418", " % c #B7131A", ".% c #AE0914", "+% c #977478", "@% c #F1F1EF", "#% c #EEEEEE", "$% c #737373", "%% c #828181", "&% c #C71A1A", "*% c #CA1715", "=% c #CB1615", "-% c #BD1418", ";% c #B1101B", ">% c #A12F3A", ",% c #9DA1A1", "'% c #949494", ")% c #E2E2E2", "!% c #DCDCDC", "~% c #937C7C", "{% c #C21416", "]% c #C41515", "^% c #BA1319", "/% c #B6131A", "(% c #B10F19", "_% c #A3202C", ":% c #939293", "<% c #898989", "[% c #A2A2A2", "}% c #8A7F80", "|% c #B6353A", "1% c #BA0A10", "2% c #B91016", "3% c #B91319", "4% c #B6121A", "5% c #B30C16", "6% c #AB0915", "7% c #9B434C", "8% c #CFCFCF", "9% c #758180", "0% c #8E7D7E", "a% c #9B595E", "b% c #A44D53", "c% c #9E4C52", "d% c #945E64", "e% c #8B8889", "f% c #8B8E8D", " . + @ # $ % & * = = - - - - = = ; > , ' ) ! ~ { ", " ] ^ / ( _ : < [ } | 1 2 2 2 2 1 3 4 5 6 7 8 9 0 a b ", " c d e f g h i j k l m n o o o o p q r s t u v w x y z A ", " B C D E F G H I J K L M N O P P Q R S T U V W X Y Z ` ...+. ", "@.#.e E $.%.&.H *.J =.-.;.>.,.'.'.).!.~.{.].t W ^./.(._.:.<.[.}.", "|.1.f 2.%.3.4.5.6.7.8.-.9.0.a.b.c.d.e.f.f.t g.h.i.Y j.k.l.m.n.o.", "p.q.g G &.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G.H.I.X J.K.L.` .M.N.O.", "P.Q.h H H 5.R.S.T.U.V.W.X.Y.Z.`. +.+++@+#+$+%+&+*+=+-+;+>+,+'+)+", "!+: i I *.~+{+T.]+^+/+(+_+:+<+[+}+|+1+2+J.3+4+w =+5+6+l.7+8+9+0+", "% < j J J 7.v.U.^+-.a+b+c+d+e+f+g+h+i+j+k+l+j+m+n+` o+p+q+r+s+t+", "u+v+w+K =.8.x+V./+y+z+A+:+B+C+D+E+F+G+H+I+n+J+K+6+L+M+N+O+P+Q+R+", "S+T+U+L -.-.x.W.(+b+A+V+W+X+Y+Z+Z+`+ @.@o++@@@l.#@$@%@8+&@*@=@-@", "= | ;@>@9.9.y.X.,@c+:+W+'@)@!@~@~@!@{@]@^@/@$@(@_@:@<@[@}@|@1@= ", "= 1 2@N >.0.z.Y.V+3@B+4@5@Z+!@6@6@!@Z+7@8@9@8+O+0@'+a@b@c@d@1 = ", "- 2 o e@,.f@A.g@h@i@j@k@!@!@l@m@m@l@!@n@o@p@q@r@s@t@u@v@w@o 2 - ", "- 2 o P '.b.B.x@y@z@D+Z+~@6@m@m@m@m@6@~@Z+D+A@B@C@D@E@'.P o 2 - ", "- 2 o P '.c.F@G@H@g+I@Z+~@6@m@m@m@m@6@~@Z+Z+J@2 K@1 L@'.P o 2 - ", "- 2 o M@N@O@P@Q@R@S@T@U@6@!@l@m@m@l@!@6@V@W@X@K@Y@Z@`@ #.#o 2 - ", "= 1 +#@###$#%#&#*#=#-#;#>#Z+!@6@6@!@6@,#'#)#!#~#{#]#^#/#(#_#1 = ", "= p :#<#[#}#|#1#2#3#4#5#6#7#!@~@~@6@8#9#!#0#a#b#a#c#d#e#f#L@g#= ", "h#i#j#k#l#m#n#o#p#q#r#s#t#u#v#Z+Z+o w#!#x#y#z#A#B#C#c#D#E#F#1 G#", "H#I#J#K#m#L#M#o#N#O#r#P#Q#R#S#D+Z+W@)#T#y#U#V#U#W#y#C#X#Y#Z#`#`@", " $.$+$@$L##$$$%$N#3#&$s#Q#*$=$-$;$X@!#a#z#V#>$U#,$A#'$x#)$E#!$= ", "~${$]$^$/$($%$_$:$<$[$}$|$1$2$3$2 K@~#b#A#U#U#4$5$A#C#x#6$^#!$7$", "8$9$0$%$%$a$b$*#3#r#c$d$e$f$g$h$K@Y@{#a#B#W#,$5$5$i$C#x#D#^#j$k$", "l$m$n$o$o$p$q$3#r$s$t$Q#u$v$w$x$1 Z@]#c#C#y#A#A#i$y$z$0#)$E#j$A$", "B$C$D$E$E$F$r$G$H$I$J$K$L$M$N$O$L@P$^#d#Q$C#'$C#C#z$c#6${#Z#R$S$", "T$U$V$s$W$X$H$Y$Z$J$e$`$ %.%+%'.'. #/#e#@%Q$x#x#x#c#D##%E#j$l@$%", " %%&%*%Z$Z$=%J$|$K$-%v$;%>%,%P P .#'%f#E##%)$6$D#d#{#E#)%!%h# ", " ~%{%]%e$e$u$*$^%/%(%_%:%o o o o <%L@F#Z#E#^#^#E#Z#j$!%[% ", " }%|%1%2%3%4%5%6%7%G@1 2 2 2 2 1 g#1 `#!$!$j$j$R$8%K@ ", " 9%0%a%b%c%d%e%f%= = - - - - = = * `@= 7$k$P S$. "}; ColorCode-0.8.5/img/icon_female16.png0000755000175000017500000000153012610773251015741 0ustar dirkdirk‰PNG  IHDRóÿatEXtSoftwareAdobe ImageReadyqÉe<úIDATxÚdSKhQ=ofòk’6­¶HMj,ýhU4­]˜nê*ŠŠ ¢nºWn\‰K»u!¸ð ЍQj…b맪›6TûK&“dšÉ$™÷¼ë'z™ûæñÞ;÷žsï{ìzŸ&ÊßQš'o…*{Nó‹äsøÇ‹W.0 —1Üe4pΑQÍ€ìDsuç0ØJgÿ>/™ ¿Ü°ÿ%vÍÞ༄œn"º÷ÚÚ6CMu7ÿc@€?Ù%©ÓÈçš²E EèêŽ rªø>íÊi,ÎÏEý5îBˆ‰ß ˆJƒYd0ŒÒŽÚêZ´´w Ò¹ Ñ}}À2EZFt×qpKØÌöW0ø–p¢Î_‚ "˪ìÝÙƒíÏ)ªWMÈÖÖQ)Q±Ýé”ÿPu™öüUéGPÕ @ú)PÈn^ž Áa–,TÁÀé.’¼Ê0¥my æÕ,e,E“åM}5»çPœFIØ4ØCÂ…ÌÍû É㟿âHZC‰4+¼€Æ`£# |޼®ëƹÁ÷ ïb $Êí¡¬’…–µ>­¥©>®òæõ!ÿZxl E 7¡ð¥ ÷¦¶ ÁÎŒ~Nnÿ8¹8F•.×@ËY`¾5W­U‘³lccÆÑŒØ’…¥EÒ_å!‘9<}=Šá) Ÿ2½]¢==±†††Kå.x½Þ“m᳜›È&R(›ÉD±…M¨¬r<{;C{3Xv¥¨•ƒP(tAÓ´A…¬?Ã4ÍrŸ©$H'’ø09‡'v#7ôO^â µ°ÿù`…€Ëå‚Ûí¾¥d³Ùt:½ççC\èÌË‘IvLÓÙÇ#"™TË‹‰¼^ñð%Iþ!À¼Œ_ºx‚`IEND®B`‚ColorCode-0.8.5/img/document-new.png0000644000175000017500000000110312610773251015727 0ustar dirkdirk‰PNG  IHDRóÿasBIT|dˆ pHYs»»:ìãâtEXtSoftwarewww.inkscape.org›î<ÀIDATxÚ½kSQ‡ŸsrÁ¶A‚R*Å9ÝŒ“u«ƒ›»S»ä?hŠ%Ô‚C‡¢ éjÅ=µˆ¡BÓM%è͇ƒ’››œ×æàáp‰_?øqΞç}.óü+«ÜÎ\Ë,e/g§«‡õr»ü@–åI0‚ÆžAkm«”JôÙÇvì²xi‘ÍùMî•ïÎ¥¿¥«%ÀÍöé6ÕN•ýO>W ˜AMcX R)ë±ÓÜÚo@í{èN„Ë‹›eÔ#5Bõë vçYg®Ìësž÷=LMM=3™L/s¹œÍjµ¢¾¾þëÓÓÓùH$’€C–åÏóùüG¥Ré·ÎÎΗ^¯wµf||üùåå媪ªOívû'KKKMÓ~‰D"i‘ ··W455m¶µµù,‹¶¾¾¾‹ÅÒÕÕÕ^¯÷i{{{G¹\>^XX@2™üa{{{ ¶¶öÕÚÚÚgƒƒƒ_H’T#˲»§§ç;èïï‡o‘H$„Çãáë±X,i±X€D2™d<èr¹¸¸¸ø! ý¤(вÙlÉçóNçs›ÍæÚÚÚzæt:Y©T¤ááaœ$òù<îîîxxxXøxee% …vww—[ZZD0dkk+I2“É0‘H°R©poo$9;;Ël6Ëp8,l6_§ÓéoÀJ¥þœžžf<BÞÜܰX,²££ƒº®“$eY···,—ËôûýL¥R¿xn·ûa~ˆoP…Õh𯉉‰ý\.Ç¿ »»D£ÑÕB¡Àh4Z)‹—'''¹¹¹ÉL&#Žs333/Ìfó½p»ÝOîïï‹f³yxnn.`2™ ë:...0:: ]×ÑÜÜ »Ýþ¾ªªí…BáWüNØØØ IA’GGG3Òé4Ô½]0T Œàr¹‚$¿B ¡¡$‰ååå €âÛ…š*ÁÚ|ÕÕÕõ½¦i°Z­¸¾¾–Eù¹®®.„ÿ@#c(ò I¡ªêëùùùoñØßß×ï÷Ú××Gt8α±±÷ªsÒ¿I<Ï““““ Á`FcéüüüEuæo±/¤ùPZ:IEND®B`‚ColorCode-0.8.5/img/edit-delete.png0000644000175000017500000000120112610773251015506 0ustar dirkdirk‰PNG  IHDR(-SsBITÛáOà pHYs»»:ìãâtEXtSoftwarewww.inkscape.org›î<PLTEÿÿÿ€¨­‡Š‘˜œª€¨¯œ‡Žnmj¢–++‚$ÒxuÃJIÉ`]¿4*ÅG?¤¤¤!¤#¥¦«$¯'³1&³+¾J?ÃJ@ÈLCÊVL€#!#!¡>4²C:j#j# {<2Y![!½¾¿93Á Â33ÂMHÃ::Å92Æ Ç É>>ËD?ËNJÌFFÐÐ ÓVVÓWTÓe`Ôb^Ö`]×caÛÛßßßhaãå/*å0,å2-å2.åsqæmmævué‰ïïðŠõcŽA!4tRNS222HHHHHHIIIJKOPQRÐ×ÝÞäæêòôõúúúúúúúúúûûûûûüüüüýýýþþÕnÞbœIDATÁE‚À(Ø"vwwbbwçýÏ¡ðtÏ  å6àËठ#½ÏŒЧ_>ëörMÍ…óåf…D“˜ˆ‹|y&ΓȘؠ?l¦q?t´Ól7"4þÔa¾VçÃjü¨üc¡ÛÆdºàz·¬VV»Mȉ}ÿ¾Y®ôxlžc–¸ÜÉC@F8,øâ\”øC³kzl?IEND®B`‚ColorCode-0.8.5/img/same_color_header.png0000644000175000017500000000113112610773251016756 0ustar dirkdirk‰PNG  IHDRðv—sRGB®ÎéIDAT(÷ý¡ Ÿ÷å ãÖ\÷&ÐSõõùï/º=DõçëñíÞèÌyøÙAøîñ#÷;¨44­ü ñòàïÏ–V–i ò÷âÉθHûïçLJ dCòâøí6®ÍL«2ûÿñܸιTô{ƒ7B~3H2[ûY‡ ôúçþòûÓðÑ!í6¿úï1÷ZŽq úçôõùüÚïÆ?6ÍñÍL õóéúöúøúýûÖëÑi3ýþûøòìúöú÷ üëùùÙÿÊZýõòèÜû÷÷ó÷ôùô æ÷ðòèÝüú÷÷òôóÿø  î/J›óÒÕÞïçñêÚâ ø36Œø9™æÏÞâðèîéÙã*ü'6‘o`næü0ÏâñÜLäîëñîûNtr» ëù"Ûñ×>êíõóð'3ìJqJ  Ï­©¦îýî/ÎðË^üûú( ,®½ðûè ÜøÚL×ñÓL ñ* 3žÿÙòüëÞ;éjà¡IEND®B`‚ColorCode-0.8.5/img/document-save.png0000644000175000017500000000106312610773251016101 0ustar dirkdirk‰PNG  IHDRóÿasBIT|dˆ pHYs»»:ìãâtEXtSoftwarewww.inkscape.org›î<°IDATxÚ¥“?HÃ@Å_¢Øt«ÚÁ:ÖUÄÍAÿЭE¡â$®Žêà ÅM°è¬¸»¨¸ÙÁAg7ÇBÁÖRAÍ5š¶—x_"áB }¹|—À½ß=¾\Ïó0ˆ†©ä²ÙïVËIììíC–¢RU¡ª Pܧ'EhZìç®Tõ–i%&RXX\‚'€À( AÄðçÛ›+T*•D˜Àu]h1 ÚÈ.^£)üB#H±•™çÜ÷„.^ºÝ® ›+Ó´>LB=r½¿Y<˜N‡ÖúžH¢6í6™Cy\Þ.ç>Õ€ëû'È ¿¥W>3GkÉÓ›€62󳲞d&VÓtþIàrpA=ÜÝFŸ"ÔD4±žh:ŽŠÇˆÇãa|:$н‘_÷ç©t:ÚƒŽØÝi·A*—˸8;‡e[8( +59‰ÚG>!y$€ØÝqc0M†a@×uÈò„ÑÑ“É$ÞªÕH¿ÓÇè42Á¶mJÔ 0mf[¸œ@á|™5›ºÎÆŸ äÖVAª×ëõ^«Q<¿¼@R 4ðïü ûÒöPO\IEND®B`‚ColorCode-0.8.5/img/GNU-icon.png0000644000175000017500000001412412610773251014710 0ustar dirkdirk‰PNG  IHDR@?PÎÊbKGDÿÿÿ ½§“tIME×  )é€"ÂöIDAThÕZwX”WÖÿ M`(QQ;âŠ&–¸–D@E̪ #‚ ‚JuQ5ƒD]5‰ØPQŒŠÆ¬-ÖXÖ ›˜ ˆ%qA¤"2H†2ÃÌïûÃ0ŸÈPÔ$û}¿ç™ç™ûÞsO{ï{Ï9÷^Ú€Ñ%%%ó Å0¡PØ^GGÇD__߀ ®®®N­V×Õ¾@A·nÝbwìØ‘Ø¾oƒyóæu° ¼¼|¸Z­6533««®®V“¬²°°¸PYY™xðàÁÊÖøZêô÷÷“J¥á#FŒè1mÚ4A¿~ý V«‘›› Ô××#99r¹~ø!öíۇ˗/çØÚÚzlÚ´éæofñ¯ ±.))ù¦W¯^L:UðàÁh×®¦_*•"##IIIÊÇg ‚¸øøømÍñÓꀅ ~˜žžþõĉ{‰ÅbäääàîÝ»P©TX¿~=ÒÒÒйsg(•J˜˜˜@*•¢®®ŽŽŽèÔ©Ö¬YƒøøøºÜÜܤ:ìT*•ýMMMÄÆÆ]ƒÃÃÃ6nÜX €sçÎ]# ç/X°ÀìôéÓøÏþƒ~ø*• îî®F~~>¢££1`ÀÀÅ‹_hee5wëÖ­ç^å¯÷êƒÀÀÀ¥>\•``mmúúz̘1wïÞtêÔ û÷ïGmm-ºté‚qãÆ¡  UUU:t( póæMDGG·{þü¹óO?ýä|êÔ)¸½®ñ`nnÞé£>úyàÀ53gÎì<`ÀìØ±ï¿ÿ>„B! áììŒ}ûö¡¼¼R©ƒ ‚™™Þ{ï=\¿~cÇŽµ >(Ù¹sçÚ—ù7šAAAŸ)•ÊÈíÛ·ëäææÂßßyyyÈÉɯ¯/ºté‚O>ùÄ©S§ššÊ²²2¹®®®J¡P­­­õ† ‚=z@  //W¯^UÕÔÔ\}šÞÞÞ—ÿkV½ÂÂÂVnذAE’vvvÀAƒ‘$ÿõ¯ÑÓÓóðbTWWOŸ2e %%EÃdäÈ‘(..FbbâÃÇ{ÄbqûªªªXssóLMM»ªT*#µZ­R*•ЧOŸ>155ýV&“-?räˆêåq¡¡¡íäry¬¹¹¹S‡:«Õj¨|þüy&ÉM[·n=Õù›6mZåëë;òöíÛ®ýúõCzz:rrrPSS'''8p`\@@€1æÎ»$11‘$yöìYÍÛŸ6mÕj5Ô+V¬ø:Æûùù…ûøøTäääPT*Ïž=˱cÇ–}ü’Ó&ºººß¿_ë¸Ë—/«½½½Sƒ‚‚:·E;wêÏ™3§D&“ÑÆÆ†èääD’üî»ïèëë» "‘è¹\N’¼yó¦ÆS§Neaa!===¿ãçÌ™³:66¶¾Aéÿûß‹Å|ÿý÷Ù»wo2„óæÍã7XSSÃÀÀÀZ__ߨ   ð®]»ªNž<É‚‚FGGsäÈ‘´³³£H$âÙ³gI’2™ŒÁÁÁùK—.íÑ}æÍ›·ïéÓ§´µµ%NŸ>$©P(èååuù ʦ¥¥iàææÆM›6qÙ²e.m5>000zýúõõ$ùðáC~üñÇ~¯þtttøé§ŸR­Vsþüù422b×®]éêêÊòã?¦žž^£1|ôèår9Ÿøúú¾ÓšNË—/ïÿõ×_³ÿþ@‘H¤™QÁÁÁÙX¼x±Œ$år¹ÆK†††ÌÊÊ¢X,n5—nÀÂ… çH$IîÝ»—B¡°Yã_þÍŸ?Ÿ%%%T*•ÌÈÈ ³³3SRRhooO7774¢755ååË—)•Jéããs­¤óðùçŸËNœ8¡áqòäI’äâÅ‹+u ÀØØ#GŽèëëÃÄÄJ¥²ª-ÆGDDŒ«¨¨Ø¶råJý­[·ÂÏÏr¹¼MŽÛ¶m6oÞ ===üéO‚ ðìÙ3\¸p%%%;vl#z™LWWWdff",,ì=??¿ý­É¨­­­®¨¨tïÞ]ÃSWWW¨££££Û@8|øp={ö@GGG¥…_#~ðàÁ‰­[·~ýõ×X°`H¶Éøhþ÷ìÙjµíÚµƒD"Ammmúºº:ˆD"XYYaøðá3BCCÝ[â/—ËMΞ= ÐÓÓógÏäêè¨T*TVVâÀCCCxzzB¡P˜¶ÄØ×××2;;ûêž={Lnݺ…9sæ¼¶ñ½zõÂóçÏ5í¾}û¢¢¢$‘••¡P¨uÜÓ§Oááá•Jß\dH$ÌÌÌŒ}}}zz/J µZ ºº:%˜™™áüùóxçwP__¯¾ú ÖÖÖf .­±H$2züøqj\\\ûŠŠ LŸ> …¢ @ €­­-Fèéé¡W¯^X¼x1?~Œœœ˜˜˜@¥z1Ù áááäädĤI“°téRX[[7᜜Œ+V`Íš5U*ÕhYŠ‹‹çÚÛÛ# 0~üxØÚÚªªªÿ’¬¬¬ä˜1c4 ŰaÃXPPÀI“&å¼ÊÔ×××ÐÅÅ%çúõëÌÏÏgŸ>}4ã:uêD{{{z{{s×®],,,Ô¬ºjµšÕÕÕMâûÏ?ÿÌùóç3?ÿE@JJJâÁƒÑòĉ¼uë×­[§Y°8ÀÌÌLΛ7ïô+ª fÏžC’;v$¶oßžW¯^%Iúûû+ááá‘®V«5aÐÁÁA“ä?ÿùON™2å'‘Hd .2nܸ‚¤¤$>zôH£HÿþýyðàAÖ××SrrrÂW“™LFµZÍÒÒR~ñÅ\¹r%£££yêÔ©Ft‰‰‰¼v횦­T*¹hÑ" ;Æ_~ù…>>>iaaa#Åbqû™3g~ëÖ-¦¤¤ÐÒÒ’xéÒ% //¯"Ìž=ûPjj*I255•íÚµ#êëësôèÑÌÍÍåõë×éææ&÷ôôÌ ªËÏÏgBB;tè@===®X±‚J¥R«áûöí£‡‡…B! šÌ€˜˜¾ûî»LJJÒ<Û¼y3###Y[[Ë'OžÐÇLJçÎãßþö7æææ6ïííMÔÕÕåŠ+XPPÀmÛ¶166Vùøñc&''kf§‘‘çÌ™C’,..æ´iÓnC"‘Œ‘H$$É‚‚®^½ºQÜ=pà …æÍ¦¤¤päÈ‘Ï_¼xQ«á$ùÓO?ñ£>âµk×€ÞÞÞZé’““™@’¬¨¨`pp0wìØA’œ2e ÍÌÌøË/¿°¦¦†QQQÆÊår2D£oçÎyúôi–••122’3gÎÔô™™™±¸¸XãäÅ‹ÏLž<¹ áÍØÛÛ7r€‘‘ýýýyêÔ©F‰ÉÖ­[›5¾¤¤„cÆŒáÉ“'ùí·ßrÔ¨Q,**¢J¥â¹sç˜ÀU«VQ*•’$/]ºÄ²²²F<êëëiddĉ'òÊ•+T©TüÇ?þÑDÖ½{÷eÆÆÆ6lX“¤ËÇLJßÿ=kkk9yòä"ÍJüÅ_°¾¾žYYYœ4iR³ékÃÿ>ø€ k‡6¬_¿ž—/_&IfeeQ¡P°¦¦†7nÜÐ*—Ë5©Õj.[¶¬ÂÂBêêê299™ä‹ï~ݺuZåÍž=»ÅŒÓÅÅ…[¶l!InذA½hÑ¢ÀFË¥››[zff&e29B±XL@Ð,Ã~ø¡Yãóóó›|«/£²²’wîÜaZZZ£Ü<22’uuušvUU]\\˜››Ë£Grûöíìîînîíí SSS( ?~IIIˆ‹‹kщ@!!!ض­ñ¡LEEN:}}}˜››£{÷î°±±‘‘‘V^åååpttD=0tèP|úé§ÍÊ}òä ñå—_"77©©©UjµúRŸ>}¼%I›ª[ÀáÇBBB¾trr’º»»«£££9yòd^¸p¡MoÿÊ•+\¼xq«tuuu<}út«t'Nœà™3g¸fÍÍ´nçΣ££c^ddäìÇë¶nm+عs§EDDDpÿþýk_^¥[‚½½=cccÛDÛV„‡‡óüùó9rdÕ–-[ÔͅẺ:~òÉ'?·Å6¶>_¿~}œ………üåÚ½9:t]ºtAÃ&Äo…Ù³gãÖ­[°³³»™½ÔÃãúå]ìÀÚ򼧿ñãï/\¸pRK<Û䈈ˆèVUUeÖ]zz:¶mÛ†ÄÄDèëë·•= ´´ÙÙÙÉdZûŒ¬¬,Èåòž7nÜ0dÈÛíÛ·Ÿöðð(Œ‰‰aAA†vË–-zýúõ{@ß–d¶ºŸÖGGÇìÞîîÍo¾dddÀÛÛû÷ï‡nܸ޽{ÃÒR{Øm@^^–-[sssôèÑ(**Bhh(†ÚDÆ”)Sƒ zçÈ‘#5t¨$ÉøGE0U*•ÆJ¥Rݵk×3[¶l‰h«ÍB"‘t°··oñûLKKkñ3h@uu5×®]ËóçÏ·H×\åG’.\àðáÃk¢¢¢Æü‘Æ78@üêÃàààMÁÁÁmrIîÙ³‡ëׯo3}ÒÓÓ)‰èààðtíÚµ6Zôk3Úœ ¾5€&9±±±ñ¥²²²63ñööÆÝ»w¡V«ÛD___ÔÔT>>³&L˜0ÎÄÄÄÈÏÏsæÌym!r¹¹¹¹(--Emm-ŒŒŒpïÞ=tìØ±‰Ìÿºø-¬%QQQ].L}óÍ7-N{…BÁ£G2,,ŒNNN´²²ÒˆXXX¨\\\²<==“‚‚‚öJ$“ædþÑø+€ù-Ôõòò:ïëëK’,--Õº\YYÉäädΘ1ƒ£FâîÝ»yüøqZXXpÉ’%!=o„8ÍÞ&]¾|yß=z(yáÂöìÙ“›6mjó‚8pà@¥D"y›Ïõw‡€/tÒÖ9wîÜ]XTTıcÇjN—###)“ÉZuÀ–-[8oÞ¼õ¿‡âo^F=€ehR´÷îÝ{Uß¾}^^^šâü™™™01iþSÎÊzé<==‘ŸŸ?õ7Òõw…>OhqBLLLï1cÆHÐÖÖ¶ÎÌÌLýî»ï6{&(“ɘÀššÆÅÅÑËËëìnÍ[ ´„X‰D¢ãççwL(ªçÍ›· ¿žä6É7 ººš3fÌàgŸ}Æ¡C‡ÒÕÕõÑÿ¥U¿­ÐúyI$;;»ê€€€MNNNÐÒÒ’wîÜ!I:tˆ=zôÐ\|š?þ[åúo¤äo„&Eþ’%K>>ž:Nðòòâœ9s’ðõõE__ßÀÍ›7¯“ŒÞ»woÛ›H….^¼X>kÖ¬ z½ž—/_ìììðüùs†‡‡ >>>HNNÞTRRr l@&“mËËËûßš5kXRR"hµZáÎ;èêê:W__ßèèè8yêÔ©‹ôwvvª¾ýöÛ7&OIIA{{û=//¯EÞ{ï½™LvÅÅÅå&“i~EE•J%.^¼˜acccV©TYX±bÅ_4 cccEA¨×ë¹zõê‹– éééoSˆ‰‰Á¯aáÂ…“³³³{×­['¾ÿþûbuu5—.]ê† 6d’¤‹‹ Ä}ûöÕ w^»v-är¹cJJÊÅ+W®°ªªŠ•••\¿~ý’ i“˜˜x®¦¦†õõõ,--½åååå98ÆÖ­[!•J]óóó €z½žqqq§QRRÒÛßßO>>LKKcNNSSSyÿþ}¶µµ±±±‘&“‰ljjâÂ… NT*•Ü»wo…€F£é²ä*++qîܹ.£ÑHA-^¸psæÌÙœ––v+??ŸüþûïiÁåË—D“ÉD’ÌÈÈ N§ã©S§¨Õj©Óéxüøq’ä“'O€dnnní±cÇÔyyyÀ––>ÅgŸ}ö_’tww'nÚ´Iìêꢯ¯/œœH’¢(’$5 Ož<ÉÐÐP>{öÌJ¬¡¡ÍÍÍ|ñâíííi4YRRBQYWWGôôôcbbèìì̱cÇ’$W®\yYYYçÏŸ§F£%ÉþÖÕÕY“›L&^¿~¯^½"IF’dAA ­ %&&²££ƒ V߀€kL{{{æææŠ*•Š999cÁÁÁÿ|í$Μ9“ŽŽŽôööæpårùú¢¢"’dKK‹˜••e­À¨¢¢ÂºV«ÕT(¼{÷.Íf³õûööv†††R«Õñ_¶l™¨×ëyæÌS@@À’7^—{öì™-..>÷Öê¥RiºÁ`àË—/ÅœœnÞ¼¹-22òåpé-{¥RÉ“'Oò›o¾áóçÏYWWÇšš’IR§Ó1""Â#ÁÊ•+¥¥¥199™Ó§O¿1{öìO__˃wvv²££cÈ8&$$pß¾}Cȉ¢È¶¶6ÊåòOFD`ÿþý’7~HÒ @ )|ôÑGå–Š,`yy9 ÃU>|h]›Íf~ñÅ÷ðŽà””„¯¾új–e®WøèÑ#ªT*kk·¨¹¹™2™¬vîÜùN<,³l–,YòÓ›FîðáÃC$OOÏoK"ü ‰T»·nÝŠC‡Ùº»»k½Ç A°gÏØÙÙa̘10›Íèîî†^¯ÇíÛ·o®[·îÓØØØïچ݃7~~~ׇŸ…7Um‡‡Ç¿¾þúküfpP½}ûvØØØ¸:uª(11ñø¸¸!†7nÜÀ­[· Óé8jÔ(aÊ”)½:Nš——×ßë£Îr˜"""Œ†:Ž¢(r``€ÕÕÕT«ÕLJJ²¾ªæÍ›‡ß Q–ÅþÁ & ùÇE‘F£‘½½½\°`AäHÿi„vy¯§ ­¢(γ··ïÓëõ?twwA@nn.>ŒiÓ¦Õã„Ùlåîî~K¡P| €wîÜáôéÓ €×®]û›T*q,›w!`0¼¼½½kjkkÿÚÓÓ³L¯×£¶¶X\\ü‰‹‹KoXXسúúúŸþP%>ÿüó°?þ8ÎòÜrqqé@??¿ó#!üD–/_îäädg4_ïààО••U5ßÿngì²Êæ„IEND®B`‚ColorCode-0.8.5/img/bookmark.png0000644000175000017500000000124112610773251015132 0ustar dirkdirk‰PNG  IHDRóÿahIDAT8}’½O“QÆ÷}é X ùSÑ 8 Š¢‹qæ/0ÆFŠ(‹31Q¡F]\ˆq0hŒ!2øqp$% 4 ´”¾mß{Z4 p“''9÷9Ožçž‹ˆ°Æ5öŽöûºv»ßs8xÃðm,9ßì»hqq ›Ã: !i[òvr~dz%ø+pׯjZª‹žž;ZÙžàŸ€Ö y3z>‰û{‚²¼e=e>²nÀNƒí@ÒÉTÛ[gá¨H"9Ö”å×X–oÕ“ÊÚ@Î>ª††RËÕ°ë?(1̓ØiÀc&Þ¼ü\Ät ¯a6nò·DìT¥e99µh7Ë«¦ýnféýÈÌ‚d6Ô=>ù²ºn¥¡€rÃç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-ÛgAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅF IDATxÚtSkHSýîõnsÓéÜj⣖83mZh¦ÌòQjP( M*zgEeIÄ ~ôÇIJ‰H‹¬0J­è‰­ÔìigHY"•ÙÝæ¦óêÕÝÝ»¯_ÆL=ðý;çð}ßáˆÓ¡$šÌà@ªî™“,òWÈX±æŠéæ ë""Nš’…Š]õ{r[œwª¿ï_EÆF 3ŒÏŸ˜Ì2“Œ:JJyó)o³3iÕg÷çïÁ ðµ8IȲ HR,ô]\ªAw‡£`Ë” *–ξˆ«·ÎÅ‘õs±wµÒñV}#¾ýöGjO")+ó°|ydÍ„ŽÈ)¹!‰h?}ððÆ5e!í·}‹šú€¹góiý1Â=r9ÔÑ1ÛTc²Ucr™ÂFçÅ»7Uµ%×Ó¶‘£l¸~ó%"b÷ûxÑç^ª=•¨ ‹ð¾5•$ ž¦iX¾0ѸkóõWHÂI«tz}<€M 6 ô7¶Ûûz½ÿóBðÔÝí¶_eú7„û»²“H‘„‡ÅŠ¥ÎC¢ÞÏþ‹Û§w;ùé¢íq‘&:6sG@  ´¼Dá7Ë¢¡ØÎgŒ¨£›‚–PZ¥àçt0<Áa³½ @«s'ïªû²ˆlqÐ?;,£4JNAÂ,YîL)ikC‚ÕÀ€HŠüO¼ÿ5Ô r9ùò”Wä/)ñ&GjŠcuç6±æulã%pZááåê:‘baˆ°L"VWæw&rêñ?ƒðyN&4úǘz^µÝ÷µÑ²$1››5›KÐr)÷…fé’ãz }S _ÿ‹iŸÖ¯Ôyt%‡GõÈÿèBÛè8öXØUqÙÍ ‹ã©h?–ëÞ%7Nè&õ`wTÀ!Sùá!ô‚íyâ½JÄǰ©´À²+*à·†ø¿)ʰ؜¢‚ÒÈÄÅù>Uà¶x2`îêoln{{õ Çõyó‰é꼈 ‘LîAR„ãCöÁ9S2hå±}1–1©IEND®B`‚ColorCode-0.8.5/img/face-sad.png0000644000175000017500000000307012610773251014772 0ustar dirkdirk‰PNG  IHDROc#" pHYs Ö Öoyœ vpAg\Æ­ÃbKGDÿÿÿÿÿÿ X÷Ü•IDATxÚ••{LSgÆÒʦÕZZn‚€¢Õ:'C݃*:a¬n (‚œ¡™Ý¦ã.^@Yœ¨ˆv‚ ¨ U©ØZ¹–‚+ÈÅ*R¥ÚR À·÷49É’-Î?¿œ'ßû<ïûå;ßÁ&zŠÃ1!¡ÃŒ#T‘ŒaÓ¨­¢ÃfS :±Ž¨û„õDÁå½`ô½:ðzÿŒŸF~(¸ÛáNÍrÐùK™œé]1C/[ÞŸ^¯W¿\s:I¯ÖÉVqvwÅ||[JqÏËrø (tš9a$á3™`†›¨œó×ÚŠ"¢t{"ÝÕ°Ñv¥e.‚gÌUÅÁ9;b`Ú ß ûLDê‚[.#4ÄyšqØKÃV/(¸gw#"ŠðýDpY) ¬/,'ß²<˜2Ô”Ÿ°z4ùh<¾ûÎѰì:NýÍŽÖv.7èAÍõ8·UÒ!š*q¨+›u £ñªySéõÁ"ç? h,Š’É"z€úvé3ÿŸz½Æ³Õ]6ƒ‘·ÊôR°F} ·8¦Í0Dº‘ªDœC3ª:ãÚWåƒ@©Z”ÇnQ¹^€|÷C¬ù˜Zn²¹¬w­¦½Øuª==à_“—Ä<Þ'\Ú=û"×b¸¢ñ¯}b(Pc|6Mé©þµoÑÉíÓ†®_×sÚ*yǦJÞ3Ðu¡>¦°N«åA=êéùêMÔkø»9$[¶? ¡^ÚåbÚ ®‘ ˜pX¹Ê#ÙWlrï3Güêž¶0hl«‡O;>XgêÆh„4OÛÊÂ!Ð[á>ÅjÞ5]#±T\ïÒÆt’•×_ÏÜ%„ºÑÎ^ÿ¥à“Õ*ô‚rJ=Ï ôw#/Ò¶é>“È…„nFÞÕó&‹L‘-þáI·}B£ÉMwì¨`T(·pfÇÛWÂÈþÝìðw…W`”› úW;= ëv­’rî¼ à×}ió߬Û×ÁŒe×08²ÅD.4ð†a$÷î¹çhÛ$CG+d¶oáhÝ“¦Òúa‚GÍËÍsÀ°§e;ýðÊÌé4ÎÖ_˜Ÿ˜Ä\aпpvªZÒ?B][ó1sX§o‘öђ़êm3êñ¼ècé+q rñÏNß)Öiö„ÅÞ+…ƒ þm§ù°e¼º8«˜ ¼1Ú ‡(ª¶ÇlB‰š°Ñé°Ñ˜µt–!ç%µ0aêÞ=æ°ÕQ¥~f¡.¾±šz |Õ½³bÁYy\âë´¡7ÎçVSÙW ‰\h 3ƒ½xÆ=³žâGêÉá3“g˜&nŸw ´’(Æ„rÎ%]³†÷•%z_|g^´ùfåm¡¾0Y‹èð5d¶É?—\gØÃÖ[¹bÞ~„T¯•-¢ Îó³éÞ”?‘‹b´àk ›zOþ&½Àê¹€¥ýí~œ/ «MYaÐÈÎ:Ž ŒW׻ѦK¿±\üSêcé\W¿‰ ë¢ëx6\¨»Z=ÂZ “Ó˜ú.B¨Õ;ãµõaÁ"ç.¢  ‰"RØä‡s¨­2çëäO´r¡8" ’×ì;@$ñò¸A ‰kÐZâÂòN“dx\ן`çCð&QQDžL‚À-5ú8BÊ£Ea[QÓVÙ(‹OñÃÒI¶Ö„ï$þ I2Ûá?‘»ü üÜ­[¸1±Öì]"£f<…n%Ë+ª¥¥°¬ÚóŠ„iIFæ&‰ŒÜЃ•d…[7QGøL”7‰Æ®–f"T½NÐ'ë÷vùaÉ¡„"zTXtSoftwarexÚ+//×ËÌË.NN,HÕË/J6ØXSÊ\IEND®B`‚ColorCode-0.8.5/img/pause.png0000644000175000017500000000074412610773251014451 0ustar dirkdirk‰PNG  IHDRµú7êsBITUìF pHYs»»:ìãâtEXtSoftwarewww.inkscape.org›î<cIDAT(ÏE‘½JÃ`†O®ÃÍ!—àì.R iDJµÿÐBùšb­?Ä uÓÁI¼qð¤ R\\bE ŸÂ7į<ÆzÞáÃáÎ#ÈozîI'Q¥qr÷Ü¿½ Hä©®iÑ&"¢M‹®9R‘Sì;Ý~“7 xbÈ7ìÒ¤ÛßwABµÃ9÷¼’ñÉš7ž9c‡P!¢Ü† yäÃ7cÆXr4/´iåÊv\ç–w —ôèPÇ¢PgûXÖ“ îÐX.hÐdȱÅz"µ4d@†¥Ã5¦KƵTªi‹G4c怂c4‡TS©$µ¢Ác   %cJ"•Øçš9+ÌÌâS9–e·l6yFcù‹&¤l–]AµÀ)/hrìäW,(D%'è—ØbÀˆ MÆ%‚þ’SÈ _y¦D•]öX¥„g|8›RvýØKÓÅÔKü¸<Ñý‰o3öhÚ7IEND®B`‚ColorCode-0.8.5/img/cc16.png0000644000175000017500000000216412610773251014066 0ustar dirkdirk‰PNG  IHDRóÿasRGB®ÎétIMEÙ .õìü6IDAT8ïûcI?AÙ8¢û%8 ý3ÿã" ùËÉ¿ID ññ ä·È^œ—y¿cI?AÁEg¾MYúâôüêúóåþFùÊMë ºº›››Eûóèý÷ïöïéå°9B BXÃøaqþðùþøÿþ÷þ÷ûÓç>åÑÌÏ•”ýøùÿþúýùÿûüòöCû$8úâôÿþöýÿùýÿüþ ûÑí2$þ÷ðþüÿýúûûÿþüþÿð þçêúþùýþòýþôýþøþ ýõäþýÿÿýÿúùÿúúþûûûúþ1ÿãóäþüéùýëúýîúþòûóîýE(û /øîòýõñþõôþ÷öþøøúøÜë# ùFúËñáüüèùýëùñçüs5Ü%!½ÓIÿóîþôòýôõöðÛåßõ3•••ÿ ñûÑíF(úÿææéÿÊÿòçóïû÷õð ÛÛÕ,ê¼ ü?ççåÐé"ùùùý———ÿÍ——õÜöûòúëÿ Úuz%AA¢¢¢VVV552øøùúúü···ëë뀞èÇøúùýþ¼ÂíJHÚØØAAA11+þ!ÞÞÞDçÜðûúýüþþÿÿú¹½ééé552ÿ### õüöýøþùþøÿûýòóøøùýýûýýúÿÿÿð äóøóúôüõýøþøöû÷%"ùùùúúüüüþýýûüüüüüùùùíííäÏ=?^ä ðýñüóýôûê+-ÿ ···ööû÷÷þøøþõõöëëëÂÂÂ^u‘‘A,·º¢ éìúÿï(%ýB<ûüûûû $$$íííäÁÁÁ^¿ÖûÃoxËáIEND®B`‚ColorCode-0.8.5/img/application-exit.png0000644000175000017500000000151212610773251016600 0ustar dirkdirk‰PNG  IHDRóÿabKGDÿÿÿ ½§“ pHYsvv}Õ‚ÌtIME×  )xo×IDATxÚ’ÏkTWÇ?÷¾7o^f2“©$'‰u\4µ?Ôª ¡è*ÐEm.Ú•»Jv]A‹6]t‘béˆn\ˆ ¨Ø’tˆ!“¨313ãË̼_÷yxt!Ò…ç¾ûî÷s¿çpUk~þhïîÝ›­……}É[ `€w÷½{íÊô´÷je匪_ºt/5Eœ ʹTÎc°X$ÃôŒ·¶F$€°£Œ:@„Ïïß'ÜõØÿõEÜ|žÑóä6ƒ“ËaD\›»Ióé߀"[JÖT6óCàd‹±”‰1Í:ñFügÇ0Zƒ¶Ðbyç_éÃÐÜw²V pâ§ßÈ~rÇ+£þsÑ( Ey_Üø“‘Q[¼ò îòm ÿÞaø÷ï)æs Žñùµ[ª‡°¥„à78­2°Ù¯ð.’&øÑmÌÏß2àdÈ´š„Û ”P7ŽVŸ÷jõrNÇrÕÉ*jí…i¿–?¯ñÄ1^.ÕØi´é;–jÛuÛ-ï_7ATVÝ=óbu™wp"@Al ÐÐ[Y¦B$CõúâÂZµ·–V§;›[¿„¾_Mx¿PZ#¹*¯öâj‘R!˜‘:yIEND®B`‚ColorCode-0.8.5/img/gplv3-80x32.png0000755000175000017500000000626312610773251015156 0ustar dirkdirk‰PNG  IHDRP …3ÿltEXtSoftwareAdobe ImageReadyqÉe< UIDATxÚäš ”Å€ûŸ™]X@A–A€rr”Abˆ‰‚F 94‰FLð¨2¥ÑÄŠšŠIPCJ’RK‰geÊEÁŠ¥%IPn•ÃV©r(ײÜ{ÍÌŸïÍ{ãüó3³»ÀR!•®zÓýÿ÷ëׯßÕ¯Çû‡Ë_<÷ÿY"@3ç 97\Áãà| ð}窀ç£@¬<ƒ€?Ƀÿæz*­>û4Ñ1y©bIçZÖ(³ZG˜ðï|œBû3ëÛ‹ŸG…žX=R&œu&H Eiç©$œŽRÀ7×€wnA¹·˜ws~ž£ÿǼ¯aÀ´X$?ÑCý3€yq “só8×£F›õQ`3p˜uv†!çÑ~˜B»ÌoÀ´ñ½’º.–§ãY¼ï–îÌn$©^ý*\[ÂvÔ5@GЄԙzF‚ïy¨;èÜB>^iÆÉ<+-@`$xPOfòül&g/Ï=„ù±<«ìî‘ç'Š+¥þá{Ù¾Ež ÁÑ–ö•ÀC@ïnÞ¦úª^ˆ™·MsCàôoya_çý~Þÿ†ú¦ÃÀ5ÔUMàÔV0×ð\L{Ð _Øz÷;·¾Â¸Û<´»uæ=šžÛ¡uF>'r Ђ³Ÿöâ¡Ì¹{YlqD¥+]„Y¯S/†°-´'‰a›E{õW’ÊØºÀ˜æ¢"ÕÎÍ\cš+“?ô”æóÃöÑ>®C§À¸íŒÿ ø‹oóÜÁ©Š¼ÀzîØ…óˆëfÉz.2ç±]œ†i`Ê»4ËHå]²v 4§ ûg»¿X¾¿4òîÁ¨"ÎÒÁj]øb°'tgWŸDuâ;ùv}Ž)^ïLE©ûòüTî|;¤mph޵Fôš“‘@ÆÌvºÉ·‰º¦ßügɲcØ×ÎÐñCú^ “.532Óé»Óâæih_Nõsê‰Ô‡bûsس6x_OÇ}`\ìBÌ3F@´×zJÐ {½Êv­ïºäYÔQ“ž8kAsm\"’ß&4Ç.ó‘­#ÖÆ1÷Q6ñ~šà˜J}A`þ¹ph2ßÛñx—H!uqH0ÖTÛ„…”!Às5UËR[¨Áy¦ÂûD­ºˆ|áÃ6m°]a“/®Rft3[s\ÈÀâÞ3;Œvú½.¡L¿,Gÿ}ÆÈ½Të)u::w-c Aæ‰vÀ˜_ÑçNÙl_™QB±D´"í¦ãŠóJúΦ±æ—ÒŒŽ47£€!žÚ‚2qõ ðh÷ÎC«Ø«¿™ŠÜhLY×woVy¾íYäÜÆú< ¯ɦhf‡³ LÝ—P’°a]#ø·@ìšuíÇsHìFÌÅŸ¡ï)àÂZõ)Õ$Âêݦ¶˜§Ÿ@ç[ØÁ7¡ÿ?à¡s…1ÃÌÓ,ì%Îu\í\ÿ<ñW1ã¿$Ž…~ÞJ™38Wž÷ûa“ÑÓfӣŠqR0µ•0=lçP#ÑL\ôQ÷›Œ¿G˜ƒWºÂËÙÅ]ɹ‚w$ÔÉlˆYgO7o=í_ÃÄ¡at¿ŒßÂ¥Ù•Umžïe«@}åCVDuòѹ:@àò>jÍKÀÛI\ðŽ¾—Ð©SŽ@:R ×Ö_¾NŸ[€ÇýÜÌK+ANæñrøÇú)Ÿ™ávRëE |É}Ø©ct^Ž@V ¦Ã ·?Þ¯hh “„3L ¢vÄ}U½aÔåIE,¡Œ|Ûf&$µYòuX)¦âµ‘E¨Å{1%D<ýY9&žZlª ZjUx)ÅÈÚ”R¿óóHÞU'á¬g‹Md®ÝQ“*ažðÂøª•G`b2¨Yá@úˆJ›ìÂÖ¤.`Dàûú¤z4Ù™Cô=hÛù¬0"V›G>Ä$cBAwÊ9Óÿ–ìÄý¨çNžw¾y$6¥%¢»HëÎáØAݘÝo°¨`¯ž¤}ý †:²†û¡õ™xH%“æY›´Ó.§^DN&\šöbâÉÊÀ>ï™ ÜœÃïăyêéÆð|"VµÕ›ˆúOðRÑ@“HHÉVæy ò5ÞUä÷ÀBx ‰ÂûÚ"èûFRç“E®ƒž›-&›|‚R÷O澕±ŸX1ÎøuŽ„*¾:™/­¦ç1ßxèþ~ÐîÅ¢Ù±Óh#úƒBػ΢öŒM׈É7"ñ5ûòì<¦ã¿eN+·]Åà•µQé*6å²M%ÁqâeE›äˆØ›·3®ßŸ`pý Õ‹àø±1®WÈœÍ Ÿ}áÍÖ»z–gI`(!0À ÷2E˜Ño ‹+8ž )Vb±-/T;!Ç¥^ eDé»ö˜Î7 ¢¹¾\ „ 5!WÁœŸñî1Ùh௮ñNNÊ^_é›ghÃE22…xh4ŽöB †`Óלˆ¨ÔÆ *%½c¹µ—Å—Ûáz¨%Ò–%4ùБIz6” c'÷ÂŒU¶‹â€òeªº%-4ó@4}3‡þEŒ™N»k2¤×SJ\È ¹Œ—Ò×ÓK•ŸÉ€HZoÄÝÃ\ÛkBãb‰ŒT $„[(÷Cº;##¹%hM4“Tè›Ð®M¤Û« ?3‚ex¶G3GÅ|¥;ÌŠîa>œÈ—xžø1gÔ p¯³øÿ” tlæŠÒ„õ4;ýˆ§aÒqé­/¼°êMµ–TkÝLB?¥ÉYɦ¼b’yßÒÞ\¦ÆX¸>¼‘Yæ¥æ±åÔó Íù– júX<&o¿]ÕönÌÄR$±¬DÇŽ?ÅL÷шzï©Ð]Y«f+•–æ[_`6ß§3Ïô|8bƈ¢€ tõ5•ý£<ãÄ܉šÞçÔæ½W«1b!íáÌd—Y)p_h“ÒEÂ)9ZJ-{=)¹¦Sæ£È?y©› Ó¬³,H¢R¾æ4¹úÞ=Q/žZ_Ôƒz«@´/CF'ÏB—v°é˜ÙQ˦4b {4é‘b`@¾h˼ílsÅ.m’“\¾]Œõ¹šVžE°?±±i~×ÑwõÓ¬aˆý£–çKǵ*åw;µy¯¥ Šå¹ÍŠÙ9³1o™§"ÝÚ×äÀÈ|¡HèBæ9Æ}˜ÔðåêÀ·Ãà~".ñÔÎ çsCgäú®ÿò¾'x–Z¦s·rJT5§K×*?‡Ns¶i[ë‡î!ätý/¾]±(£¡+×`d+%~ž§äLù¶NaˆÒ%Øé(_¯:Û;M /–0ñ¬˜¦ñkí¾áE§Áíû^êÔ–Jy-eìwÍ Él3æø$¡;øžu‹YÑJÃÀeO¦o= Ô›ØÚâËÀ7ÃykTO ÅF“\ƒþÛ`eÞ©T…î;j OBÔGy¿ º¾J½¿±¦ vÈb9Oc¸ r–Äx5LßK{ª¯¢½‹çwyÞHÿY´…rÝxƒT|¾/×@Ô«Þo“ûíq´C\+ tÌ †«\ŽG¸Òíà¼|Oc$§"ßo&ª¼?˜Œd¿•ñ¿4oœæQ­9??8øÉdWÒIÉ&MµÄô-Mž - C•¹nRé«s}D‘¦–%TÊ ¡nŒ¯ùÁOS^%vV{²˜®½06¡ ]À þ»6$æ’¨ÚÇ.r£óºD4ë"1çrɶ0¦\jÍ·Ñ’ô}¿¸Ç‘Ràg”ºdIfßVU›äUÚ•¥/^igÀ;mʘÁ{G\c×fÐ7<¥'åŒp"£!ä_Nù¶ô7/„ôðõY ‰Â…ÉüM§ø}½xy×iÒµŸIÉéqå×ÓÓÌo'sLg›´µÌ¯0¥ÄÔª§S¶Ù&c<¡OÒMËÓ^.mÃêräåj­Þjç4Ó¢(œ›@û²Ù¾þÛ`^A_< ¥‰€´æs"Þ;x5‘¢Óq)î5ýÿ0ĶN ;²à™ÓG"¡Aó-tU Fv‹CQ(I öGö”ß7¸yrÛQ0ì‘Ì ;&Æ¢ÐÔ$\2g ¿ú0Ó74žÛD n@ Ù¬…ËãÉ6šOlݑ锯$:jÀ*qÐ5v»šª›e‘ngn9¬=#é~Mp\*…¢‰ââæTýºÅ²Ulìýâò²¦•c¡¨)d»m(2$žÆóùƒÆÉ“'‘––Æòòr¹¶¶¶J¡P---u† †^½zA  ??W®\QÕÖÖ^HJJryÝmïïïÕÕÕÕÖÙÙ$!PVV†{÷î!??R©ffføðÃÑ¥K¸¹¹A&“áÖ­[ðññÁðáÄààà††††… [›) 88Ø­¤¤äÔÑÖ֯ĉqဵµ5233ñøñcÄÄčЋ‹óûõë·¯wïÞñ .,’‚˜˜˜quuuæêŒ³mll}||*Þä»')X¸pá_ËÊÊì´µµuI6¬êÔ©ÓM33³ë={öü933Ó¶¨¨ÈCWW×6((¨ãСCáàà€Ë—/8www(LLLflܸñ”f‘H¤íääTZYYÉ’’Ž5ŠhllÌèèhæääððáÜ2eJîgŸ}6¿c:tH;,,l\\œòöíÛ‰DÔÑÑ¡™™¿þúkÖÔÔÐÑѱ"88ØHÓÉÇÇg×ñãÇI’—.]"à¨Q£H’§N¢§§ç%ü!<<|å† T$iccC2dIòŸÿü'ÅbñÉF#(¨©©™1uêT@jjª†ÉèÑ£QRR‚ÄÄćrx• u¬®®Ž555ýÀØØ¸»J¥2P«Õ*¥R©xòäÉcccãod2ÙòÇ«žï¦/—ËcMMM;uêÔU­V@Õ³gϲHnÚºuëÉöŒ¿iÓ¦UÞÞÞ£oݺå2`Àddd 77µµµpttDRR’ƒ¿¿¿!|}}—$&&’$Ïœ9£YýéÓ§S­V3<<\¹bÅŠÁ¯"¼ÏB//¯ÊÜÜ\¶•JÅ3gÎpüøñ¥?§´I...%÷îÝk±ß¥K—Ôžžži]Û3;wêÎ;·T&“ÑÊÊŠèèèH’üöÛoéíí½ "‘è{¹\N’¼qã†FÓ¦McQQÅbñw¯"üܹsWÇÆÆ64Nú_ÿúƒ‚‚øþûï³oß¾6lçÍ›Çëׯ³¶¶–uÞÞÞ± »wï®:qâ ÍÑ£GÓÆÆ†"‘ˆgΜ!IÊd2,]º´W;#Æ}Ož<¡µµ5pÆŒ$I…BAëð÷÷/hœlzzºF®®®Ü´i—-[æÜ^á¢×¯_ß@’<àǬá÷âOKK‹Ÿ~ú)Õj5CBBh``ÀîÝ»ÓÅÅ…ƒæÇL&}ìììøðáCÊår<ööö~çesZ¾|ùÀ¯¾úŠ$ŠD"ÍŽ ÎÁâÅ‹e$)—Ë5ZêС³³³TÕ^á,X0W"‘(HrïÞ½ …­ ÿü/$$„¥¥¥T*•ÌÌ̤““SSSikkKWWWêéé5¡766æ¥K—(•Jéååuïeá<üýï—?~\Ããĉ$ÉÅ‹WiéééuCCCŒ= «« ###(•ÊêöáPYY¹måÊ•º[·n…äry»·mÛ6lÞ¼:::øÃþ€ùóçãéÓ§8þ>>û_6F]]]Mee% gÏžžÚÚÚB----íF‘#GjÙ³g´´´TíØöCïß¿|ëÖ­¾úê+ÌŸ?$_Éeéééiþ÷îÝjµúúúH$¨««kF___‘H Œ9rfXX˜[[üår¹Ñ™3g~‰ýutðôéÓÆqµ´T*•ªªª””èСÄb1 …q[Œ½½½Ísrr®ìÙ³ÇèæÍ›˜;wî+ ß§O<{öLóÜ¿TVV‚$²³³! [ì÷äɸ»»ÃÏÏOO¥RÅ·æ$I'Cooï_B_::¿¤@jµZõõõJ011Á¹sçðÎ;ï ¡¡_~ù%,--M,X0¶%Æ"‘ÈàÑ£Giqqq+++1cÆ (Šæé¦@kkkŒ3VVVÐÑÑAŸ>}°xñb|øP3‘òÀlhhh1ˆÉÍÍehh(_ rd2Õj5ËÊÊøùçŸsåÊ•ŒŽŽæÉ“'›Ð%&&òêÕ«šg¥RÉE‹õôôxôèQþüóÏôòòJÔqÖ¬Yßݼy“©©©477'^¼xQÃÃÃãsæÌ9˜––F’LKK£¾¾>PWW—cÇŽe^^¯]»FWWW¹X,Î ¬/((`BB;uêD®X±‚J¥²EÁ÷íÛGwww …Bêéé5Û111|÷Ýw™œœ¬y·yófFFF²®®Ž?¦——Ïž=Ë¿üå/ÌËËkÒßÓÓ“¨­­Í+V°°°Û¶mcll¬òÑ£GLIIÑìNÎ;—$YRRÂéÓ§ß‚D"'‘HH’………\½zu¿›””D…B¡YÙÔÔTŽ=Z£ù .°5üøãüè£xõêU §§g‹t)))LHH IVVV288˜;vì IN:•&&&üùçŸY[[˨¨¨&}år9‡ ¦™o×®]yêÔ)–——322’³fÍÒ´™˜˜°¤¤D£äÅ‹ÏL™2¥°qelmm›(ÀÀÀ€€~~~}ú½f>uݺu=¦M›Vݘ®^½š ÔÕÕ¥‰‰I³¤¤=xòäI“ç]»vÑÊÊŠÚÚÚ@ 3??Ÿ$YQQÁ»wï6écccÓÄ=¿÷Þ{T©TÍÆª¯¯×¸:öèуݻwçìÙ³Y\\ÌÒÒRÊårN›6­J"‘˜·]-[¶Läáá¡P(T©T¬¨¨`DDÝÜÜ8yòdvêÔ‰:tà±cÇÚ¥€³gÏ6yvwwg||<—,Y¢Yòòò&½è%âããéääD:t(“’’šÙŠFÄÅÅÿüç?sÕªULLLÔØ™LF±X\Ñva'222ÈÍÍMY\\¬Ñljj*ÓÓÓ¹aÃZXX´êò^ÄîÝ»›--®®®+W®tj×ÁˆD"™’’rÈÍÍÍÔÓÓÆÆÆP(8vì’““מJ.BCC±m[ÓC™ÊÊJœÎÌÌLþ|îÞ<ˆnݺ¡±ñ¶0gÎܼy6667rrr–º»»×<_Å~¾¾`ii9`„ ÷,X0ùðkÕ§GuuµÉËè222°mÛ6$&&BWW÷•,++CNNd2Y‹íC‡Evv6äryï7n6l˜õöíÛO¹»»ÅÄݰ°PC»e˼ ÿk?{{ûœÐÐоnn­_233áéé‰ýû÷ÃÆÆׯ_Gß¾}annÞ&ïüü|,[¶ ¦¦¦èÕ«*++Q\\Œ°°0 >¼ÙS§NU 2äÇ×Р’H$>|ÀX©T*•Ju÷îÝOoÙ²%â·žD"édkkûRÃ3vìX¾xИã·‘HÄ#GŽp÷îÝlt¿µµµŒˆˆ`LL ëêêšÐ÷Ýwtvv®´³³+Ÿ6mZÃôéÓ“Óc&Ÿ¸µk×¶8ù;wîP,ÓÈÈHÿZÆ­ÿþ6lÓÓÓ™™™Ù¤-##ƒAAAÌÉÉiµÿºuë¸hÑ"‡×‘í¥6`Ö¬Y‡srr}|| …GEHH†Jooï333GGÇ[¯«`sssL™2ýû÷GTT\\\°gÏÄ€°yóf\¹rW¯^m±ìöÁ ººzÒ[_ù°°0ñÌ™35‘×Ç9bÄš››+GukïÞ½ýi}}}÷†‡‡·¹Ò™™™LLLdeee“÷7nÜ`QQ¥R)õõõéèèH??¿f™Ÿ\.o1bLNNæìÙ³½ŽŒ:m5–””x÷îÝvvvJ¥J¥ßóèéÓ§ ©©©Ù´B¡0»   ÍÁ²³³áêêÚ¬Ò;bÄÿ;q¿ÿ> annލ¨(TVVÂÔÔg-!==FFFÞºzöì¹§¸¸X1cÆŒ%*•ª£ŽŽŽ2<<< ÀZMœ¼––VYãD[äI¿ìÒgÏžáØ±c‹Å(--EïÞ½VVVú¿þõ¯¸}û6ÆŽÛ*Ïû÷ï#!!¡N,¯ûO¿¯öBåÒ¯_?¦§§·ËðÕÔÔpíÚµœœœ  ¥‘‘‘¹o¢€×Í”èàâ §EÒƒ.ëСlllš\`lQûZZ¨®®Æ?üÐĶEoii‰âü# Íkkk§effîøOðU+wsÖ?¾hùòåíÚÎjµš3fÌhV kêëë9f̘Úÿ;H–rÛHœfXXXÐßß¿Y]°%H¥RÚÛÛóøñã|1Ý®¬¬äéÓ§¹bŠΙ3‡"‘ˆ³gÏæ¬Y³Ø¿uPPÐæ7Dð}ïüºò[jŒ²}ûööïßo0jÔ¨—2«ªªÂ† pæÌèëëCWW …2dlll —ËQSSƒ¬¬,¤¦¦–N™2Å.**ê'ü/!€o·ÄVþéOzíâGku¿Æ¶ &d¿ !´Þ o€™­5 …ÂYYYJ¥¯gµ[·Ï¿^ P¼ è¼Aß"ü@Z ÷r¾öòòš=qâD###Ì;÷•‘ËåÈËËCYYêêê```€»wï¢sçÎiø €oÚ²%QQQÝ/L}ýõ×mn{…BÁ#GŽ0<<œŽŽŽ´°°Ðˆ˜™™©œ³Åbqr``à^‰Db„ß þ ä%%rmsÞÞÞ$ɲ²²+ÁUUULIIáÌ™39fÌîÞ½›ÇŽ£™™—,YŠß1â´z›tùòåý{õê¥HLLäùóçÙ»wonÚ´©ÝqðàÁJ‰D¢ó{V€€/ti©Ñ××wsüøñšÓåÈÈHÊd²—*`Ë–-œ7oÞúßbâZo‰O€eæh–´÷íÛwUÿþýšJñ?ü€¬¬,µY?±XŒ‚‚‚iø/€.qKJˆ‰‰é;nÜ8)Z[[×›˜˜¨ß}÷ÝVÏe2X[[˸¸8zxxœÁ´äb%‰–ÏQ¡P¨ž7oÞ.üz’Ûx$ÿ|­`æÌ™üì³Ï8|øpº¸¸<ü=Yý7ú¼$‰–M¿¿ÿ&GGÇGhnnÎÛ·o“$<È^½zi.>…„„lþOò-¡Y’¿dÉ’9RARйsçí"‘h ¥¥eÃÓ§OQ\\Œ+V@,#?ÿ—ôB¥RA­Vçàÿ ¼½½¿ôõõý’¤à×çÎ_|ÑâÅ&ssó†ùó绀Îo¼h¿-¢¢¢º­ÑŠjííí ðwÞ¡‹‹K«—³zôè¡ ü4,,lþË'Ð «W¯.ìÖ­ÛgÏU ÇŒ# …¨¨¨À·ß~ÛjòSVV¦ýøñãY;wÞúæ“X¹r¥ýâÅ‹G†††~jhhH333Uã*GGÇl###Í¥§Ù³gÿóÊ•+o=ü^”្’²¦_¿~É6 …BРA{JJJÆ———[víÚõçŽ;îÞ¸qãEü¼=üwâÔLcpIEND®B`‚ColorCode-0.8.5/img/business_user.png0000644000175000017500000000140012610773251016213 0ustar dirkdirk‰PNG  IHDRóÿagAMA¯È7Šé·IDATxœ}‘ÛK“qÆ?ïÞœSwpfn¹PW›5£Ì,:bˆe.ª‹ .ºìOè¦."ˆ"º0(¢®C(¢ƒÒ,£ZiI¹95}ïœÛÜ»¹_W†¹è¹z¾ð}žï÷‘X‚–r,ÕÕúS††ãenϪ¸ªÎ¼xÝÿøÁÛ©«J†÷K÷ÿ‚³Š‹Gݽ_ŸßÓ#ýBý,ÔÈG¡ <÷Ïw¤êœ\ªÑ/ÚüúK»÷Þ†N"ü©$$HÆcØl…íõÆ‹Á^íð-ÏÀa¤®Ñg; Œ 2 ‚”#“ÖˆMưÙñ¯YϾÍú˽=hÿJPl¦ÜfÖ™"Á4mYW€ÅXÊ–@Þº:0Ê8²N{ïå ~ÅÍ}hݺ! 3XpÚKñ¬ta4›@‹CÎ@ÖP@&û÷Ù†9u>WNœ:^õÒ³¹­˜Ä,d4tz°˜xÖÝóó»Jÿ›h_g?=Ñ{EˆðS!Æ_ 1þRˆáG¢¯ó\ÊcåÐ[b{âSjþé_Ì%²™yLEåƒóÓrWhQù(+[Ó|ïþp|4*DxBˆ®® èî‘)!"Q!Î_x³k±F^ÌÏœ½z³eo³of²óÐ×&6›ÃUYÎl¼>oÙ¡1ÃÐ÷wDºR]½iϾŽö]Z2YH¦ š`|dŠT ÒÈ29vú„ÑX¼:Ï`ó–ÖO¥™B”X@SJ uz“>G‰ŒzhÜä·ú|;ò ÀÆJ7Ø­à°A& 1;‡ª&ÐëÒØ¬Pjƒš*‰ÚÚÚú¼LNLêœÎª¦îek±·ËL…k9MM5ÔûmÈD•»wºÂ·o]»žLƾHKŠp¹ÝÞfŸÏ¿Ö媨())*’Q%– …B£Ÿ?D£#o€±Áoq<%¹]IEND®B`‚ColorCode-0.8.5/highscore.h0000644000175000017500000000207012610773251014170 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef HIGHSCORE_H #define HIGHSCORE_H #include class HighScore { public: HighScore(); void NewGame(int ccnt); int GetScore(int rcnt, int t); int GetScore() const; int mCombinationsCnt; int mRowsCnt; int mTime; }; #endif // HIGHSCORE_H ColorCode-0.8.5/prefdialog.h0000644000175000017500000000460712610773251014341 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef PREFDIALOG_H #define PREFDIALOG_H #include "ui_prefdialog.h" #include "settings.h" #include "colorcode.h" #include "ccsolver.h" #include #include class PrefDialog : public QDialog, public Ui::PrefDialog { Q_OBJECT public: PrefDialog(QWidget* parent = 0, Qt::WindowFlags f = Qt::Dialog); ~PrefDialog(); void InitSettings(); void SetSettings(); virtual QSize sizeHint () const; signals: void ResetColorOrderSignal(); private slots: void ApplySlot(); void RestoreDefSlot(); void CancelSlot(); void OkSlot(); void LevelPresetChangedSlot(); void ColorCntChangedSlot(); void PegCntChangedSlot(); void DoublesChangedSlot(); void ShowIndicatorsChangedSlot(int state); void ResetColorOrderSlot(); void UseHighscoresChangedSlot(int state); void ShowTimerChangedSlot(int state); void CustomRowHColorChangedSlot(int state); void SetBtnColorSlot(); private: bool SetSuppressSlots(bool b, bool force = false); void InitControls(); void CheckLevelPresets(); void CheckDoubles(); void SetSwatchStyleSheet(QPushButton* btn, const QString colorstr); void SetBtnColor(QPushButton* btn); QColor GetCurBtnColor(const QPushButton* btn); QColor Desaturate(QColor c); void ApplySettings(); QPushButton* mRestoreBtn; QPushButton* mOkBtn; QPushButton* mApplyBtn; QPushButton* mCancelBtn; Settings* mSettings; bool mSuppressSlots; }; #endif // PREFDIALOG_H ColorCode-0.8.5/trans_en.ts0000644000175000017500000010165312610773251014234 0ustar dirkdirk UTF-8 About &Author icon &License A needful game to train your brain ;-) About ColorCode <br><br>Free MasterMind clone including a built in,<br>rather intelligent solver. Version Author This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. ButtonsCell Play this Game again Save this Game as Bookmark Remove from List Copy Game Number to Clipboard ColorCode New Game Do you want to give in and start a new Game? About Qt &New Game Ctrl+N &Restart Game Ctrl+R E&xit Ctrl+Q Ctrl+T Ctrl+C Ctrl+A About &Qt &Game &Settings &Help Game Message The changed settings will only apply to new games! Do you want to give in the current and start a new Game? Place Your pegs ... Congratulation! You have won! Sorry! You lost! Ctrl+I Give In Do you really want to give in? &Throw In The Towel Ctrl+G Sure, You're too weak for me! Ctrl+Shift+R Ctrl+Shift+C Fill Row by Random Duplicate Previous Row Ctrl+D Clear Row &Row About &ColorCode Ctrl+M Show Toolbar Show Menubar Show Statusbar Allow Pegs of the Same Color Level Computer's Guess Ctrl+H Press the Hint Field or Key Enter if You're done. Disallow Pegs of the Same Color Close Rows when the last Peg is placed Ctrl+L Beginner (2 Colors, 2 Slots, Doubles) Easy (4 Colors, 3 Slots, No Doubles) Classic (6 Colors, 4 Slots, Doubles) Challenging (8 Colors, 4 Slots, Doubles) Hard (10 Colors, 5 Slots, Doubles) Level Presets Colors Pegs of Same Color Slots Yes No Reset Color Order Ctrl+Shift+L Online &Help F1 Done Ctrl+Shift+N Rate it for me Human vs Computer Computer vs Human Game Mode Press the button below or Key Enter if You're done. Place Your secret ColorCode ... Please rate the guess. Press OK or Key Enter if You're done. The impossible happened, sorry. Yeah! I guessed it, man! Embarrassing! I lost a game! Nope! Thats impossible! Did you gave me false hints? Don't you like to see me winning? ;-) Set Hints automatically Ctrl+Shift+H Preferences Ctrl+P Show Indicators The chosen settings do not allow pegs of the same color! &Start particular Game Ctrl+B Ctrl+Alt+H &Recent Games Ctrl+Alt+R &Bookmarks Ctrl+Alt+B Ctrl+Shift+S Game &Lists guessed and rated ... Let me think ... Computer vs. Human &Highscores Ctrl+Shift+B Ctrl+Alt+N &Have a Break &Bookmark Current Game Ctrl+Shift+T Show Timer Display Game Number Allow Pegs of Same Color Disallow Pegs of Same Color Ctrl+Alt+C Ctrl+Shift+P &Resume Game Human vs. Computer Game Number Paused &Copy Game Number ColorCode GameTablesDialog ColorCode Games Game Properties User Color Count Slot Count Pegs of Same Color Yes Game Number Date and Time Duration Insert Game Number Play Recent Games Bookmarks Highscores Clear List Close No Message This will permanently remove all entries from the List. Do You want to proceed? Game Number Input Bookmarked Games High Score List Please provide a name! Otherwise your score won't be saved. Insert an arbitrary game number greater than 0 in the input field above. <br><br>The game properties like color count, slot count etc. will be displayed in the corresponding area above.<br><br>Click the Play button or press key Enter, to play the game. If a game is currently running, it will be aborted. Game Lists GamesListModel Yes No Pegs of Same Color Actions Rank User Score Date Time Colors Slots Game No. PrefDialog ... Select from predefined level settings Beginner (2 Colors, 2 Slots, Doubles) Easy (4 Colors, 3 Slots, No Doubles) Classic (6 Colors, 4 Slots, Doubles) Challenging (8 Colors, 4 Slots, Doubles) Hard (10 Colors, 5 Slots, Doubles) Slots Colors Human vs. Computer Computer vs. Human Low Medium High Preferences Controls Show or hide the Menubar. Show Menubar Show or hide the Toolbar. Show Toolbar Show or hide the Statusbar. Show Statusbar Indicators If this option is checked, an indicator inside each peg is displayed. Show Indicators inside pegs Use unique letters as indicators. Letter Indicators Use unique numbers as indicators. Number Indicators Use the same neutral background color for each peg, when indicators are shown. Hide Colors Click here if you have changed the color order and now you want to revert it to it's initial state. Reset Color Order Game Settings Select from predefined combinations of the three different level related settings, the number of colors, the number of slots (columns) and the possibility of pegs of the same color in one row. Number of Slots Number of Colors Number of pegs in a single row. Higher values are harder to guess. Number of all possible colors. Higher values are harder to guess. If this option is checked, the hidden combination may contain one or more (even all would be possible) pegs of the same color. If checked, the combination is generally harder to guess. Allow Pegs of Same Color Game Mode Select from the different game modes. In the 1. mode you have to to guess the hidden, computer generated combination, In the 2. mode your computer will try to guess your own secret combination. If checked, a row is closed as soon as you place the last peg and your guess is submitted immediatly. This option only affects the Human vs. Computer game mode. Close Rows when the last Peg is placed If checked, the computer will determine the corresponding hints for the solver's guess. This option affects only Computer vs. Human games. If checked, you only have to place your secret combination. Then the rest of the game runs automatically until the end. But you can set a delay between the guesses. Set Hints automatically Adjust the delay (in ms) between two guesses. Delay in ms Solver Strength Select from 3 different strength levels for your computer opponent. This option only affects the Computer vs. Human game mode. For the computer's guess in the Human vs. Computer mode always the highest level will be used. Show Game Timer Display Game Number Game Lists Maximum Row Count: Use Highscores Raise the dialog after a game has been won and prompt for the name Automatically insert Highscores using the name below Name (mandatory for the second option) User Interface Display the current game number in the footer. To avoid remembering, you can hide it here. Timer You may hide the timer to keep calm ;-) But note! Even hidden, time's running in the background. Game Properties Select One of the Level Presets: Or Set the Particular Properties: Game Flow Solver Limit the number of rows in game tables like highscores etc. Valid values range from 5 to 50. Use Customized Table Row Highlight Colors Foreground Background Highscores Provide a name with maximum 20 characters here to be used for highscore entries. If you checked the automatic option above, this name is mandatory, otherwise it will be used as proposal which you may change later in the dialog. Uncheck this if you are confused about the time as fast running ;-) Show Tenth and Hundredth RowHint Commit Your solution Click the circles to rate my guess. Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-) ColorCode-0.8.5/trans_cs.qm0000644000175000017500000007454512610773251014237 0ustar dirkdirk<¸dÊÍ!¿`¡½ÝBˆ‘O IO5O9‹SgS_Ã,%_Ã8‚_Ã; ¹g f¨¥9¶ELØ5ïØFÝr‰5ŒˆK: °5:¨ÉÂ8IÉÂ:Õú^} ½WŸëÞq`*Ø5I*ì0Ï6¼b=ÝÒòGßÜJ6•-“R̼2Y¦…:@Z6³(=Z6³:xZ6³h[ÂhÁt‘Ngž{ÆiSÀ‡J© ‡J©=åÀ(n5ÃÛAâ'çÛAâfEß~$»æinýU“ié9‘3EÆ@¤gzYìt/gÌõ ÎŒd<ííä=°OÜp!Uo±d&b%Òd&b[sm’>fœsº~V€Þ¯†à;¸¬.Ùn¯n!÷è~• Íò o mùÇ%-‰Ã· Œm=%'R %'R‰ñ³TEŽù“QE¦ÐþIó·ú^"ÑÆÿ“6³ÊY$Ê—…àÊ—…4Î̯Ÿ=ÿ™ÿ™D 4-É+¬.qd,­Œ¯bY¦6“Φ6“8ê¦6“Ao«Žñt«ŽòÔ«Žó«Žô4«Ž÷d«Žø”«ŽùÄ«Žüô«Žý$«ŽþT«„«´«ä«f­ ÎNÃììãF»²-»²/%)rx)rB€;°½S@"³w`bÑ*¨hÉ´!ki©7= ªu¦<ÂhF¸~n ¼™#/½¼™#E|Ó40 Ód” ^k!"Cº#ÂC-:ÑÒ&ë:ÑÒeMÉ46úY‘^,L[’“Aùu]â)´:`S/ŠÿÍÅÍô¥Æl Àî‚Ój·ÿ9>ƒH~aWÒƒ.èWÒƒEmöb‚möbGW¨2"!¥¨2"53¨2"9´«8°ÕDz'OÕDze}éo%Jøq ?Ç"0Æ% lÅ6¡ì -7QÎ9N<¬î\Z?½5A’-JHQhhyý:Ó;8 +Ã&ž WD¿)[ _|¢'¡ ea^"T laô ñ ‡ŽÜ À5 Ï ¡L;t © Þü ¶Ð.MÇ ÀZ[Ù ÞqúVß %uŽlI a_^BÖ oóN1 Œ¯B Ñîm’ &ÅÃB< -‹Zˆ VߎQ™ tÂG² „G¶ ˆ ý ˆ @Ö »ÅËØ ÌŽihõ ÖB#TÜ í¾ÄDš -Òà_b e#T— ˆ¬î.¥ ŽS™&7 ŽS™cÔ ŽôžU ”Óu  ”ýu Q —.a˜ ºïs ” É R ÝÂ#Û ÝÂWc 1Ðñ+Ï 9¼" ‡ DYò DYóV DYø˜ DYüÚ DYþ DZ^ DZ  DZâ DZ$ ‰Ëy$ ‰Ëy? Ä78eÐ Æÿ³ Š Ñhþg& t¾h%nR–-™ÞU-™ÞAž;’y ;’y>uq4Õ%„µSyµSyFÈ¿ÉÇΑ(ÔÙ(Ž+`å‘(hïÚu.]ôr¤ôsàôxô~\ôž‚˜Tå zYÝw<ß²3Q ž‡0už‡G ´‡ iq¸ &Autor&AuthorAbout&Povolení&LicenseAbout¢<br><br>Klon Free MasterMind s vestavným<br>dost schopným Yeaitelem - po íta em.Q

Free MasterMind clone including a built in,
rather intelligent solver.AboutlHra potYebná pro udr~ení bdlosti <br>vaaeho mozku :-)&A needful game to train your brain ;-)AboutO ColorCodeAbout ColorCodeAbout AutorAuthorAboutÆTento program je svobodným. Mo~ete jej aíYit a/nebo upravovat za podmínek GNU General Public License, jak jsou zveYejnny Free Software Foundation, bu podle verze 3 licence nebo (podle své volby) podle jakékoli pozdjaí verze.ï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.About VerzeVersionAbout ikonaiconAbout>Kopírovat  íslo hry do schránkyCopy Game Number to Clipboard ButtonsCell,PYehrát tuto hru znovuPlay this Game again ButtonsCell(Odstranit ze seznamuRemove from List ButtonsCell8Ulo~it tuto hru jako zálo~kuSave this Game as Bookmark ButtonsCell<PYidat nynjaí hru do &zálo~ek&Bookmark Current Game ColorCode&Zálo~ky &Bookmarks ColorCode(&Kopírovat  íslo hry&Copy Game Number ColorCode&Hra&Game ColorCode0&PYestávka na pYemýalení &Have a Break ColorCode&Nápovda&Help ColorCode$&Nejlepaí výsledky &Highscores ColorCode&Nová hra &New Game ColorCode&Nedávné hry &Recent Games ColorCode &Za ít hru znovu &Restart Game ColorCode$&Pokra ovat ve hYe &Resume Game ColorCode &Xádek&Row ColorCode&Nastavení &Settings ColorCode*&Spustit zvláatní hru&Start particular Game ColorCode&Vhodit ru ník&Throw In The Towel ColorCodeO &ColorCodeAbout &ColorCode ColorCode O &Qt About &Qt ColorCodeO QtAbout Qt ColorCode2Povolit kameny té~e barvyAllow Pegs of Same Color ColorCode@Povolit kameny se stejnou barvouAllow Pegs of the Same Color ColorCodeLZa áte ník (2 barvy, 2 pole, zdvojení)%Beginner (2 Colors, 2 Slots, Doubles) ColorCodeNNáro ná hra (8 barev, 4 pole, zdvojení)(Challenging (8 Colors, 4 Slots, Doubles) ColorCodePKlasická hra (6 barev, 4 pole, zdvojení)$Classic (6 Colors, 4 Slots, Doubles) ColorCode Vyprázdnit Yádek Clear Row ColorCodeTZavYít Yádky po umístní posledního kamene&Close Rows when the last Peg is placed ColorCodeColorCode ColorCode ColorCode barevColors ColorCode*Po íta proti  lovkuComputer vs Human ColorCode* lovk proti po íta iComputer vs. Human ColorCode(Nechat po íta hádatComputer's Guess ColorCode4BlahopYejeme! Vyhrál jste!Congratulation! You have won! ColorCode Ctrl+ACtrl+A ColorCodeCtrl+Alt+B Ctrl+Alt+B ColorCodeCtrl+Alt+C Ctrl+Alt+C ColorCodeCtrl+Shift+H Ctrl+Alt+H ColorCodeCtrl+Alt+N Ctrl+Alt+N ColorCodeCtrl+Alt+R Ctrl+Alt+R ColorCode Ctrl+BCtrl+B ColorCode Ctrl+CCtrl+C ColorCode Ctrl+DCtrl+D ColorCode Ctrl+GCtrl+G ColorCode Ctrl+HCtrl+H ColorCode Ctrl+ICtrl+I ColorCode Ctrl+LCtrl+L ColorCode Ctrl+MCtrl+M ColorCode Ctrl+NCtrl+N ColorCode Ctrl+PCtrl+P ColorCode Ctrl+QCtrl+Q ColorCode Ctrl+RCtrl+R ColorCodeCtrl+Shift+B Ctrl+Shift+B ColorCodeCtrl+Shift+C Ctrl+Shift+C ColorCodeCtrl+Shift+H Ctrl+Shift+H ColorCodeCtrl+Shift+L Ctrl+Shift+L ColorCodeCtrl+Shift+N Ctrl+Shift+N ColorCodeCtrl+Shift+P Ctrl+Shift+P ColorCodeCtrl+Shift+R Ctrl+Shift+R ColorCodeCtrl+Shift+S Ctrl+Shift+S ColorCodeCtrl+Shift+T Ctrl+Shift+T ColorCode Ctrl+TCtrl+T ColorCode6Zákázat kameny stejné barvyDisallow Pegs of Same Color ColorCode6Zákázat kameny stejné barvyDisallow Pegs of the Same Color ColorCode$Zobrazit  íslo hryDisplay Game Number ColorCode4Skute n chcete hru vzdát?Do you really want to give in? ColorCode@Chcete vzdát hru a za ít novou?,Do you want to give in and start a new Game? ColorCodeBNelíbí se vám, kdy~ vyhrávám? :-)%Don't you like to see me winning? ;-) ColorCode HotovoDone ColorCode.Zdvojit pYedchozí YádekDuplicate Previous Row ColorCode&Ukon itE&xit ColorCodeRLehká hra (4 barvy, 3 pole, bez zdvojení)$Easy (4 Colors, 3 Slots, No Doubles) ColorCode4Trapné! Já tu hru ztratil!Embarrassing! I lost a game! ColorCodeF1F1 ColorCode*Naplnit Yádek náhodnFill Row by Random ColorCodeHraGame ColorCode&Seznamy Game &Lists ColorCodeHerní re~im Game Mode ColorCode íslo hry Game Number ColorCodeVzdát seGive In ColorCodeLT~ká hra (10 barev, 5 polí, zdvojení)"Hard (10 Colors, 5 Slots, Doubles) ColorCode* lovk proti po íta iHuman vs Computer ColorCode* lovk proti po íta iHuman vs. Computer ColorCode(Nech m pYemýalet...Let me think ... ColorCode"StupeH obtí~nostiLevel ColorCode>PYednastavení stupn obtí~nosti Level Presets ColorCodeHláaeníMessage ColorCodeNová hraNew Game ColorCodeNeNo ColorCodeVNe! To není mo~né! Dal jste mi apatné rady?4Nope! Thats impossible! Did you gave me false hints? ColorCode,&Nápovda po internetu Online &Help ColorCodePozastavenoPaused ColorCode"Kameny té~e barvyPegs of Same Color ColorCode,Umístte své kameny...Place Your pegs ... ColorCode@Umístte svoj tajný ColorCode...Place Your secret ColorCode ... ColorCode°Ohodnoete, prosím, moj návrh. Pokud jste hotov, pou~ijte tla ítko OK nebo klávesu Enter.PromiHte, ale nezvládl jste to!Sorry! You lost! ColorCodeLJe jasné, ~e jste pro m pYília slabý!Sure, You're too weak for me! ColorCodeÄZmny v nastavení se projeví teprve po novém spuatní hry! Chcete vzdát nynjaí hru a za ít novou?kThe changed settings will only apply to new games! Do you want to give in the current and start a new Game? ColorCodebZvolená nastavení nedovolují kameny stejné barvy.8The chosen settings do not allow pegs of the same color! ColorCode2Bohu~el se stalo nemo~né.The impossible happened, sorry. ColorCode Jo! Já to tuail!Yeah! I guessed it, man! ColorCodeAnoYes ColorCode.Uhádnuté a hodnocené...guessed and rated ... ColorCode,Hry pYidané do zálo~ekBookmarked GamesGameTablesDialogZálo~ky BookmarksGameTablesDialogSmazat seznam Clear ListGameTablesDialog ZavYítCloseGameTablesDialogPo et barev Color CountGameTablesDialogHry ColorCodeColorCode GamesGameTablesDialogDatum a  as Date and TimeGameTablesDialogDoba trváníDurationGameTablesDialogSeznamy Game ListsGameTablesDialog íslo hry Game NumberGameTablesDialog Zadání  ísla hryGame Number InputGameTablesDialogVlastnosti hryGame PropertiesGameTablesDialog4Seznam nejlepaích výsledkoHigh Score ListGameTablesDialog"Nejlepaí výsledky HighscoresGameTablesDialog Vlo~it  íslo hryInsert Game NumberGameTablesDialog\Vlo~te do zadávacího pole výae libovolné  íslo hry vtaí ne~ 0. <br><br>Vlastnosti hry, jako jsou po et barev, po et polí atd., budou zobrazeny v odpovídající oblasti výae. <br><br>Klepnte na tla ítko PYehrát nebo stisknte klávesu Enter, aby se hra za ala pYehrávat. Pokud hra ji~ b~í, bude zruaena.0Insert an arbitrary game number greater than 0 in the input field above.

The game properties like color count, slot count etc. will be displayed in the corresponding area above.

Click the Play button or press key Enter, to play the game. If a game is currently running, it will be aborted.GameTablesDialogHláaeníMessageGameTablesDialogNeNoGameTablesDialog"Kameny té~e barvyPegs of Same ColorGameTablesDialogPYehrátPlayGameTablesDialogPoskytnte, prosím, název! V opa ném pYípad váa výsledek nebude ulo~en.;Please provide a name! Otherwise your score won't be saved.GameTablesDialogNedávné hry Recent GamesGameTablesDialogPo et polí Slot CountGameTablesDialog˜Tímto budou vaechny záznamy trvale odstranny ze seznamu. Chcete pokra ovat?OThis will permanently remove all entries from the List. Do You want to proceed?GameTablesDialogU~ivatelUserGameTablesDialogAnoYesGameTablesDialog innostiActionsGamesListModel BarvyColorsGamesListModel DatumDateGamesListModel íslo hryGame No.GamesListModelNeNoGamesListModel"Kameny té~e barvyPegs of Same ColorGamesListModelHodnostRankGamesListModelVýsledekScoreGamesListModelPoleSlotsGamesListModel asTimeGamesListModelU~ivatelUserGamesListModelAnoYesGamesListModel8... Vybrat stupeH obtí~nosti)... Select from predefined level settings PrefDialogrUpravit zpo~dní v milisekundách mezi dvma herními tahy.-Adjust the delay (in ms) between two guesses. PrefDialog2Povolit kameny té~e barvyAllow Pegs of Same Color PrefDialog~Automaticky vlo~it nejlepaí výsledky a pYitom pou~ít jméno ní~e4Automatically insert Highscores using the name below PrefDialog Pozadí Background PrefDialogLZa áte ník (2 barvy, 2 pole, zdvojení)%Beginner (2 Colors, 2 Slots, Doubles) PrefDialogNNáro ná hra (8 barev, 4 pole, zdvojení)(Challenging (8 Colors, 4 Slots, Doubles) PrefDialogPKlasická hra (6 barev, 4 pole, zdvojení)$Classic (6 Colors, 4 Slots, Doubles) PrefDialog¶Klepnte sem, pokud jste zmnil poYadí barev, a nyní to chcete vrátit do po áte ního stavu.dClick here if you have changed the color order and now you want to revert it to it's initial state.  PrefDialogTZavYít Yádky po umístní posledního kamene&Close Rows when the last Peg is placed PrefDialog barevColors PrefDialog* lovk proti po íta iComputer vs. Human PrefDialogOvládací prvkyControls PrefDialogZpo~dní v ms Delay in ms PrefDialog$Zobrazit  íslo hryDisplay Game Number PrefDialog¶Zobrazit  íslo sou asné hry v zápatí. Mo~ete je nechat zde, abyste si je nemusel pamatovat.ZDisplay the current game number in the footer. To avoid remembering, you can hide it here. PrefDialogRLehká hra (4 barvy, 3 pole, bez zdvojení)$Easy (4 Colors, 3 Slots, No Doubles) PrefDialogPopYedí Foreground PrefDialogTok hry Game Flow PrefDialogSeznamy Game Lists PrefDialogHerní re~im Game Mode PrefDialogVlastnosti hryGame Properties PrefDialogHerní nastavení Game Settings PrefDialogLT~ká hra (10 barev, 5 polí, zdvojení)"Hard (10 Colors, 5 Slots, Doubles) PrefDialogSkrýt barvy Hide Colors PrefDialog VysokáHigh PrefDialog"Nejlepaí výsledky Highscores PrefDialog* lovk proti po íta iHuman vs. Computer PrefDialog‚Kdy~ je zapnuta tato volba, je Yádek uzavYen, jakmile umístíte poslední kámen a váa herní tah je okam~it vyhodnocen. Tato volba ú inkuje pouze v herním re~imu, kdy hraje  lovk proti po íta i. If checked, a row is closed as soon as you place the last peg and your guess is submitted immediatly. This option only affects the Human vs. Computer game mode. PrefDialog†Je-li zapnuta tato volba, budou automaticky vyplnna pole s odpovídajícími radami pro odhad Yeaitele - po íta e. Tato volba ú inkuje pouze pYi hYe po íta e proti  lovku. Je-li zaakrtnuta, musíte pouze umístit své tajné spojení. Pak b~í zbytek hry automaticky a~ do konce. Ovaem mezi herními tahy mo~ete nastavit zpo~dní./If checked, the computer will determine the corresponding hints for the solver's guess. This option affects only Computer vs. Human games. If checked, you only have to place your secret combination. Then the rest of the game runs automatically until the end. But you can set a delay between the guesses. PrefDialog˜Kdy~ je zapnuta tato volba, je u ka~dého kamene zobrazen dodate ný ukazatel.EIf this option is checked, an indicator inside each peg is displayed. PrefDialogpKdy~ je zapnuta tato volba, skryté spojení mo~e obsahovat jeden nebo více kameno stejné barvy (dokonce je mo~né, ~e vaechny). Je-li zaakrtnuto, je spojení obecn obtí~nji uhodnutelné.¸If this option is checked, the hidden combination may contain one or more (even all would be possible) pegs of the same color. If checked, the combination is generally harder to guess. PrefDialogUkazatelé Indicators PrefDialog$Písmenní ukazateléLetter Indicators PrefDialogîOmezit po et Yádko v tabulkách ke hYe, jako jsou nejlepaí výsledky atd. Rozsah pou~itelných hodnot je od 5 do 50 Yádko.]Limit the number of rows in game tables like highscores etc. Valid values range from 5 to 50. PrefDialog NízkáLow PrefDialog,Nejvtaí po et Yádko: Maximum Row Count:  PrefDialogStYedníMedium PrefDialog@Jméno (povinné pro druhou volbu)&Name (mandatory for the second option) PrefDialog" íselní ukazateléNumber Indicators PrefDialogPo et barevNumber of Colors PrefDialogPo et políNumber of Slots PrefDialog†Celkový po et vaech mo~ných barev. Vyaaí hodnoty je t~aí uhodnout.ANumber of all possible colors. Higher values are harder to guess. PrefDialogzPo et kameno v jednom Yádku. Vyaaí hodnoty je t~aí uhodnout.BNumber of pegs in a single row. Higher values are harder to guess. PrefDialogDNebo nastavit zvláatní vlastnosti:!Or Set the Particular Properties: PrefDialogNastavení Preferences PrefDialogäZde napiate název, který bude mít nejvíc 20 znako, který se pou~ije pro záznamy v nejlepaích výsledcích. Pokud jste zaakrtli automatickou volbu výae, je tento název povinný, v opa ném pYípad se pou~ije jako návrh, jej~ mo~ete pozdji zmnit.æProvide a name with maximum 20 characters here to be used for highscore entries. If you checked the automatic option above, this name is mandatory, otherwise it will be used as proposal which you may change later in the dialog. PrefDialogŠVyvolat dialog poté, co hra byla vyhrána, a pobídnout k napsání jménaBRaise the dialog after a game has been won and prompt for the name PrefDialog6Znovu nastavit poYadí barevReset Color Order PrefDialogBVybrat jedno z pYednastavení hry: Select One of the Level Presets: PrefDialog Vyberte jednu ze tYí rozných herních sil pro vaaeho po íta ového protivníka. Tato volba ú inkuje pouze v herním re~imu, kdy hraje po íta proti  lovku. Pro po íta ov herní tah v re~imu, kdy hraje  lovk proti po íta i se v~dy pou~ije nejvyaaí úroveH herní síly.ÝSelect from 3 different strength levels for your computer opponent. This option only affects the Computer vs. Human game mode. For the computer's guess in the Human vs. Computer mode always the highest level will be used. PrefDialogVVyberte z pYednastavených spojení tYí rozných nastavení souvisejících se stupni obtí~nosti: po et barev, po et polí (sloupco) a mo~nost kameno stejné barvy v jednom Yádku.ÁSelect from predefined combinations of the three different level related settings, the number of colors, the number of slots (columns) and the possibility of pegs of the same color in one row.  PrefDialog\Vyberte z rozných herních re~imo. V prvním re~imu musíte uhodnout skryté, po íta em vytvoYené spojení. Ve druhém re~imu se po íta pokusí uhodnout vaae vlastní tajné spojení.ÁSelect from the different game modes. In the 1. mode you have to to guess the hidden, computer generated combination, In the 2. mode your computer will try to guess your own secret combination. PrefDialog2Nastavit rady automatickySet Hints automatically PrefDialog*Ukázat herní  asomíruShow Game Timer PrefDialogJUkázat dodate né ukazatele pro kamenyShow Indicators inside pegs PrefDialog:Ukázat pruh s hlavní nabídkou Show Menubar PrefDialog&Ukázat stavový pruhShow Statusbar PrefDialog>Ukázat desetiny a setiny sekundShow Tenth and Hundredth PrefDialog,Ukázat nástrojový pruh Show Toolbar PrefDialogRUkázat nebo skrýt pruh s hlavní nabídkou.Show or hide the Menubar. PrefDialog>Ukázat nebo skrýt stavový pruh.Show or hide the Statusbar. PrefDialogDUkázat nebo skrýt nástrojový pruh.Show or hide the Toolbar. PrefDialogpoleSlots PrefDialogPo íta Solver PrefDialogSíla po íta eSolver Strength PrefDialog asomíraTimer PrefDialog’Pokud by vás ukazatel  asu ml zneklidHovat, zruate zaakrtnutí této volbyCUncheck this if you are confused about the time as fast running ;-) PrefDialog†Pou~ít u~ivatelsky stanovené barvy pro zvýraznní Yádko v tabulkách)Use Customized Table Row Highlight Colors PrefDialog0Pou~ít nejlepaí výsledkyUse Highscores PrefDialogÈPro vaechny kameny pou~ít, v pYípad ~e jsou zobrazováni ukazatelé, stejnou nenápadnou barvu pozadí.NUse the same neutral background color for each peg, when indicators are shown. PrefDialog<Pou~ít písmena jako ukazatele.!Use unique letters as indicators. PrefDialog8Pou~ít  ísla jako ukazatele.!Use unique numbers as indicators. PrefDialog(U~ivatelské rozhraníUser Interface PrefDialogìMo~ete skrýt  asomíru, abyste byl víc v klidu. :-) Ale uvdomte si, ~e i kdy~ bude skrytá,  as poYád pob~í na pozadí.`You may hide the timer to keep calm ;-) But note! Even hidden, time's running in the background. PrefDialogÂKlepnte na kruhy pro vyhodnocení mého herního tahu. Stisknte Ctrl+H nebo odpovídající tla ítko v nástrojovém pruhu, abyste pYenesl onu zále~itost s vyhodnocením na tu moji  ást, která je v tomto pYípad zcela nestranná. :-)…Click the circles to rate my guess. Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-)RowHint(Vyzkouaet své YeaeníCommit Your solutionRowHintˆÿColorCode-0.8.5/cc32.ico0000644000175000017500000001027612610773251013301 0ustar dirkdirk  ¨( @ €uƒ~}Žÿ^Y›ÿSM¤ÿRLžÿd^”ÿ‰ˆ‹ÿŽ‹ÿ’’’ÿ’’’ÿ“““ÿ“““ÿ“““ÿ“““ÿ’’’ÿ’’’ÿ‹‹‹ÿÿ’’’ÿ¨¨¨ÿ±±±ÿ¥¥¥ÿÿrrrƒghh/€Šÿ:5¶þ ºÿ¹ÿ¹ÿ¶ÿ ³ÿ «ÿLC›ÿ‘‘ÿšššÿ™™™ÿ™™™ÿ™™™ÿ™™™ÿšššÿ†††ÿšššÿÓÓÓÿàààÿàààÿßßßÿßßßÿÞÞÞÿÏÏÏþÿhhh/ggg/||“ÿÂÿÄÿÄÿÄÿÁÿ¿ÿºÿ¶ÿ±ÿ, £ÿ“’“ÿ   ÿ   ÿ   ÿ   ÿ‰‰‰ÿ«««ÿáááÿäääÿèèèÿêêêÿêêêÿèèèÿäääÿßßßÿÜÜÜÿ¢¢¢ÿggg/‚ÿÇÿÊÿÌÿÌÿËÿÉÿÆÿÃÿ½ÿ¸ÿ±ÿ:/¡ÿ¡¡ÿ¥¥¥ÿ¥¥¥ÿ›››ÿ”””ÿãããÿèèèÿîîîÿðððÿðòòÿðññÿïððÿíííÿèèèÿâââÿÜÜÜÿÿwwoƒHJ¯þÒÿÔÿÕÿÕÿÓÿÑÿÌÿÉÿÄÿ¾ÿ·ÿ ®ÿxt—ÿ­­­ÿ­­­ÿ{{{ÿÖÖÖÿéééÿïññÿðôôÿðõõÿðõõÿðõõÿðóóÿðññÿîîîÿèèèÿßßßÿÍÍÍþsssƒzytÿ ÑÿÙÿÛÿÛÿÜÿÙÿ×ÿÓÿÎÿÉÿÃÿ»ÿ´ÿF=£ÿ«¬©ÿ«««ÿ‚‚‚ÿêêêÿïððÿðôôÿð÷÷ÿðøøÿð÷÷ÿð÷÷ÿï÷÷ÿðóóÿðòòÿíííÿäääÿÞÞÞÿÿfhvÿ âÿáÿ ãÿ ãÿ âÿàÿÝÿÙÿÔÿÍÿÇÿÁÿ¸ÿ$¬ÿ­®¦ÿšššÿœœœÿëëëÿðóóÿð÷÷ÿòùùÿôùùÿôùùÿóùùÿñøøÿï÷÷ÿïóóÿðððÿèèèÿßßßÿ¤¤¤ÿVXmÿìÿ çÿ éÿ éÿ çÿ åÿ âÿÝÿØÿÒÿÊÿÄÿ»ÿ°ÿ²³©ÿÿ£££ÿíííÿïööÿòøøÿöúúÿöûûÿõúúÿõúúÿóùùÿð÷÷ÿðõõÿðññÿêêêÿßßßÿ±±±ÿPQaÿðÿ "ìÿ #îÿ"îÿ !ìÿ éÿ æÿ áÿÜÿÖÿÎÿÆÿ¾ÿ#±ÿ³³¬ÿ™™™ÿÿïïïÿðööÿôùùÿùüüÿùüüÿøüüÿõúúÿôùùÿð÷÷ÿðõõÿðòòÿêêêÿàààÿ¨¨¨ÿVUNÿ %çÿ$òÿ%òÿ$òÿ#ðÿ !ìÿ éÿ äÿÝÿØÿÏÿÇÿ¿ÿF@¬ÿµµ²ÿµµµÿYYYÿõõõÿïööÿõùùÿûýýÿýýýÿùüüÿöûûÿôùùÿðøøÿðõõÿðððÿèèèÿàààÿ’’’ÿrrmÿ!“ÿ&ùÿ&÷ÿ%õÿ$òÿ "ïÿ !êÿ äÿÞÿØÿÐÿÇÿ ¿ÿyv ÿÇÇÇÿÉÉÉÿHHHÿ×××ÿïòòÿòùùÿùüüÿûýýÿùüüÿöúúÿòùùÿð÷÷ÿïôôÿïîîÿäääÿÓÓÓÿÿÿ0/,ÿ)öÿ)úÿ'øÿ%õÿ#ñÿ !êÿ åÿÞÿØÿÏÿÇÿ94µÿ²²«ÿÉÉÉÿÉÉÉÿ   ÿNNNÿõõõÿðõõÿòùùÿõùùÿôùùÿòøøÿð÷÷ÿðóóÿðññÿèèèÿáááÿšššÿŒŒŒÿ’’’ÿƒƒƒÿ5ÿ*ÿÿ'ùÿ&õÿ"ðÿ êÿ äÿÝÿÖÿÍÿ&%¿ÿ™™œÿËËËÿÊÊÊÿÊÊÊÿÌÌÌÿbbbÿqqqÿõõõÿïóóÿïööÿðööÿïööÿðóóÿïððÿéééÿãããÿ«««ÿ†††ÿ’’’ÿ’’’ÿšššÿ„„ƒÿ -ÿ &Æÿ#üÿ ðÿ èÿ âÿ ÝÿÕÿDE²ÿ™™—ÿÉÉÉÿËËËÿÌÌÌÿÌÌÌÿËËËÿÌÌÌÿaaaÿMMMÿ×××ÿõõõÿïïïÿíííÿëëëÿêêêÿÖÖÖÿ•••ÿˆˆˆÿšššÿ’’’ÿ“““ÿ™™™ÿ   ÿ¡¡¢ÿ\[Qÿ68Kÿ-6ÿ0:¦ÿ8?¨ÿRV˜ÿ€€‰ÿ¬¬§ÿÌÌÌÿËËËÿÍÍÍÿÎÎÎÿÎÎÎÿÍÍÍÿËËËÿÌÌÌÿŸŸŸÿHHHÿYYYÿÿ£££ÿœœœÿÿ{{{ÿ›››ÿ   ÿ™™™ÿ“““ÿ“““ÿ™™™ÿ   ÿ¥¥¥ÿ­­­ÿ®®®ÿœœ›ÿ‘‘ÿžžœÿ²²²ÿÇÇÈÿÉÉÉÿÊÊÊÿÌÌÌÿÎÎÎÿÎÎÎÿÎÎÎÿÎÎÎÿÌÌÌÿÊÊÊÿÉÉÉÿÉÉÉÿ´´´ÿ™™™ÿÿšššÿ«««ÿ­­­ÿ¥¥¥ÿ   ÿ™™™ÿ“““ÿ“““ÿ™™™ÿ   ÿ¥¥¥ÿ­­­ÿ¨©ªÿ£¨«ÿ§®³ÿ«°µÿ²¶¸ÿÇÇÇÿÉÉÉÿÊÊÊÿÌÌÌÿÎÎÎÿÎÎÎÿÎÎÎÿÎÎÎÿÌÌÌÿÊÊÊÿÉÉÉÿÇÇÇÿµ²±ÿ²«©ÿ±©¦ÿ«¥£ÿ«©¨ÿ­­­ÿ¥¥¥ÿ   ÿ™™™ÿ“““ÿ“““ÿ™™™ÿ   ÿšœÿš”ŒÿºRÿÏo%ÿÕaÿÑ`ÿÄj-ÿ¬{[ÿ®±³ÿËËËÿËËËÿÍÍÍÿÎÎÎÿÎÎÎÿÍÍÍÿËËËÿËÌÌÿ°«ªÿ‚£¯ÿ[¶Õÿ>¾éÿ3¿îÿ;»æÿT­Ïÿ~›§ÿ œšÿ   ÿ™™™ÿ“““ÿ’’’ÿšššÿ‘•ÿµ‰^ÿÞl ÿÝoÿÜpÿÜnÿÚjÿÙeÿØ^ÿËXÿ§“„ÿÉÉÉÿËËËÿÌÌÌÿÌÌÌÿËËËÿÉÉÉÿ››œÿU¿Þÿ6Ëõÿ=Ëòÿ=Êòÿ;Èñÿ9Æñÿ8Ãðÿ,¾òÿI«Ñÿ““”ÿšššÿ’’’ÿ’’’ÿˆŠÿ»‰Vÿâxÿá~ÿá~ÿá|ÿßxÿÞtÿÜoÿÛjÿØcÿÓSÿ¨“„ÿËËËÿÊÊÊÿÊÊÊÿËËËÿ™˜˜ÿMÈêÿBÑóÿCÒóÿDÒóÿBÐóÿAÏòÿ?Ìòÿ;Éòÿ9Åñÿ4Âñÿ=±Üÿ‘ŽŽÿ’’’ÿŒŒÿ–‡uÿç‚ÿä‰ÿæ‹ÿæ‹ÿäˆÿä†ÿâÿàzÿÝsÿÚjÿØcÿÌXÿ®±²ÿÉÉÉÿÉÉÉÿ«§¥ÿe¸ÎÿFØõÿIØôÿKÙõÿJØôÿI×ôÿGÔóÿDÒóÿAÎóÿ=Ëòÿ8Æñÿ3ÁñÿW¤Áÿ‹‹ÿ{…ÿÐŒ3ÿè‘ÿé–ÿé˜ÿé—ÿè”ÿçÿå‹ÿã‚ÿá|ÿÝsÿÛjÿØ^ÿ­|[ÿÇÇÇÿÈÈÈÿ„ŠŒÿJÞúÿPÞöÿQßöÿRßöÿRÞöÿOÝöÿMÛõÿIØõÿFÓóÿAÐóÿ=Êòÿ8Åñÿ-»ïÿ‰Œÿywuÿê—ÿëŸÿì£ÿì£ÿí¢ÿë ÿêšÿè“ÿæ‹ÿãƒÿàzÿÜoÿÙeÿÅk-ÿ²¶¹ÿ²²²ÿj›¨ÿSãùÿWä÷ÿYä÷ÿXä÷ÿWä÷ÿTâ÷ÿRßöÿNÜõÿIØôÿEÓôÿ@Îòÿ:Çñÿ1Âóÿl™©ÿxnbÿô¨ÿï¬ÿð¯ÿð¯ÿð­ÿî©ÿí£ÿëœÿè“ÿå‹ÿâÿÞuÿÛjÿÑ_ÿª°µÿœœÿa¬·ÿ\çùÿ_éøÿ`éùÿ_éùÿ_èøÿ[æøÿWã÷ÿRß÷ÿMÛõÿI×ôÿCÑóÿ=Ëòÿ7Åñÿ^¦Àÿk`Sÿù·ÿò· ÿó¹!ÿó¹!ÿó· ÿñ±ÿð¬ÿí£ÿêšÿçÿä†ÿßxÿÜnÿÔaÿ§®²ÿ‘ÿ\©³ÿdìùÿgîùÿiïúÿgîúÿeìùÿaëùÿ\æøÿWã÷ÿQÞöÿLÚõÿFÔôÿ@Íòÿ9Æñÿ`­Èÿ[VRÿø¼ ÿõÂ"ÿöÄ#ÿõÃ"ÿõ¾"ÿóº!ÿñ²ÿî¨ÿë ÿè•ÿäˆÿá|ÿÜpÿÏo%ÿ£¨«ÿœ››ÿQ—ÿlòýÿpòúÿpòûÿmñûÿkðúÿeíùÿ`éùÿZåøÿTàöÿNÜõÿGÕôÿ@Îóÿ8Èóÿj ´ÿINVÿÛ¬&ÿøÌ%ÿøÍ&ÿøË%ÿ÷Æ$ÿõ¿"ÿó· ÿð­ÿí¢ÿé—ÿæ‹ÿá~ÿÝoÿºQÿ¨©ªÿ®®®ÿ. */ #include "highscoresmodel.h" #include "gametableview.h" HighScoresModel* GetHighScoresModel() { static HighScoresModel* m = new HighScoresModel(); return m; } HighScoresModel::HighScoresModel(QObject* parent) : GamesListModel(parent) { mId = MODEL_ID_HIGH; mEditIndex = QModelIndex(); mMaxSize = 20; } bool HighScoresModel::IsValidHighScore(const int score) const { if (mGamesList.size() < mMaxSize || mGamesList.last().mScore < score) { return true; } return false; } void HighScoresModel::InsertRow(CCGame g) { if (mEditIndex.isValid()) { emit CloseEditorSignal(mEditIndex); } mView->clearSelection(); beginInsertRows(QModelIndex(), rowCount(), rowCount()); mGamesList.push_back(g); endInsertRows(); QModelIndex mix = index(rowCount() - 1, GetColIx(COL_DELETE), QModelIndex()); mView->openPersistentEditor(mix); DoSort(mGamesList); LimitGamesListSize(); int ix = mGamesList.indexOf(g); emit layoutChanged(); if (ix > -1) { mEditIndex = createIndex(ix, GetColIx(COL_USERNAME)); EditField(); } } int HighScoresModel::GetColIx(const int ix) const { int ret = -1; if (ix == COL_RANKING) { ret = 0; } else if (ix == COL_SCORE) { ret = 1; } else if (ix == COL_USERNAME) { ret = 2; } else if (ix == COL_DELETE) { ret = 3; } return ret; } int HighScoresModel::GetMaxColCnt() const { return 4; } void HighScoresModel::DoSort(QList &list) { qSort(list.begin(), list.end(), GamesListModel::SortListScore); } ColorCode-0.8.5/trans_fr.qm0000644000175000017500000007675312610773251014244 0ustar dirkdirk<¸dÊÍ!¿`¡½ÝBˆ‘×O!ïO9O=³SgX9_Ã/k_Ã<¦_Ã?L¹g Ĩ¥=E¶EîØ5[ïØL7r‰9 ˆK>?°5>ÞÉÂzZ6³*ñZ6³>¬Z6³lÎ[Âm…t‘NlL{ÆiXø‡J©ý‡J©B‘À(n9ÓÛAâ*“ÛAâjíß~&ëæisïU“n›9‘3K@¤gYìt2ÅÌõ vÎŒhÂííäBPOÜp"éUo±-d&b($d&ba©m’>kLsº~[®€ÞÕ†à@&¬.Ù\¯n#×è~• !ò o"ùÇ%/‰Ã‰ Œr1%'R ñ%'R@Ü7Ñt¾fïÅ©n¸¡Ut çIõuˆ%Âuˆ%Jj‰ñ³YŽù“Vq¦ÐþNµ·ú^$³Æÿ“:­ÊY%æÊ—…!†Ê—…8Ö̯Ÿ³ÿ™»ÿ™I 41+¬1eqd/댯bg¦6“â¦6“= ¦6“FA«Žñª«Žòú«Žó*«ŽôN«Ž÷r«Žø–«Žùº«ŽüÞ«Žý«Žþ&«J«n«’«„­ ÎSÓììãK绲ÿ»²2u)rÈ)rGf;°½XÉ@"³!M`bÑ-¢hÉ´#/i©;M ªu¦<Âlü¸~nb¼™#3)¼™#J¨Ó43‹Ói, ^oÈ!"Cü#ÂC0V:ÑÒ):ÑÒi²MÉ4:þY‘^/’[’“F×u]â ´:`XaŠÿ1ÅÍôÃÆl jî‚Óoaÿ9>“H~aWÒƒ28WÒƒJ3möb rmöbL­¨2"#c¨2"9=¨2"=Þ«<ÔÕDz)éÕDzjéo%šøq DGÇ"4B% q‘6¡ì ­7QÎ=t<¬îb¦?½÷A’0’HQhm3ý:Ó?x +Ã) WD¿, _|¢*E ea^$0 laô ¯ ‡Ž Ò À5 3 ¡L; Ê © Þ ¶Ð.RÇ ÀZb Þqú\Ý %uŽpó a_^GÐ oóN4¯ Œ¯B Ñîrˆ &ÅÃG -‹`° VߎVÅ tÂM „G° ˆ ù ˆ E »ÅË ÌŽim¹ ÖB#Z8 í¾ÄI¸ -Òàd4 e#Yå ˆ¬î2 ŽS™(— ŽS™hD ŽôžZ„ ”Óu!« ”ýu —.e€ ºïs ô É l ÝÂ%§ ÝÂ]O 1Ðñ/ 9¼"o DYò DYóì DYø DYü@ DYþj DZ” DZÖ DZ DZB ‰Ëy ‰ËyC´ Ä78jl Æÿ³ Ô ÑhþkÌ t¾H%nR¨-™Þu-™ÞFv;’yŽ;’yC#q4Õ'صSyµSyKTÈ¿ÉmΑ+|Ù(Ž.’å‘+ïÚu1µôrÎôs ôxFô~‚ôž‚¾Tå YÝwAg²3V ž‡3óž‡Ld´‡ BivB&Auteur&AuthorAbout&Licence&LicenseAbout<br><br>Clone du logiciel MasterMind incluant un résolveur plutôt malin.Q

Free MasterMind clone including a built in,
rather intelligent solver.AboutxUn programme incontournable pour entraîner votre cerveau ;-)&A needful game to train your brain ;-)About*À propos de ColorCodeAbout ColorCodeAbout AuteurAuthorAboutÐCe programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier selon les termes de la GNU General Public License (licence générale publique du projet GNU), telle qu'elle est publiée par la Free Software Foundation (Fondation pour le Logiciel Libre), soit sous sa version 3, soit (selon votre choix) sous n'importe quelle version ultérieure.ï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.AboutVersionVersionAbout icôneiconAboutbCopier le numéro de partie dans le Presse-papiersCopy Game Number to Clipboard ButtonsCell(Rejouer cette partiePlay this Game again ButtonsCell&Effacer de la listeRemove from List ButtonsCellLEnregister un signet pour cette partieSave this Game as Bookmark ButtonsCell.&Mettre unsignet au jeu&Bookmark Current Game ColorCode&Signets &Bookmarks ColorCode6&Copier le numéro de partie&Copy Game Number ColorCode&Partie&Game ColorCode &Mettre en pause &Have a Break ColorCode &Aide&Help ColorCode"&Meilleurs scores &Highscores ColorCode &Nouvelle partie &New Game ColorCode"&Parties récentes &Recent Games ColorCode*&Redémarrer la partie &Restart Game ColorCode$&Redémarrer le jeu &Resume Game ColorCode&Rangée&Row ColorCode&Préférences &Settings ColorCodeF&Démarrer une partie en particulier&Start particular Game ColorCode2&Donner sa langue au chat&Throw In The Towel ColorCode,À propos de &ColorCodeAbout &ColorCode ColorCodeÀ propos de &Qt About &Qt ColorCodeÀ propos de QtAbout Qt ColorCodeHAutoriser des fiches de même couleurAllow Pegs of Same Color ColorCodeTAutoriser plusieurs fiches de même couleurAllow Pegs of the Same Color ColorCodeNDébutant (2 couleurs, 2 trous, doubles)%Beginner (2 Colors, 2 Slots, Doubles) ColorCodeJÉvolué (8 couleurs, 4 trous, doubles)(Challenging (8 Colors, 4 Slots, Doubles) ColorCodePClassique (6 couleurs, 4 trous, doubles)$Classic (6 Colors, 4 Slots, Doubles) ColorCode"Effacer la rangée Clear Row ColorCodelFinaliser la rangée quand la dernière fiche est placée&Close Rows when the last Peg is placed ColorCodeColorCode ColorCode ColorCodeCouleursColors ColorCode0Ordinateur contre HumainComputer vs Human ColorCode0Ordinateur contre HumainComputer vs. Human ColorCode*Essai de l'ordinateurComputer's Guess ColorCodeBCongratulations ! Vous gagnâtes !Congratulation! You have won! ColorCodeÿÿÿÿCtrl+A ColorCodeCtrl+Alt+B Ctrl+Alt+B ColorCodeCtrl+Alt+C Ctrl+Alt+C ColorCodeCtrl+Alt+H Ctrl+Alt+H ColorCodeCtrl+Alt+N Ctrl+Alt+N ColorCodeCtrl+Alt+R Ctrl+Alt+R ColorCode Ctrl+BCtrl+B ColorCodeÿÿÿÿCtrl+C ColorCodeÿÿÿÿCtrl+D ColorCodeÿÿÿÿCtrl+G ColorCodeÿÿÿÿCtrl+H ColorCodeÿÿÿÿCtrl+I ColorCodeÿÿÿÿCtrl+L ColorCodeÿÿÿÿCtrl+M ColorCodeÿÿÿÿCtrl+N ColorCodeÿÿÿÿCtrl+P ColorCodeÿÿÿÿCtrl+Q ColorCode Ctrl+RCtrl+R ColorCodeÿÿÿÿ Ctrl+Shift+B ColorCodeÿÿÿÿ Ctrl+Shift+C ColorCodeÿÿÿÿ Ctrl+Shift+H ColorCodeÿÿÿÿ Ctrl+Shift+L ColorCodeÿÿÿÿ Ctrl+Shift+N ColorCodeCtrl+Shift+P Ctrl+Shift+P ColorCodeÿÿÿÿ Ctrl+Shift+R ColorCodeCtrl+Shift+S Ctrl+Shift+S ColorCodeCtrl+Shift+T Ctrl+Shift+T ColorCodeÿÿÿÿCtrl+T ColorCodeVNe pas autoriser des fiches de même couleurDisallow Pegs of Same Color ColorCodeTInterdire plusieurs fiches de même couleurDisallow Pegs of the Same Color ColorCode8Afficher le numéro de partieDisplay Game Number ColorCodeFVoulez-vous réellement abandonner ?Do you really want to give in? ColorCodepVoulez-vous abandonner et démarrer une nouvelle partie ?,Do you want to give in and start a new Game? ColorCode>Aimez-vous me voir gagner ? ;-)%Don't you like to see me winning? ;-) ColorCodeFaitDone ColorCode<Dupliquer la rangée précédenteDuplicate Previous Row ColorCode&QuitterE&xit ColorCodeXFacile (4 couleurs, 3 trous, pas de doubles)$Easy (4 Colors, 3 Slots, No Doubles) ColorCodeHEmbarassant ! J'ai perdu la partie !Embarrassing! I lost a game! ColorCodeÿÿÿÿF1 ColorCode4Garnir la rangée au hasardFill Row by Random ColorCode PartieGame ColorCode&Parties Game &Lists ColorCodeMode de jeu Game Mode ColorCode Numéro de partie Game Number ColorCodeAbandonnerGive In ColorCodeRDifficile (10 couleurs, 5 trous, doubles)"Hard (10 Colors, 5 Slots, Doubles) ColorCode0Humain contre OrdinateurHuman vs Computer ColorCode0Humain contre OrdinateurHuman vs. Computer ColorCodeJe réfléchis...Let me think ... ColorCode NiveauLevel ColorCodeNiveaux Level Presets ColorCodeÿÿÿÿMessage ColorCodeNouvelle partieNew Game ColorCodeNonNo ColorCode‚Nenni ! Ceci est impossible ! M'avez-vous donné de faux indices ?4Nope! Thats impossible! Did you gave me false hints? ColorCode&Aide en ligne Online &Help ColorCodeEn pausePaused ColorCodeDFiches de même couleurs autoriséesPegs of Same Color ColorCode(Placez vos fiches...Place Your pegs ... ColorCodeFPlacez votre code couleur secret...Place Your secret ColorCode ... ColorCodešEvaluer l'essai. Cliquer OK ou presser la touche Entrée quand vous êtes prêt.<br>Les propriétés de la partie, comme le nombre de couleurs, le nombre de fiches, etc. seront affichées dans la zone correspondante ci-dessus.<br><br>Cliquer sur le bouton Jouer ou presser la touche Entrée pour commencer une partie. Si une partie est en cours, elle sera arrêtée.0Insert an arbitrary game number greater than 0 in the input field above.

The game properties like color count, slot count etc. will be displayed in the corresponding area above.

Click the Play button or press key Enter, to play the game. If a game is currently running, it will be aborted.GameTablesDialogMessageMessageGameTablesDialogNonNoGameTablesDialog,Fiches de même couleurPegs of Same ColorGameTablesDialog JouerPlayGameTablesDialogzMerci de donner un nom! Votre score ne serait pas enregistré.;Please provide a name! Otherwise your score won't be saved.GameTablesDialog Parties récentes Recent GamesGameTablesDialog Nombre de fiches Slot CountGameTablesDialog¦Ceci effacera définitivement tous les éléments de la liste. Voulez-vous continuer ?OThis will permanently remove all entries from the List. Do You want to proceed?GameTablesDialogUtilisateurUserGameTablesDialogOuiYesGameTablesDialogActionsActionsGamesListModelCouleursColorsGamesListModelDateDateGamesListModelPartie No.Game No.GamesListModelNonNoGamesListModel,Fiches de même couleurPegs of Same ColorGamesListModelClassementRankGamesListModel ScoreScoreGamesListModel TrousSlotsGamesListModel HeureTimeGamesListModelUtilisateurUserGamesListModelOuiYesGamesListModelf... Sélectionner à partir des préférences de niveau)... Select from predefined level settings PrefDialogjRégler le délai (en millisecondes) entre deux essais.-Adjust the delay (in ms) between two guesses. PrefDialogTAutoriser plusieurs fiches de même couleurAllow Pegs of Same Color PrefDialog–Insérer automatiquement les meilleurs scores en utilisant le nom ci-dessous4Automatically insert Highscores using the name below PrefDialogArrière-plan Background PrefDialogNDébutant (2 couleurs, 2 trous, doubles)%Beginner (2 Colors, 2 Slots, Doubles) PrefDialogJÉvolué (8 couleurs, 4 trous, doubles)(Challenging (8 Colors, 4 Slots, Doubles) PrefDialogPClassique (6 couleurs, 4 trous, doubles)$Classic (6 Colors, 4 Slots, Doubles) PrefDialogÆCliquer ici si vous avez changé l'ordre des couleurs et que vous voulez revenir à son état initial.dClick here if you have changed the color order and now you want to revert it to it's initial state.  PrefDialoglFinaliser la rangée quand la dernière fiche est placée&Close Rows when the last Peg is placed PrefDialogCouleursColors PrefDialog0Ordinateur contre HumainComputer vs. Human PrefDialogContrôlesControls PrefDialog,Délai en millisecondes Delay in ms PrefDialog8Afficher le numéro de partieDisplay Game Number PrefDialogÔAfficher le numéro de cette partie dans en bas de fenêtre. Pour éviter de vous en souvenir, cachez-le ici.ZDisplay the current game number in the footer. To avoid remembering, you can hide it here. PrefDialogXFacile (4 couleurs, 3 trous, pas de doubles)$Easy (4 Colors, 3 Slots, No Doubles) PrefDialogAvant-plan Foreground PrefDialogFlux de jeu Game Flow PrefDialogParties Game Lists PrefDialogMode de jeu Game Mode PrefDialog.Propriétés de la partieGame Properties PrefDialog$Préférences de jeu Game Settings PrefDialogRDifficile (10 couleurs, 5 trous, doubles)"Hard (10 Colors, 5 Slots, Doubles) PrefDialog&Cacher les couleurs Hide Colors PrefDialog ÉlevéHigh PrefDialog Meilleurs scores Highscores PrefDialog0Humain contre OrdinateurHuman vs. Computer PrefDialogèSi cette opions est cochée, votre essai est immédiatement évalué dès que la dernière fiche est placée dans son trou. If checked, a row is closed as soon as you place the last peg and your guess is submitted immediatly. This option only affects the Human vs. Computer game mode. PrefDialogÄSi cette option est cochée, l'ordinateur déterminera les indices pour l'essai. Cette option affecte uniquement les parties Ordinateur contre Humain. Si cette option est cochée, il vous faut uniquement définir une combinaison secrète. Ensuite, la partie se déroule automatiquement jusques à la fin. Vous pouvez régler un délai entre les essais, cependant./If checked, the computer will determine the corresponding hints for the solver's guess. This option affects only Computer vs. Human games. If checked, you only have to place your secret combination. Then the rest of the game runs automatically until the end. But you can set a delay between the guesses. PrefDialog¨Si cette option est cochée, un indicateur est affiché à l'intérieur de chaque fiche.EIf this option is checked, an indicator inside each peg is displayed. PrefDialogvSi cette option est cochée, la combinaison cachée peut contenir une ou plusieurs (ou toutes) fiches de même couleur. Dans ce cas, la combinaison est généralement plus difficile à deviner.¸If this option is checked, the hidden combination may contain one or more (even all would be possible) pegs of the same color. If checked, the combination is generally harder to guess. PrefDialog(Indicateurs de fiche Indicators PrefDialog$Lettres indicateurLetter Indicators PrefDialogøLimiter le nombre de lignes dans les tableaux, comme les meilleurs scores, etc. Valeurs autorisées comprises entres 5 et 50.]Limit the number of rows in game tables like highscores etc. Valid values range from 5 to 50. PrefDialogBasLow PrefDialog6Nombre maximum de rangées :Maximum Row Count:  PrefDialog MoyenMedium PrefDialogRNom (obligatoire pour la deuxième option)&Name (mandatory for the second option) PrefDialog&Chiffres indicateurNumber Indicators PrefDialog$Nombre de couleursNumber of Colors PrefDialogNombre de trousNumber of Slots PrefDialogÊNombre de couleurs autorisées. Plus le nombre est élevé, plus la combinaison est difficile à deviner.ANumber of all possible colors. Higher values are harder to guess. PrefDialogÎNombre de fiches sur une rangée. Plus le nombre est élevé, plus la combinaison est difficile à deviner.BNumber of pegs in a single row. Higher values are harder to guess. PrefDialog2Ou régler les propriétés:!Or Set the Particular Properties: PrefDialogPréférences Preferences PrefDialogDonner un nom de 20 caractères au plus pour identifier les valeurs des meilleurs scores. Si l'option automatique ci-dessus est cochée, ce nom est obligatoire, sinon il sera employé comme proposition qu'il sera possible de modifier plus loin dans cette boîte de dialogue.æProvide a name with maximum 20 characters here to be used for highscore entries. If you checked the automatic option above, this name is mandatory, otherwise it will be used as proposal which you may change later in the dialog. PrefDialog˜Afficher la boîte de dialogue quand une partie est gagnée et demander le nomBRaise the dialog after a game has been won and prompt for the name PrefDialogDRéinitialiser l'ordre des couleursReset Color Order PrefDialogJChoisir l'un des niveaux disponibles: Select One of the Level Presets: PrefDialog’Sélectionner la force de votre adversaire parmi trois niveaux prédéfinis.ÝSelect from 3 different strength levels for your computer opponent. This option only affects the Computer vs. Human game mode. For the computer's guess in the Human vs. Computer mode always the highest level will be used. PrefDialoglSélectionner un niveau à partir de niveaux prédéfinis.ÁSelect from predefined combinations of the three different level related settings, the number of colors, the number of slots (columns) and the possibility of pegs of the same color in one row.  PrefDialogäSélectionner un mode de jeu parmi ceux disponibles. Dans le mode 1 il vous faut deviner la combinaison cachée, telle que choisie par l'ordinateur. Dans mode 2, l'ordinateur doit deviner la combinaison telle que vous l'aurez choisie vous-même.ÁSelect from the different game modes. In the 1. mode you have to to guess the hidden, computer generated combination, In the 2. mode your computer will try to guess your own secret combination. PrefDialogHAfficher les indices automatiquementSet Hints automatically PrefDialog<Afficher le minuteur de partieShow Game Timer PrefDialogLMontrer les indicateurs sur les fichesShow Indicators inside pegs PrefDialog2Afficher la barre de menu Show Menubar PrefDialog0Afficher la barre d'étatShow Statusbar PrefDialogJMontrer les dizièmes et les centièmesShow Tenth and Hundredth PrefDialog4Afficher la barre d'outils Show Toolbar PrefDialogHAfficher ou cacher la barre de menu.Show or hide the Menubar. PrefDialogFAfficher ou cacher la barre d'état.Show or hide the Statusbar. PrefDialogJAfficher ou cacher la barre d'outils.Show or hide the Toolbar. PrefDialog TrousSlots PrefDialogRésolveurSolver PrefDialog$Force du résolveurSolver Strength PrefDialogMInuteurTimer PrefDialog€Décocher cette case si vous êtes gêné par le temps qui court ;-)CUncheck this if you are confused about the time as fast running ;-) PrefDialog~Utiliser des couleurs personnalisées pour les lignes du tableau)Use Customized Table Row Highlight Colors PrefDialog:Utiliser les meilleurs scoresUse Highscores PrefDialog¾Utiliser la même couleur de fond neutre pour chaque fiche, quand les indicateurs sont affichés.NUse the same neutral background color for each peg, when indicators are shown. PrefDialog^Utiliser des lettres uniques comme indicateurs.!Use unique letters as indicators. PrefDialog`Utiliser des chiffres uniques comme indicateurs.!Use unique numbers as indicators. PrefDialog*Interface utilisateurUser Interface PrefDialogèCachez-donc le minuteur pour garder votre sang-froid ;-) Attention ! Même caché, le minuteur tourne en arrière-plan.`You may hide the timer to keep calm ;-) But note! Even hidden, time's running in the background. PrefDialogVCliquer les cercles pour évaluer mon essai. Pressez Ctrl+H ou le bouton de barre d'outils pour que je le fasse à votre place de la manière la plus impartiales possible ;-)…Click the circles to rate my guess. Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-)RowHint,Envoyer votre solutionCommit Your solutionRowHintˆColorCode-0.8.5/pegfactory.cpp0000644000175000017500000002362612610773251014725 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include #include "pegfactory.h" using namespace std; const int PegFactory::XPOS_BTNS_COL = 279; PegFactory::PegFactory() { mWin = ColorCode::INSTANCE; mSettings = GetSettings(); mHideColors = false; InitTypesMap(); InitPegBtns(); } ColorPeg* PegFactory::CreatePeg(int ix) { if (ix < 0 || ix >= ColorCode::mColorCnt) { ix = mAllPegs.size() % ColorCode::mColorCnt; } QPoint btnpos = mBtnPos[ix]; PegType *pt = mTypesMap[ix]; ColorPeg *peg; if (mPegBuff.empty()) { peg = new ColorPeg; peg->SetPegType(pt); peg->SetBtn(true); peg->SetIndicator(mSettings->mShowIndicators, mSettings->mIndicatorType, mHideColors); peg->SetId(mAllPegs.size()); mWin->mScene->addItem(peg); peg->setPos(btnpos); peg->setZValue(ColorCode::LAYER_PEGS); mAllPegs.push_back(peg); mWin->mScene->clearSelection(); mWin->mScene->update(btnpos.x(), btnpos.y(), 38, 38); connect(peg, SIGNAL(PegPressSignal(ColorPeg *)), this, SLOT(PegPressSlot(ColorPeg *))); connect(peg, SIGNAL(PegSortSignal(ColorPeg *)), this, SLOT(PegSortSlot(ColorPeg *))); connect(peg, SIGNAL(PegReleasedSignal(ColorPeg *)), this, SLOT(PegReleasedSlot(ColorPeg *))); } else { unsigned int sz = mPegBuff.size(); peg = mPegBuff.at(sz - 1); mPegBuff.resize(sz - 1); peg->setVisible(true); peg->SetPegType(pt); peg->SetBtn(true); peg->SetEnabled(true); peg->setPos(btnpos); mWin->mScene->clearSelection(); mWin->mScene->update(btnpos.x(), btnpos.y(), 38, 38); } return peg; } ColorPeg* PegFactory::GetPegBtn(int ix) { return mPegBtns[ix]; } void PegFactory::RemovePegSlot(ColorPeg* cp) { if (cp != NULL) { cp->Reset(); cp->setVisible(false); mPegBuff.push_back(cp); mWin->mScene->update(cp->pos().x(), cp->pos().y(), 45, 45); } } void PegFactory::PegPressSlot(ColorPeg* cp) { if (cp == NULL) { return; } cp->setZValue(ColorCode::LAYER_DRAG); if (cp->IsBtn()) { cp->SetBtn(false); mPegBtns[cp->GetPegType()->ix] = CreatePeg(cp->GetPegType()->ix); mPegBtns[cp->GetPegType()->ix]->SetEnabled(false); } } void PegFactory::PegSortSlot(ColorPeg* cp) { if (cp == NULL) { return; } cp->setZValue(ColorCode::LAYER_DRAG); if (cp->IsBtn()) { cp->SetBtn(false); mPegBtns[cp->GetPegType()->ix] = CreatePeg(cp->GetPegType()->ix); mPegBtns[cp->GetPegType()->ix]->SetEnabled(false); } } void PegFactory::PegReleasedSlot(ColorPeg* cp) { if (cp == NULL || !cp) { return; } cp->setZValue(ColorCode::LAYER_PEGS); mWin->mScene->clearSelection(); mWin->mScene->clearFocus(); if (cp->GetSort() == 0) { emit(SnapPegSignal(cp)); } else { int ystart = ColorCode::mRowY0 + (ColorCode::MAX_COLOR_CNT - ColorCode::mColorCnt) * 40; int ix1 = qRound((cp->pos().y() - ystart + 18) / 40); ix1 = min(ColorCode::mColorCnt - 1, max(0, ix1)); int ix0 = cp->GetPegType()->ix; if (ix0 != ix1) { ChangeColorOrder(cp->GetSort(), ix0, ix1); } RemovePegSlot(cp); } if (!mPegBtns[cp->GetPegType()->ix]->isEnabled()) { mPegBtns[cp->GetPegType()->ix]->SetEnabled(true); } } void PegFactory::SetPaused() { bool paused = (mWin->GetGameState() == ColorCode::STATE_PAUSED); vector dragged; vector::iterator it; for (it = mAllPegs.begin(); it < mAllPegs.end(); it++) { if ((*it)->GetIsDragged()) { dragged.push_back(*it); } (*it)->SetPaused(paused); } if (!paused) { for (it = dragged.begin(); it < dragged.end(); it++) { (*it)->ForceRelease(); } } SetIndicators(); } void PegFactory::SetIndicators() { bool show_indicators; if (mWin->GetGameState() == ColorCode::STATE_PAUSED) { mHideColors = true; show_indicators = false; } else if (!mSettings->mShowIndicators) { mHideColors = false; show_indicators = false; } else { mHideColors = mSettings->mHideColors; show_indicators = mSettings->mShowIndicators; } vector::iterator it; for (it = mAllPegs.begin(); it < mAllPegs.end(); it++) { (*it)->SetIndicator(show_indicators, mSettings->mIndicatorType, mHideColors); } } void PegFactory::ChangeColorOrder(const int sorttype, const int ix0, const int ix1) { QRadialGradient tmp = mGradMap[ix0]; if (sorttype == 1) { mGradMap[ix0] = mGradMap[ix1]; } else { int step = (ix1 > ix0) ? 1 : -1; int i; for (i = ix0;; i += step) { mGradMap[i] = mGradMap[i + step]; if (i == ix1 - step) { break; } } } mGradMap[ix1] = tmp; } void PegFactory::ResetColorsOrderSlot() { int ix; for (ix = 0; ix < ColorCode::MAX_COLOR_CNT; ++ix) { mGradMap[ix] = mGradBuff[ix]; } mWin->mScene->update(mWin->mScene->sceneRect()); } void PegFactory::ApplyColorCnt() { int ccnt = mSettings->mColorCnt; ccnt = max(2, min(10, ccnt)); if (ColorCode::mColorCnt == ccnt) { return; } ColorCode::mColorCnt = ccnt; int ystart = ColorCode::mRowY0 + (ColorCode::MAX_COLOR_CNT - ccnt) * 40; int ypos; int i; for (i = 0; i < ColorCode::MAX_COLOR_CNT; ++i) { ypos = ystart + i * 40 + 2; mBtnPos[i] = QPoint(XPOS_BTNS_COL, ypos); if (i < ColorCode::mColorCnt) { if (mPegBtns[i] == NULL) { mPegBtns[i] = CreatePeg(i); } mPegBtns[i]->setPos(mBtnPos[i]); mPegBtns[i]->setVisible(true); } else if (mPegBtns[i] != NULL) { mPegBtns[i]->setVisible(false); } } } void PegFactory::InitTypesMap() { int ix; QRadialGradient grad = QRadialGradient(20, 20, 40, 5, 5); QRadialGradient grad2 = QRadialGradient(18, 18, 18, 12, 12); ix = 0; mTypesMap[ix] = new PegType; grad.setColorAt(0.0, QColor("#FFFF80")); grad.setColorAt(1.0, QColor("#C05800")); mGradMap[ix] = grad; mTypesMap[ix]->grad = &mGradMap[ix]; mTypesMap[ix]->ix = ix; mTypesMap[ix]->pencolor = Qt::green; ix = 1; mTypesMap[ix] = new PegType; grad.setColorAt(0.0, QColor("#FF3300")); grad.setColorAt(1.0, QColor("#400040")); mGradMap[ix] = grad; mTypesMap[ix]->grad = &mGradMap[ix]; mTypesMap[ix]->ix = ix; mTypesMap[ix]->pencolor = Qt::green; ix = 2; mTypesMap[ix] = new PegType; grad.setColorAt(0.0, QColor("#33CCFF")); grad.setColorAt(1.0, QColor("#000080")); mGradMap[ix] = grad; mTypesMap[ix]->grad = &mGradMap[ix]; mTypesMap[ix]->ix = ix; mTypesMap[ix]->pencolor = Qt::red; ix = 3; mTypesMap[ix] = new PegType; grad2.setColorAt(0.0, Qt::white); grad2.setColorAt(0.5, QColor("#f8f8f0")); grad2.setColorAt(0.7, QColor("#f0f0f0")); grad2.setColorAt(1.0, QColor("#d0d0d0")); mGradMap[ix] = grad2; mTypesMap[ix]->grad = &mGradMap[ix]; mTypesMap[ix]->ix = ix; mTypesMap[ix]->pencolor = Qt::green; ix = 4; mTypesMap[ix] = new PegType; grad.setColorAt(0.0, QColor("#808080")); grad.setColorAt(1.0, Qt::black); mGradMap[ix] = grad; mTypesMap[ix]->grad = &mGradMap[ix]; mTypesMap[ix]->ix = ix; mTypesMap[ix]->pencolor = Qt::red; ix = 5; mTypesMap[ix] = new PegType; grad.setColorAt(0.0, QColor("#66FF33")); grad.setColorAt(1.0, QColor("#385009")); mGradMap[ix] = grad; mTypesMap[ix]->grad = &mGradMap[ix]; mTypesMap[ix]->ix = ix; mTypesMap[ix]->pencolor = Qt::red; ix = 6; mTypesMap[ix] = new PegType; grad.setColorAt(0.0, QColor("#FF9900")); grad.setColorAt(1.0, QColor("#A82A00")); mGradMap[ix] = grad; mTypesMap[ix]->grad = &mGradMap[ix]; mTypesMap[ix]->ix = ix; mTypesMap[ix]->pencolor = Qt::red; ix = 7; mTypesMap[ix] = new PegType; grad.setColorAt(0.0, QColor("#BA88FF")); grad.setColorAt(1.0, QColor("#38005D")); mGradMap[ix] = grad; mTypesMap[ix]->grad = &mGradMap[ix]; mTypesMap[ix]->ix = ix; mTypesMap[ix]->pencolor = Qt::green; ix = 8; mTypesMap[ix] = new PegType; grad.setColorAt(0.0, QColor("#00FFFF")); grad.setColorAt(1.0, QColor("#004040")); mGradMap[ix] = grad; mTypesMap[ix]->grad = &mGradMap[ix]; mTypesMap[ix]->ix = ix; mTypesMap[ix]->pencolor = Qt::green; ix = 9; mTypesMap[ix] = new PegType; grad.setColorAt(0.0, QColor("#FFC0FF")); grad.setColorAt(1.0, QColor("#800080")); mGradMap[ix] = grad; mTypesMap[ix]->grad = &mGradMap[ix]; mTypesMap[ix]->ix = ix; mTypesMap[ix]->pencolor = Qt::green; for (ix = 0; ix < ColorCode::MAX_COLOR_CNT; ++ix) { mTypesMap[ix]->let = 'A' + ix; mGradBuff[ix] = mGradMap[ix]; } } void PegFactory::InitPegBtns() { for (int i = 0; i < ColorCode::MAX_COLOR_CNT; ++i) { mPegBtns[i] = NULL; } } ColorCode-0.8.5/trans_en.qm0000644000175000017500000000002012610773251014205 0ustar dirkdirk<¸dÊÍ!¿`¡½ÝColorCode-0.8.5/gametablesdialog.cpp0000644000175000017500000004356612610773251016053 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include "gametablesdialog.h" #include "ui_gametablesdialog.h" #include "gametableview.h" #include "highscoresmodel.h" #include "prevgamesmodel.h" #include "savedgamesmodel.h" #include "buttondelegate.h" #include "ccsolver.h" #include "ccgame.h" #include "settings.h" const int GameTablesDialog::TABIX_INPUT = 0; const int GameTablesDialog::TABIX_PREVIOUS = 1; const int GameTablesDialog::TABIX_BOOKMARKS = 2; const int GameTablesDialog::TABIX_HIGHSCORES = 3; GameTablesDialog::GameTablesDialog(QWidget* parent, Qt::WindowFlags f) : QDialog(parent, f), ui(new Ui::GameTablesDialog) { ui->setupUi(this); Init(); } GameTablesDialog::~GameTablesDialog() { delete ui; } void GameTablesDialog::Init() { setModal(true); setMouseTracking(true); setAttribute(Qt::WA_Hover, true); setAttribute(Qt::WA_AlwaysShowToolTips, true); mLastGameProperties = NULL; ui->mDescriptionTe->setFocusPolicy(Qt::NoFocus); ui->mDescriptionTe->setAttribute(Qt::WA_TransparentForMouseEvents); ui->mDescriptionTe->setText(tr("Insert an arbitrary game number greater than 0 in the input field above.

" "The game properties like color count, slot count etc. will be displayed in the corresponding area above.

" "Click the Play button or press key Enter, to play the game. If a game is currently running, it will be aborted.")); ui->mGameNoLe->setValidator(new QIntValidator(1, INT_MAX, this)); connect(ui->mGameNoLe, SIGNAL(textChanged(const QString)), this, SLOT(GameNoInpChangedSlot(const QString))); mPrevTableView = new GameTableView(); mPrevTableView->SetGamesListModel(GetPrevGamesModel()); mPrevTableView->setColumnWidth(GetPrevGamesModel()->GetColIx(GamesListModel::COL_RANKING), 20); mPrevTableView->setColumnWidth(GetPrevGamesModel()->GetColIx(GamesListModel::COL_DATE), 90); mPrevTableView->setColumnWidth(GetPrevGamesModel()->GetColIx(GamesListModel::COL_TIME), 90); mPrevTableView->setColumnWidth(GetPrevGamesModel()->GetColIx(GamesListModel::COL_DELETE), 40); mPrevTableView->setItemDelegateForColumn(GetPrevGamesModel()->GetColIx(GamesListModel::COL_RANKING), new ButtonDelegate()); mPrevTableView->setItemDelegateForColumn(GetPrevGamesModel()->GetColIx(GamesListModel::COL_DATE), new ButtonDelegate()); mPrevTableView->setItemDelegateForColumn(GetPrevGamesModel()->GetColIx(GamesListModel::COL_TIME), new ButtonDelegate()); mPrevTableView->setItemDelegateForColumn(GetPrevGamesModel()->GetColIx(GamesListModel::COL_DELETE), new ButtonDelegate()); GetPrevGamesModel()->SetView(mPrevTableView); ui->mPrevTab->layout()->addWidget(mPrevTableView); connect(mPrevTableView, SIGNAL(HoverRowSignal(int)), this, SLOT(HoverRowSlot(int))); connect(GetPrevGamesModel(), SIGNAL(CloseEditorSignal(QModelIndex)), mPrevTableView, SLOT(CloseEditorSlot(QModelIndex))); connect(GetPrevGamesModel(), SIGNAL(NewGameInputSignal(CCGame*)), this, SLOT(NewGameInputSlot(CCGame*))); mSavedTableView = new GameTableView(); mSavedTableView->SetGamesListModel(GetSavedGamesModel()); mSavedTableView->setColumnWidth(GetSavedGamesModel()->GetColIx(GamesListModel::COL_GAMENO), 70); mSavedTableView->setColumnWidth(GetSavedGamesModel()->GetColIx(GamesListModel::COL_CCNT), 50); mSavedTableView->setColumnWidth(GetSavedGamesModel()->GetColIx(GamesListModel::COL_PCNT), 50); mSavedTableView->setColumnWidth(GetSavedGamesModel()->GetColIx(GamesListModel::COL_DOUBLES), 30); mSavedTableView->setColumnWidth(GetSavedGamesModel()->GetColIx(GamesListModel::COL_DELETE), 40); mSavedTableView->setItemDelegateForColumn(GetSavedGamesModel()->GetColIx(GamesListModel::COL_GAMENO), new ButtonDelegate()); mSavedTableView->setItemDelegateForColumn(GetSavedGamesModel()->GetColIx(GamesListModel::COL_CCNT), new ButtonDelegate()); mSavedTableView->setItemDelegateForColumn(GetSavedGamesModel()->GetColIx(GamesListModel::COL_PCNT), new ButtonDelegate()); mSavedTableView->setItemDelegateForColumn(GetSavedGamesModel()->GetColIx(GamesListModel::COL_DOUBLES), new ButtonDelegate()); mSavedTableView->setItemDelegateForColumn(GetSavedGamesModel()->GetColIx(GamesListModel::COL_DELETE), new ButtonDelegate()); GetSavedGamesModel()->SetView(mSavedTableView); ui->mSavedTab->layout()->addWidget(mSavedTableView); connect(mSavedTableView, SIGNAL(HoverRowSignal(int)), this, SLOT(HoverRowSlot(int))); connect(GetSavedGamesModel(), SIGNAL(CloseEditorSignal(QModelIndex)), mSavedTableView, SLOT(CloseEditorSlot(QModelIndex))); connect(GetSavedGamesModel(), SIGNAL(NewGameInputSignal(CCGame*)), this, SLOT(NewGameInputSlot(CCGame*))); mHighTableView = new GameTableView(); mHighTableView->SetGamesListModel(GetHighScoresModel()); mHighTableView->setColumnWidth(GetHighScoresModel()->GetColIx(GamesListModel::COL_RANKING), 20); mHighTableView->setColumnWidth(GetHighScoresModel()->GetColIx(GamesListModel::COL_SCORE), 60); mHighTableView->setColumnWidth(GetHighScoresModel()->GetColIx(GamesListModel::COL_USERNAME), 120); mHighTableView->setColumnWidth(GetHighScoresModel()->GetColIx(GamesListModel::COL_DELETE), 40); mHighTableView->setItemDelegateForColumn(GetHighScoresModel()->GetColIx(GamesListModel::COL_RANKING), new ButtonDelegate()); mHighTableView->setItemDelegateForColumn(GetHighScoresModel()->GetColIx(GamesListModel::COL_SCORE), new ButtonDelegate()); mHighTableView->setItemDelegateForColumn(GetHighScoresModel()->GetColIx(GamesListModel::COL_USERNAME), new ButtonDelegate()); mHighTableView->setItemDelegateForColumn(GetHighScoresModel()->GetColIx(GamesListModel::COL_DELETE), new ButtonDelegate()); GetHighScoresModel()->SetView(mHighTableView); ui->mHighTab->layout()->addWidget(mHighTableView); connect(mHighTableView, SIGNAL(HoverRowSignal(int)), this, SLOT(HoverRowSlot(int))); connect(GetHighScoresModel(), SIGNAL(CloseEditorSignal(QModelIndex)), mHighTableView, SLOT(CloseEditorSlot(QModelIndex))); connect(GetHighScoresModel(), SIGNAL(NewGameInputSignal(CCGame*)), this, SLOT(NewGameInputSlot(CCGame*))); connect(GetHighScoresModel(), SIGNAL(ValidNameCommitSignal()), this, SLOT(ValidNameCommitSlot())); connect(GetPrevGamesModel(), SIGNAL(SaveListGameSignal(CCGame*)), this, SLOT(InsertSavedGameSlot(CCGame*))); connect(GetHighScoresModel(), SIGNAL(SaveListGameSignal(CCGame*)), this, SLOT(InsertSavedGameSlot(CCGame*))); connect(ui->mTabsWidget, SIGNAL(currentChanged(int)), this, SLOT(CurrentTabChanged(int))); connect(ui->mCloseBtn, SIGNAL(clicked()), this, SLOT(OkBtnSlot())); connect(ui->mClearBtn, SIGNAL(clicked()), this, SLOT(ClearListSlot())); connect(ui->mPlayBtn, SIGNAL(clicked()), this, SLOT(PlayInputSlot())); } void GameTablesDialog::ShowTab(int tabix) { if (ui->mTabsWidget->currentIndex() != tabix) { ui->mTabsWidget->setCurrentIndex(tabix); } else { CurrentTabChanged(tabix); } show(); } void GameTablesDialog::ShowInputSlot() { ShowTab(TABIX_INPUT); } void GameTablesDialog::ShowPrevSlot() { ShowTab(TABIX_PREVIOUS); } void GameTablesDialog::ShowSavedSlot() { ShowTab(TABIX_BOOKMARKS); } void GameTablesDialog::ShowHighSlot() { ShowTab(TABIX_HIGHSCORES); } void GameTablesDialog::HoverRowSlot(const int row) { if (row > -1) { GamesListModel* glm = GetCurModel(); if (glm != NULL) { SetGameProperties(glm->GetGameAt(row)); } else { SetGameProperties(NULL); } } else { SetGameProperties(NULL); } } GamesListModel* GameTablesDialog::GetCurModel() const { GamesListModel* glm; int ix = ui->mTabsWidget->currentIndex(); if (ix == TABIX_PREVIOUS) { glm = qobject_cast(GetPrevGamesModel()); } else if (ix == TABIX_BOOKMARKS) { glm = qobject_cast(GetSavedGamesModel()); } else if (ix == TABIX_HIGHSCORES) { glm = qobject_cast(GetHighScoresModel()); } else { glm = NULL; } return glm; } GameTableView* GameTablesDialog::GetCurView() const { GameTableView* gtv; int ix = ui->mTabsWidget->currentIndex(); if (ix == TABIX_PREVIOUS) { gtv = qobject_cast(mPrevTableView); } else if (ix == TABIX_BOOKMARKS) { gtv = qobject_cast(mSavedTableView); } else if (ix == TABIX_HIGHSCORES) { gtv = qobject_cast(mHighTableView); } else { gtv = NULL; } return gtv; } void GameTablesDialog::SetGameProperties(const CCGame* g) { if (g != NULL && g->IsValidGame()) { if (mLastGameProperties == NULL || mLastGameProperties != g) { mLastGameProperties = const_cast(g); int ix = ui->mTabsWidget->currentIndex(); switch (ix) { case TABIX_PREVIOUS: case TABIX_BOOKMARKS: ui->mUserValLbl->setText(""); ui->mDurationValLbl->setText(""); ui->mDateValLbl->setText(g->GetDateTimeStr()); break; case TABIX_HIGHSCORES: ui->mUserValLbl->setText(g->GetUserName()); ui->mDurationValLbl->setText(FormatDuration(g->mDuration)); ui->mDateValLbl->setText(g->GetDateTimeStr()); break; case TABIX_INPUT: ui->mDateValLbl->setText(""); break; } ui->mColorCntValLbl->setText(QString::number(g->mColorCnt)); ui->mPegCntValLbl->setText(QString::number(g->mPegCnt)); QString str = (g->mDoubles == 1) ? tr("Yes") : tr("No"); ui->mDoublesValLbl->setText(str); ui->mGameNoValLbl->setText(QString::number(g->mGameNo)); } } else { mLastGameProperties = NULL; ui->mUserValLbl->setText(""); ui->mColorCntValLbl->setText(""); ui->mPegCntValLbl->setText(""); ui->mDoublesValLbl->setText(""); ui->mGameNoValLbl->setText(""); ui->mDateValLbl->setText(""); ui->mDurationValLbl->setText(""); } } QString GameTablesDialog::FormatDuration(const uint dur) const { QTime t(0, 0, 0, 0); t = t.addMSecs(int(dur)); QString tstr = QString("%1 : %2 : %3 : %4").arg( t.toString("hh"), t.toString("mm"), t.toString("ss"), t.toString("zzz")); return tstr; } void GameTablesDialog::ReadSettingsGamesSlot() { SetSettingsSlot(); GetPrevGamesModel()->ReadList(GetSettings()->mPrevGamesStr); GetSavedGamesModel()->ReadList(GetSettings()->mSavedGamesStr); GetHighScoresModel()->ReadList(GetSettings()->mHighGamesStr); clearFocus(); } void GameTablesDialog::SetSettingsSlot() { GetPrevGamesModel()->SetMaxSize(GetSettings()->mGamesListMaxCnt); GetSavedGamesModel()->SetMaxSize(GetSettings()->mGamesListMaxCnt); GetHighScoresModel()->SetMaxSize(GetSettings()->mGamesListMaxCnt); GetPrevGamesModel()->SetRowHColors(GetSettings()->GetActiveRowHFg(), GetSettings()->GetActiveRowHBg()); GetSavedGamesModel()->SetRowHColors(GetSettings()->GetActiveRowHFg(), GetSettings()->GetActiveRowHBg()); GetHighScoresModel()->SetRowHColors(GetSettings()->GetActiveRowHFg(), GetSettings()->GetActiveRowHBg()); } void GameTablesDialog::InsertHighScoreSlot(CCGame* g) { if (GetSettings()->mHighScoreHandling == Settings::HIGHSCORE_NO) { return; } if (GetHighScoresModel()->IsValidHighScore(g->mScore)) { CCGame game = *g; game.SetUserName(GetSettings()->mHighScoreUserName); if (GetSettings()->mHighScoreHandling != Settings::HIGHSCORE_AUTO || GetSettings()->mHighScoreUserName == "") { ShowTab(GameTablesDialog::TABIX_HIGHSCORES); } GetHighScoresModel()->InsertRow(game); } } void GameTablesDialog::InsertPrevGameSlot(CCGame* g) { CCGame game = *g; game.Anonymize(); GetPrevGamesModel()->InsertRow(game); } void GameTablesDialog::InsertSavedGameSlot(CCGame* g) { CCGame game = *g; game.Anonymize(); game.mTime = QDateTime::currentDateTime().toTime_t(); GetSavedGamesModel()->InsertRow(game); } void GameTablesDialog::OkBtnSlot() { close(); } void GameTablesDialog::ClearListSlot() { GamesListModel* glm = GetCurModel(); if (glm == NULL) { return; } int rcnt = glm->rowCount(); if (rcnt <= 0) { return; } int r = QMessageBox::warning( this, tr("Message"), tr("This will permanently remove all entries from the List.\nDo You want to proceed?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); if (r == QMessageBox::Yes) { rcnt = glm->rowCount(); if (rcnt > 0) { glm->removeRows(0, rcnt); } } } void GameTablesDialog::PlayInputSlot() { if (ui->mTabsWidget->currentIndex() == TABIX_INPUT && ui->mGameNoLe->text() != "") { uint gameno = ui->mGameNoLe->text().toUInt(); if (gameno > 0) { const int* props = ColorCode::INSTANCE->GetCCSolver()->GetGameByNo(gameno); CCGame* g = new CCGame("", 0, 0, gameno, 0, 0, 0, ColorCode::MODE_HVM, props[1], props[2], props[3]); NewGameInputSlot(g); } } } void GameTablesDialog::GameNoInpChangedSlot(const QString &txt) { if (txt != "" && txt.toUInt() > 0) { const int* props = ColorCode::INSTANCE->GetCCSolver()->GetGameByNo(txt.toUInt()); CCGame* g = new CCGame("", 0, 0, txt.toUInt(), 0, 0, 0, ColorCode::MODE_HVM, props[1], props[2], props[3]); SetGameProperties(g); } else { SetGameProperties(NULL); } } void GameTablesDialog::NewGameInputSlot(CCGame* g) { emit NewGameInputSignal(g); close(); } void GameTablesDialog::ValidNameCommitSlot() { if (ui->mTabsWidget->currentIndex() == TABIX_HIGHSCORES) { ui->mCloseBtn->setFocus(); } } void GameTablesDialog::SetRowHeight() { for (int i = 0; i < GetHighScoresModel()->rowCount(); ++i) { mHighTableView->setRowHeight(i, 18); } } void GameTablesDialog::CurrentTabChanged(int ix) { mLastGameProperties = NULL; SetGameProperties(NULL); QString str = ""; QIcon ico; switch (ix) { case TABIX_INPUT: ui->mPlayBtn->setVisible(true); ui->mClearBtn->setVisible(false); ui->mGameNoLe->setFocus(); ui->mUserLbl->setEnabled(false); ui->mDurationLbl->setEnabled(false); ui->mDateLbl->setEnabled(false); GameNoInpChangedSlot(ui->mGameNoLe->text()); str = tr("Game Number Input"); ico = QIcon(":/img/document-new.png"); break; case TABIX_PREVIOUS: ui->mPlayBtn->setVisible(false); ui->mClearBtn->setVisible(true); ui->mUserLbl->setEnabled(false); ui->mDurationLbl->setEnabled(false); ui->mDateLbl->setEnabled(true); str = tr("Recent Games"); ico = QIcon(":/img/history.png"); break; case TABIX_BOOKMARKS: ui->mPlayBtn->setVisible(false); ui->mClearBtn->setVisible(true); ui->mUserLbl->setEnabled(false); ui->mDurationLbl->setEnabled(false); ui->mDateLbl->setEnabled(true); str = tr("Bookmarked Games"); ico = QIcon(":/img/bookmark.png"); break; case TABIX_HIGHSCORES: ui->mPlayBtn->setVisible(false); ui->mClearBtn->setVisible(true); ui->mUserLbl->setEnabled(true); ui->mDurationLbl->setEnabled(true); ui->mDateLbl->setEnabled(true); str = tr("High Score List"); ico = QIcon(":/img/games-highscores.png"); break; default: str = tr("Game Lists"); break; } setWindowTitle(str); setWindowIcon(ico); } void GameTablesDialog::closeEvent(QCloseEvent* e) { GetHighScoresModel()->EditField(); if (GetHighScoresModel()->GetEditIndex().isValid() && GetHighScoresModel()->GetEditValue() == "") { e->ignore(); int r = QMessageBox::warning( this, tr("Message"), tr("Please provide a name!\nOtherwise your score won't be saved."), QMessageBox::Ok | QMessageBox::Discard, QMessageBox::Ok); if (r == QMessageBox::Discard) { GetHighScoresModel()->removeRows(GetHighScoresModel()->GetEditIndex().row(), 1); e->accept(); } else { GetHighScoresModel()->EditField(); } } else { GetHighScoresModel()->SetEditIndex(QModelIndex()); e->accept(); } } void GameTablesDialog::reject() { close(); } void GameTablesDialog::changeEvent(QEvent *e) { QDialog::changeEvent(e); switch (e->type()) { case QEvent::LanguageChange: ui->retranslateUi(this); break; default: break; } } ColorCode-0.8.5/gamenodisplay.cpp0000644000175000017500000000247512610773251015415 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include #include "gamenodisplay.h" #include "settings.h" using namespace std; GameNoDisplay::GameNoDisplay(QGraphicsItem* parent) : QGraphicsTextItem(parent) { mFont = QFont("Arial", 18, QFont::Normal, false); mFont.setStyleHint(QFont::SansSerif); mFont.setPixelSize(24); setFont(mFont); setDefaultTextColor(QColor("#808183")); mUpdateRect = QRectF(0, 0, 600, 40); setTextWidth(600); setScale(0.5); } void GameNoDisplay::ShowStr(QString str) { str = QString("
") + str + QString("
"); setHtml(str); } ColorCode-0.8.5/cellbtn.h0000644000175000017500000000173612610773251013650 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef CELLBTN_H #define CELLBTN_H #include #include #include class CellBtn : public QToolButton { Q_OBJECT public: CellBtn(QWidget * parent = 0); }; #endif // CELLBTN_H ColorCode-0.8.5/prefdialog.cpp0000644000175000017500000003477212610773251014702 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include "prefdialog.h" using namespace std; PrefDialog::PrefDialog(QWidget* parent, Qt::WindowFlags f) : QDialog(parent, f) { setupUi(this); setSizeGripEnabled(false); mSuppressSlots = false; InitControls(); } PrefDialog::~PrefDialog() { } void PrefDialog::InitControls() { mLevelPresetsCmb->addItem(tr("... Select from predefined level settings"), -1); mLevelPresetsCmb->addItem(tr("Beginner (2 Colors, 2 Slots, Doubles)"), 0); mLevelPresetsCmb->addItem(tr("Easy (4 Colors, 3 Slots, No Doubles)"), 1); mLevelPresetsCmb->addItem(tr("Classic (6 Colors, 4 Slots, Doubles)"), 2); mLevelPresetsCmb->addItem(tr("Challenging (8 Colors, 4 Slots, Doubles)"), 3); mLevelPresetsCmb->addItem(tr("Hard (10 Colors, 5 Slots, Doubles)"), 4); mPegCntCmb->addItem("2 " + tr("Slots"), 2); mPegCntCmb->addItem("3 " + tr("Slots"), 3); mPegCntCmb->addItem("4 " + tr("Slots"), 4); mPegCntCmb->addItem("5 " + tr("Slots"), 5); mColorCntCmb->addItem("2 " + tr("Colors"), 2); mColorCntCmb->addItem("3 " + tr("Colors"), 3); mColorCntCmb->addItem("4 " + tr("Colors"), 4); mColorCntCmb->addItem("5 " + tr("Colors"), 5); mColorCntCmb->addItem("6 " + tr("Colors"), 6); mColorCntCmb->addItem("7 " + tr("Colors"), 7); mColorCntCmb->addItem("8 " + tr("Colors"), 8); mColorCntCmb->addItem("9 " + tr("Colors"), 9); mColorCntCmb->addItem("10 " + tr("Colors"), 10); mGameModeCmb->addItem(tr("Human vs. Computer"), ColorCode::MODE_HVM); mGameModeCmb->addItem(tr("Computer vs. Human"), ColorCode::MODE_MVH); mStrengthCmb->addItem(tr("Low"), CCSolver::STRENGTH_LOW); mStrengthCmb->addItem(tr("Medium"), CCSolver::STRENGTH_MEDIUM); mStrengthCmb->addItem(tr("High"), CCSolver::STRENGTH_HIGH); mDelaySb->setMaximum(10000); mDelaySb->setMinimum(0); mDelaySb->setSingleStep(100); mUserNameLe->setMaxLength(Settings::MAX_LENGTH_USERNAME); connect(mCustomRowHColorCb, SIGNAL(stateChanged(int)), this, SLOT(CustomRowHColorChangedSlot(int))); connect(mRowHColorFgBtn, SIGNAL(clicked()), this, SLOT(SetBtnColorSlot())); connect(mRowHColorBgBtn, SIGNAL(clicked()), this, SLOT(SetBtnColorSlot())); mRestoreBtn = mButtonBox->button(QDialogButtonBox::RestoreDefaults); mOkBtn = mButtonBox->button(QDialogButtonBox::Ok); mApplyBtn = mButtonBox->button(QDialogButtonBox::Apply); mCancelBtn = mButtonBox->button(QDialogButtonBox::Cancel); connect(mLevelPresetsCmb, SIGNAL(currentIndexChanged(int)), this, SLOT(LevelPresetChangedSlot())); connect(mColorCntCmb, SIGNAL(currentIndexChanged(int)), this, SLOT(ColorCntChangedSlot())); connect(mPegCntCmb, SIGNAL(currentIndexChanged(int)), this, SLOT(PegCntChangedSlot())); connect(mDoublesCb, SIGNAL(stateChanged(int)), this, SLOT(DoublesChangedSlot())); connect(mShowIndicatorsCb, SIGNAL(stateChanged(int)), this, SLOT(ShowIndicatorsChangedSlot(int))); connect(mShowTimerCb, SIGNAL(stateChanged(int)), this, SLOT(ShowTimerChangedSlot(int))); connect(mResetColorOrderBtn, SIGNAL(clicked()), this, SLOT(ResetColorOrderSlot())); connect(mRestoreBtn, SIGNAL(clicked()), this, SLOT(RestoreDefSlot())); connect(mApplyBtn, SIGNAL(clicked()), this, SLOT(ApplySlot())); connect(mCancelBtn, SIGNAL(clicked()), this, SLOT(CancelSlot())); connect(mOkBtn, SIGNAL(clicked()), this, SLOT(OkSlot())); connect(mUseHighscoresCb, SIGNAL(stateChanged(int)), this, SLOT(UseHighscoresChangedSlot(int))); } void PrefDialog::InitSettings() { mSettings = GetSettings(); SetSettings(); } void PrefDialog::SetSettings() { bool sup = SetSuppressSlots(true); mMenuBarCb->setChecked(mSettings->mShowMenuBar); mStatusBarCb->setChecked(mSettings->mShowStatusBar); mToolBarCb->setChecked(mSettings->mShowToolBar); mShowGameNoCb->setChecked(mSettings->mShowGameNo); mShowTimerCb->setChecked(mSettings->mShowTimer); mShowTenthCb->setChecked(mSettings->mShowTenth); ShowTimerChangedSlot(mShowTimerCb->checkState()); mShowIndicatorsCb->setChecked(mSettings->mShowIndicators); if (mSettings->mIndicatorType == Settings::INDICATOR_NUMBER) { mNumbersRb->setChecked(true); } else { mLettersRb->setChecked(true); } mHideColorsCb->setChecked(mSettings->mHideColors); int i; i = mColorCntCmb->findData(mSettings->mColorCnt); if (i != -1 && mColorCntCmb->currentIndex() != i) { mColorCntCmb->setCurrentIndex(i); } i = mPegCntCmb->findData(mSettings->mPegCnt); if (i != -1 && mPegCntCmb->currentIndex() != i) { mPegCntCmb->setCurrentIndex(i); } mDoublesCb->setChecked(mSettings->mDoubles); CheckDoubles(); CheckLevelPresets(); i = mGameModeCmb->findData(mSettings->mGameMode); if (i != -1 && mGameModeCmb->currentIndex() != i) { mGameModeCmb->setCurrentIndex(i); } i = mStrengthCmb->findData(mSettings->mSolverStrength); if (i != -1 && mStrengthCmb->currentIndex() != i) { mStrengthCmb->setCurrentIndex(i); } mAutoCloseCb->setChecked(mSettings->mAutoClose); mAutoHintsCb->setChecked(mSettings->mAutoHints); mDelaySb->setValue(mSettings->mHintsDelay); mGamesListMaxCntSb->setValue(mSettings->mGamesListMaxCnt); mUserNameLe->setText(mSettings->mHighScoreUserName); if (mSettings->mHighScoreHandling == Settings::HIGHSCORE_PROMPT) { mUseHighscoresCb->setChecked(true); mHighscorePromptRb->setChecked(true); } else if(mSettings->mHighScoreHandling == Settings::HIGHSCORE_AUTO) { mUseHighscoresCb->setChecked(true); mHighscoreAutoRb->setChecked(true); } else if (mSettings->mHighScoreHandling == Settings::HIGHSCORE_NO) { mUseHighscoresCb->setChecked(false); } mCustomRowHColorCb->setChecked(mSettings->mCustomRowHColor); CustomRowHColorChangedSlot(mCustomRowHColorCb->checkState()); if (sup) { SetSuppressSlots(false); ShowIndicatorsChangedSlot(mShowIndicatorsCb->checkState()); UseHighscoresChangedSlot(mUseHighscoresCb->checkState()); } } void PrefDialog::LevelPresetChangedSlot() { int ix, i; ix = mLevelPresetsCmb->itemData(mLevelPresetsCmb->currentIndex()).toInt(); if (ix < 0 || ix > 4) { return; } bool sup = SetSuppressSlots(true); i = mColorCntCmb->findData(ColorCode::LEVEL_SETTINGS[ix][0]); if (i != -1 && mColorCntCmb->currentIndex() != i) { mColorCntCmb->setCurrentIndex(i); } i = mPegCntCmb->findData(ColorCode::LEVEL_SETTINGS[ix][1]); if (i != -1 && mPegCntCmb->currentIndex() != i) { mPegCntCmb->setCurrentIndex(i); } mDoublesCb->setChecked((ColorCode::LEVEL_SETTINGS[ix][2] == 1)); if (sup) { SetSuppressSlots(false); } } void PrefDialog::CheckLevelPresets() { int ix = -1; for (int i = 0; i < 5; ++i) { if ( ColorCode::LEVEL_SETTINGS[i][0] == mColorCntCmb->itemData(mColorCntCmb->currentIndex()).toInt() && ColorCode::LEVEL_SETTINGS[i][1] == mPegCntCmb->itemData(mPegCntCmb->currentIndex()).toInt() && ColorCode::LEVEL_SETTINGS[i][2] == (int) mDoublesCb->isChecked() ) { ix = i; break; } } mLevelPresetsCmb->setCurrentIndex(mLevelPresetsCmb->findData(ix)); } void PrefDialog::CheckDoubles() { if (mColorCntCmb->itemData(mColorCntCmb->currentIndex()).toInt() < mPegCntCmb->itemData(mPegCntCmb->currentIndex()).toInt()) { if (!mDoublesCb->isChecked()) { mDoublesCb->setChecked(true); } mDoublesCb->setEnabled(false); } else { mDoublesCb->setEnabled(true); } } void PrefDialog::CustomRowHColorChangedSlot(int state) { bool en = (state == Qt::Checked); mRowHColorFgBtn->setEnabled(en); mRowHColorBgBtn->setEnabled(en); mFgLbl->setEnabled(en); mBgLbl->setEnabled(en); QColor color; color = GetCurBtnColor(mRowHColorFgBtn); if (!en) { color = Desaturate(color); } if (color.isValid()) { SetSwatchStyleSheet(mRowHColorFgBtn, color.name()); } color = GetCurBtnColor(mRowHColorBgBtn); if (!en) { color = Desaturate(color); } if (color.isValid()) { SetSwatchStyleSheet(mRowHColorBgBtn, color.name()); } } QColor PrefDialog::Desaturate(QColor c) { qreal h; qreal s; qreal v; qreal a; c.getHsvF(&h, &s, &v, &a); v = qMin((0.8 + v * 0.2), 1.0); c.setHsvF(h, (s * 0.2), v, 1.0); return c; } void PrefDialog::SetSwatchStyleSheet(QPushButton* btn, const QString colorstr) { btn->setStyleSheet(QString("QPushButton { background-color: " + colorstr + "; border: 1px solid palette(dark) } QPushButton:hover { border: 1px solid palette(highlight) }")); btn->update(); } void PrefDialog::SetBtnColorSlot() { QPushButton* btn = qobject_cast(sender()); SetBtnColor(btn); } void PrefDialog::SetBtnColor(QPushButton* btn) { if (mSettings == NULL || btn == NULL) { return; } QColor curcolor = GetCurBtnColor(btn); if (curcolor.isValid()) { curcolor = QColorDialog::getColor(curcolor, this); } if (curcolor.isValid()) { SetSwatchStyleSheet(btn, curcolor.name()); if (btn == mRowHColorFgBtn) { mSettings->mRowHColorFg = curcolor.name(); } else if (btn == mRowHColorBgBtn) { mSettings->mRowHColorBg = curcolor.name(); } } } QColor PrefDialog::GetCurBtnColor(const QPushButton* btn) { QColor color; if (mSettings != NULL) { if (btn == mRowHColorBgBtn) { color.setNamedColor(mSettings->mRowHColorBg); } else { color.setNamedColor(mSettings->mRowHColorFg); } } if (mSettings == NULL || !color.isValid()) { if (btn == mRowHColorBgBtn) { color = QApplication::palette().color(QPalette::Active, QPalette::Button); } else { color = QApplication::palette().color(QPalette::Active, QPalette::ButtonText); } } return color; } void PrefDialog::ColorCntChangedSlot() { if (!mSuppressSlots) { CheckDoubles(); CheckLevelPresets(); } } void PrefDialog::PegCntChangedSlot() { if (!mSuppressSlots) { CheckDoubles(); CheckLevelPresets(); } } void PrefDialog::DoublesChangedSlot() { if (!mSuppressSlots) { CheckDoubles(); CheckLevelPresets(); } } void PrefDialog::UseHighscoresChangedSlot(int state) { if (!mSuppressSlots) { bool en = (state != Qt::Unchecked); mHighscorePromptRb->setEnabled(en); mHighscoreAutoRb->setEnabled(en); mUserNameLe->setEnabled(en); mUserNameLbl->setEnabled(en); } } void PrefDialog::ShowIndicatorsChangedSlot(int state) { if (!mSuppressSlots) { bool en = (state != Qt::Unchecked); mLettersRb->setEnabled(en); mNumbersRb->setEnabled(en); mHideColorsCb->setEnabled(en); } } void PrefDialog::ShowTimerChangedSlot(int state) { bool en = (state == Qt::Checked); mShowTenthCb->setEnabled(en); } void PrefDialog::ResetColorOrderSlot() { emit ResetColorOrderSignal(); } void PrefDialog::RestoreDefSlot() { mSettings->RestoreDefSettings(); SetSettings(); } void PrefDialog::ApplySlot() { ApplySettings(); setResult(QDialog::Accepted); accept(); } void PrefDialog::OkSlot() { ApplySettings(); setResult(QDialog::Accepted); accept(); } void PrefDialog::CancelSlot() { setResult(QDialog::Rejected); reject(); } bool PrefDialog::SetSuppressSlots(bool b, bool force) { if (mSuppressSlots == b && !force) { return false; } mSuppressSlots = b; return true; } void PrefDialog::ApplySettings() { mSettings->mShowMenuBar = mMenuBarCb->isChecked(); mSettings->mShowStatusBar = mStatusBarCb->isChecked(); mSettings->mShowToolBar = mToolBarCb->isChecked(); mSettings->mShowTimer = mShowTimerCb->isChecked(); mSettings->mShowTenth = mShowTenthCb->isChecked(); mSettings->mShowGameNo = mShowGameNoCb->isChecked(); mSettings->mShowIndicators = mShowIndicatorsCb->isChecked(); if (mNumbersRb->isChecked()) { mSettings->mIndicatorType = Settings::INDICATOR_NUMBER; } else { mSettings->mIndicatorType = Settings::INDICATOR_LETTER; } mSettings->mHideColors = mHideColorsCb->isChecked(); mSettings->mColorCnt = mColorCntCmb->itemData(mColorCntCmb->currentIndex()).toInt(); mSettings->mPegCnt = mPegCntCmb->itemData(mPegCntCmb->currentIndex()).toInt(); mSettings->mDoubles = mDoublesCb->isChecked(); mSettings->mGameMode = mGameModeCmb->itemData(mGameModeCmb->currentIndex()).toInt(); mSettings->mSolverStrength = mStrengthCmb->itemData(mStrengthCmb->currentIndex()).toInt(); mSettings->mAutoClose = mAutoCloseCb->isChecked(); mSettings->mAutoHints = mAutoHintsCb->isChecked(); mSettings->mHintsDelay = mDelaySb->value(); mSettings->mHighScoreUserName = mUserNameLe->text(); mSettings->mGamesListMaxCnt = mGamesListMaxCntSb->value(); if (mUseHighscoresCb->isChecked()) { if (mHighscorePromptRb->isChecked()) { mSettings->mHighScoreHandling = Settings::HIGHSCORE_PROMPT; } else { mSettings->mHighScoreHandling = Settings::HIGHSCORE_AUTO; } } else { mSettings->mHighScoreHandling = Settings::HIGHSCORE_NO; } mSettings->mCustomRowHColor = mCustomRowHColorCb->isChecked(); mSettings->mRowHColorFg = GetCurBtnColor(mRowHColorFgBtn).name(); mSettings->mRowHColorBg = GetCurBtnColor(mRowHColorBgBtn).name(); mSettings->Validate(); } QSize PrefDialog::sizeHint () const { return QSize(500, 400); } ColorCode-0.8.5/gametablesdialog.h0000644000175000017500000000467412610773251015515 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef GAMETABLESDIALOG_H #define GAMETABLESDIALOG_H #include #include class GamesListModel; class GameTableView; class CCGame; namespace Ui { class GameTablesDialog; } class GameTablesDialog : public QDialog { Q_OBJECT public: static const int TABIX_INPUT; static const int TABIX_PREVIOUS; static const int TABIX_BOOKMARKS; static const int TABIX_HIGHSCORES; GameTablesDialog(QWidget* parent = 0, Qt::WindowFlags f = Qt::Dialog); ~GameTablesDialog(); void ShowTab(int tabix); GameTableView* mPrevTableView; GameTableView* mSavedTableView; GameTableView* mHighTableView; public slots: void ShowInputSlot(); void ShowPrevSlot(); void ShowSavedSlot(); void ShowHighSlot(); void HoverRowSlot(const int row); void ReadSettingsGamesSlot(); void SetSettingsSlot(); void InsertHighScoreSlot(CCGame* g); void InsertPrevGameSlot(CCGame* g); void InsertSavedGameSlot(CCGame* g); void NewGameInputSlot(CCGame* g); void OkBtnSlot(); void ClearListSlot(); void CurrentTabChanged(int ix); virtual void reject(); signals: void NewGameInputSignal(CCGame* g); protected: void changeEvent(QEvent *e); virtual void closeEvent(QCloseEvent* e); private: void Init(); void SetRowHeight(); GamesListModel* GetCurModel() const; GameTableView* GetCurView() const; void SetGameProperties(const CCGame* g); QString FormatDuration(const uint dur) const; CCGame* mLastGameProperties; Ui::GameTablesDialog *ui; private slots: void GameNoInpChangedSlot(const QString &txt); void PlayInputSlot(); void ValidNameCommitSlot(); }; #endif // GAMETABLESDIALOG_H ColorCode-0.8.5/ccgame.h0000644000175000017500000000366112610773251013443 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef CCGAME_H #define CCGAME_H #include #include #include "colorcode.h" class CCGame { public: CCGame(); CCGame(const QString &str); CCGame(const QString &unm, const uint t, const int sc, const uint gameno, const int gcnt, const int hcnt, const uint dur, const int gmode, const int ccnt, const int pcnt, const int d); bool operator==(const CCGame &other) const; bool operator!=(const CCGame &other) const; uint mTime; int mScore; uint mGameNo; int mGuessCnt; int mHintCnt; uint mDuration; int mGameMode; int mColorCnt; int mPegCnt; int mDoubles; QString GetUserName() const; void SetUserName(QString unm); uint GetTime() const; int GetScore() const; QString GetDateTimeStr() const; QString GetDatePartStr() const; QString GetTimePartStr() const; QString GetCmbStr() const; void Anonymize(); QString ToString() const; bool HasSameSettings(const CCGame &g) const; bool IsValidGame() const; private: QString mUserNm; }; #endif // CCGAME_H ColorCode-0.8.5/pegrow.cpp0000644000175000017500000001631512610773251014062 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include #include "colorpeg.h" #include "pegrow.h" #include "rowhint.h" using namespace std; PegRow::PegRow(QObject*) { setAcceptedMouseButtons(0); mIx = -1; mPegCnt = 0; mXOffs = 0; mPend = QColor("#646568"); mPenl = QColor("#ecedef"); mGrad0 = QColor("#cccdcf"); mGrad1 = QColor("#fcfdff"); mColorPegs = NULL; Reset(0, 0); } PegRow::~PegRow() { for (int i = 0; i < mPegCnt; ++i) { delete mColorPegs[i]; } delete [] mColorPegs; mColorPegs = NULL; } bool PegRow::IsActive() const { return mIsActive; } void PegRow::Reset(const int pegcnt, const int gamemode) { ClearRow(); mSolution.clear(); SetActive(false); mSolved = false; SetPegCnt(pegcnt); SetGameMode(gamemode); } void PegRow::ClearRow() { if (mColorPegs == NULL) { return; }; for (int i = 0; i < mPegCnt; ++i) { if (mColorPegs[i] != NULL) { emit(RemovePegSignal(mColorPegs[i])); } } } int PegRow::GetIx() const { return mIx; } void PegRow::SetIx(const int ix) { mIx = ix; } void PegRow::SetPegCnt(const int pegcnt) { ClearRow(); for (int i = 0; i < mPegCnt; ++i) { delete mColorPegs[i]; } delete [] mColorPegs; mColorPegs = NULL; mPegCnt = pegcnt; mColorPegs = new ColorPeg* [mPegCnt]; for (int i = 0; i < mPegCnt; ++i) { mColorPegs[i] = NULL; } SetXOffs(); } void PegRow::SetGameMode(const int gamemode) { mGameMode = gamemode; } void PegRow::SetXOffs() { mXOffs = 100 - mPegCnt * 20; } int PegRow::GetPegCnt() const { if (mColorPegs == NULL) { return 0; }; int cnt = 0; int i = 0; for (i = 0; i < mPegCnt; ++i) { if (mColorPegs[i] != NULL) { ++cnt; } } return cnt; } ColorPeg** PegRow::GetPegs() { return mColorPegs; } void PegRow::SetActive(const bool b) { mIsActive = b; update(boundingRect()); } bool PegRow::SnapCP(ColorPeg *cp) { if (mColorPegs == NULL) { return false; } bool snapped = false; if (mIsActive) { QPointF p = mapFromParent(cp->pos()); p.rx() += 18; p.ry() += 18; int ix = -1; int i; if (p.y() >= 0 && p.y() <= 40) { for (i = 0; i < mPegCnt; ++i) { if (p.x() >= mXOffs + i * 40 && p.x() < mXOffs + (i + 1) * 40) { if (mColorPegs[i] != NULL) { emit RemovePegSignal(mColorPegs[i]); mColorPegs[i] = NULL; } mColorPegs[i] = cp; cp->SetPegRow(this); ix = i; cp->setPos(mapToParent(mXOffs + i * 40 + 2, 2)); break; } } } snapped = ix > -1; CheckSolution(); } return snapped; } void PegRow::ForceSnap(ColorPeg* cp, int posix) { if (mColorPegs == NULL) { return; } if (posix > mPegCnt - 1) { return; } if (mIsActive) { if (mColorPegs[posix] != NULL) { emit RemovePegSignal(mColorPegs[posix]); mColorPegs[posix] = NULL; } mColorPegs[posix] = cp; cp->setSelected(false); cp->SetPegRow(this); cp->setPos(mapToParent(mXOffs + posix * 40 + 2, 2)); CheckSolution(); } } void PegRow::CloseRow() { mSolved = true; if (mColorPegs == NULL) { ; } else { for (int i = 0; i < mPegCnt; ++i) { if (mColorPegs[i] != NULL) { mColorPegs[i]->SetEnabled(false); } } } SetActive(false); } void PegRow::OpenRow() { mSolved = false; if (mColorPegs == NULL) { ; } else { for (int i = 0; i < mPegCnt; ++i) { if (mColorPegs[i] != NULL) { mColorPegs[i]->SetEnabled(true); } } } SetActive(true); } void PegRow::CheckSolution() { mSolution.clear(); if (mColorPegs == NULL) { ; } else { for (int i = 0; i < mPegCnt; ++i) { if (mColorPegs[i] != NULL) { mSolution.push_back(mColorPegs[i]->GetPegType()->ix); } } } emit RowSolutionSignal(mIx); } std::vector PegRow::GetSolution() const { return mSolution; } void PegRow::RemovePeg(ColorPeg *cp) { if (mColorPegs == NULL) { return; } for (int i = 0; i < mPegCnt; ++i) { if (mColorPegs[i] == cp) { mColorPegs[i] = NULL; if (mIsActive) { CheckSolution(); } } } } QPainterPath PegRow::shape() const { QPainterPath path; path.addRect(boundingRect()); return path; } QRectF PegRow::boundingRect() const { const int Margin = 1; return outlineRect().adjusted(-Margin, -Margin, +Margin, +Margin); } QRectF PegRow::outlineRect() const { return QRectF(0.0, 0.0, 200.0, 40.0); } void PegRow::paint(QPainter* painter, const QStyleOptionGraphicsItem* , QWidget* ) { if (mPegCnt == 0) { return; } painter->setRenderHint(QPainter::Antialiasing, true); if (mIsActive) { mPend.setAlpha(0xff); mPenl.setAlpha(0xff); mGrad0.setAlpha(0xff); mGrad1.setAlpha(0xff); } else if (mSolved) { mPend.setAlpha(0xa0); mPenl.setAlpha(0xa0); mGrad0.setAlpha(0xa0); mGrad1.setAlpha(0xa0); } else { mPend.setAlpha(0x32); mPenl.setAlpha(0x50); mGrad0.setAlpha(0x32); mGrad1.setAlpha(0x32); } painter->setPen(Qt::NoPen); int i; for (i = 0; i < mPegCnt; i++) { painter->setBrush(QBrush(mPenl)); painter->drawRect(QRectF(mXOffs + i * 40, 0.0, 39, 1)); painter->drawRect(QRectF(mXOffs + i * 40, 0.0, 1, 39)); painter->setBrush(QBrush(mPend)); painter->drawRect(QRectF(mXOffs + i * 40, 39.0, 40, 1)); painter->drawRect(QRectF(mXOffs + i * 40 + 39, 0.0, 1, 40)); QRadialGradient grad(QPointF(mXOffs + i * 40 + 10, 10), 100); grad.setColorAt(0, mGrad0); grad.setColorAt(1, mGrad1); painter->setBrush(QBrush(grad)); painter->drawRect(QRectF(mXOffs + i * 40 + 1, 1.0, 38.0, 38.0)); } } ColorCode-0.8.5/trans_cs.ts0000644000175000017500000011344112610773251014235 0ustar dirkdirk UTF-8 About &Author &Autor icon ikona &License &Povolení A needful game to train your brain ;-) Hra potÅ™ebná pro udržení bdÄ›losti <br>vaÅ¡eho mozku :-) ColorCode ColorCode About ColorCode O ColorCode <br><br>Free MasterMind clone including a built in,<br>rather intelligent solver. <br><br>Klon Free MasterMind s vestavÄ›ným<br>dost schopným Å™eÅ¡itelem - poÄítaÄem. Version Verze Author Autor 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. Tento program je svobodným. Můžete jej šířit a/nebo upravovat za podmínek GNU General Public License, jak jsou zveÅ™ejnÄ›ny Free Software Foundation, buÄ podle verze 3 licence nebo (podle své volby) podle jakékoli pozdÄ›jší verze. ButtonsCell Play this Game again PÅ™ehrát tuto hru znovu Save this Game as Bookmark Uložit tuto hru jako záložku Remove from List Odstranit ze seznamu Copy Game Number to Clipboard Kopírovat Äíslo hry do schránky ColorCode New Game Nová hra Do you want to give in and start a new Game? Chcete vzdát hru a zaÄít novou? About Qt O Qt &New Game &Nová hra Ctrl+N Ctrl+N &Restart Game &ZaÄít hru znovu Ctrl+R Ctrl+R E&xit &UkonÄit Ctrl+Q Ctrl+Q Ctrl+T Ctrl+T Ctrl+C Ctrl+C Ctrl+A Ctrl+A About &Qt O &Qt &Game &Hra &Settings &Nastavení &Help &NápovÄ›da Game Hra Message Hlášení The changed settings will only apply to new games! Do you want to give in the current and start a new Game? ZmÄ›ny v nastavení se projeví teprve po novém spuÅ¡tÄ›ní hry! Chcete vzdát nynÄ›jší hru a zaÄít novou? Place Your pegs ... UmístÄ›te své kameny... Congratulation! You have won! BlahopÅ™ejeme! Vyhrál jste! Sorry! You lost! Promiňte, ale nezvládl jste to! Ctrl+I Ctrl+I Give In Vzdát se Do you really want to give in? SkuteÄnÄ› chcete hru vzdát? &Throw In The Towel &Vhodit ruÄník Ctrl+G Ctrl+G Sure, You're too weak for me! Je jasné, že jste pro mÄ› příliÅ¡ slabý! Ctrl+Shift+R Ctrl+Shift+R Ctrl+Shift+C Ctrl+Shift+C Fill Row by Random Naplnit řádek náhodnÄ› Duplicate Previous Row Zdvojit pÅ™edchozí řádek Ctrl+D Ctrl+D Clear Row Vyprázdnit řádek &Row &Řádek ColorCode ColorCode About &ColorCode O &ColorCode Ctrl+M Ctrl+M Show Toolbar Ukázat nástrojový pruh Show Menubar Ukázat pruh s hlavní nabídkou Show Statusbar Ukázat stavový pruh Allow Pegs of the Same Color Povolit kameny se stejnou barvou Level Stupeň obtížnosti Computer's Guess Nechat poÄítaÄ hádat Ctrl+H Ctrl+H Press the Hint Field or Key Enter if You're done. Pokud jste hotov, klepnÄ›te na pole s radou. Disallow Pegs of the Same Color Zákázat kameny stejné barvy Close Rows when the last Peg is placed Zavřít řádky po umístÄ›ní posledního kamene Ctrl+L Ctrl+L Beginner (2 Colors, 2 Slots, Doubles) ZaÄáteÄník (2 barvy, 2 pole, zdvojení) Easy (4 Colors, 3 Slots, No Doubles) Lehká hra (4 barvy, 3 pole, bez zdvojení) Classic (6 Colors, 4 Slots, Doubles) Klasická hra (6 barev, 4 pole, zdvojení) Challenging (8 Colors, 4 Slots, Doubles) NároÄná hra (8 barev, 4 pole, zdvojení) Hard (10 Colors, 5 Slots, Doubles) Těžká hra (10 barev, 5 polí, zdvojení) Level Presets PÅ™ednastavení stupnÄ› obtížnosti Colors barev Pegs of Same Color Kameny téže barvy Slots pole Yes Ano No Ne Reset Color Order Znovu nastavit poÅ™adí barev Ctrl+Shift+L Ctrl+Shift+L Online &Help &NápovÄ›da po internetu F1 F1 Done Hotovo Ctrl+Shift+N Ctrl+Shift+N Rate it for me OhodnoÅ¥ to pro mÄ› Human vs Computer ÄŒlovÄ›k proti poÄítaÄi Computer vs Human PoÄítaÄ proti ÄlovÄ›ku Game Mode Herní režim Press the button below or Key Enter if You're done. Pokud jste hotov, použijte tlaÄítko dole nebo klávesu Enter. Place Your secret ColorCode ... UmístÄ›te svůj tajný ColorCode... Please rate the guess. Press OK or Key Enter if You're done. OhodnoÅ¥te, prosím, můj návrh. Pokud jste hotov, použijte tlaÄítko OK nebo klávesu Enter. The impossible happened, sorry. Bohužel se stalo nemožné. Yeah! I guessed it, man! Jo! Já to tuÅ¡il! Embarrassing! I lost a game! Trapné! Já tu hru ztratil! Nope! Thats impossible! Did you gave me false hints? Ne! To není možné! Dal jste mi Å¡patné rady? Don't you like to see me winning? ;-) Nelíbí se vám, když vyhrávám? :-) Set Hints automatically Nastavit rady automaticky Ctrl+Shift+H Ctrl+Shift+H Preferences Nastavení Ctrl+P Ctrl+P Show Indicators Ukázat ukazatele The chosen settings do not allow pegs of the same color! Zvolená nastavení nedovolují kameny stejné barvy. &Start particular Game &Spustit zvláštní hru &Bookmark current Game PÅ™idat nynÄ›jší hru do &záložek Ctrl+B Ctrl+B Ctrl+Alt+H Ctrl+Shift+H &Recent Games &Nedávné hry Ctrl+Alt+R Ctrl+Alt+R &Bookmarks &Záložky Ctrl+Alt+B Ctrl+Alt+B Ctrl+Shift+S Ctrl+Shift+S Game &Lists &Seznamy guessed and rated ... Uhádnuté a hodnocené... Let me think ... Nech mÄ› pÅ™emýšlet... Computer vs. Human ÄŒlovÄ›k proti poÄítaÄi &Highscores &Nejlepší výsledky Ctrl+Shift+B Ctrl+Shift+B Ctrl+Alt+N Ctrl+Alt+N &Have a Break &PÅ™estávka na pÅ™emýšlení &Bookmark Current Game PÅ™idat nynÄ›jší hru do &záložek Ctrl+Shift+T Ctrl+Shift+T Show Timer Ukázat Äasomíru Display Game Number Zobrazit Äíslo hry Allow Pegs of Same Color Povolit kameny téže barvy Disallow Pegs of Same Color Zákázat kameny stejné barvy Ctrl+Alt+C Ctrl+Alt+C Ctrl+Shift+P Ctrl+Shift+P &Resume Game &PokraÄovat ve hÅ™e Human vs. Computer ÄŒlovÄ›k proti poÄítaÄi Game Number Číslo hry Paused Pozastaveno &Copy Game Number &Kopírovat Äíslo hry GameNoDisplay Human vs. Computer ÄŒlovÄ›k proti poÄítaÄi Game Number Číslo hry GameTablesDialog ColorCode Games Hry ColorCode Game Properties Vlastnosti hry User Uživatel Color Count PoÄet barev Slot Count PoÄet polí Pegs of Same Color Kameny téže barvy Yes Ano Game Number Číslo hry Date and Time Datum a Äas Duration Doba trvání Insert Game Number Vložit Äíslo hry Play PÅ™ehrát Recent Games Nedávné hry Bookmarks Záložky Highscores Nejlepší výsledky Clear List Smazat seznam Close Zavřít No Ne Message Hlášení This will permanently remove all entries from the List. Do You want to proceed? Tímto budou vÅ¡echny záznamy trvale odstranÄ›ny ze seznamu. Chcete pokraÄovat? Game Number Input Zadání Äísla hry Bookmarked Games Hry pÅ™idané do záložek High Score List Seznam nejlepších výsledků Please provide a name! Otherwise your score won't be saved. PoskytnÄ›te, prosím, název! V opaÄném případÄ› váš výsledek nebude uložen. Insert an arbitrary game number greater than 0 in the input field above. <br><br>The game properties like color count, slot count etc. will be displayed in the corresponding area above.<br><br>Click the Play button or press key Enter, to play the game. If a game is currently running, it will be aborted. Vložte do zadávacího pole výše libovolné Äíslo hry vÄ›tší než 0. <br><br>Vlastnosti hry, jako jsou poÄet barev, poÄet polí atd., budou zobrazeny v odpovídající oblasti výše. <br><br>KlepnÄ›te na tlaÄítko PÅ™ehrát nebo stisknÄ›te klávesu Enter, aby se hra zaÄala pÅ™ehrávat. Pokud hra již běží, bude zruÅ¡ena. Game Lists Seznamy GamesListModel Yes Ano No Ne Pegs of Same Color Kameny téže barvy Actions ÄŒinnosti Rank Hodnost User Uživatel Score Výsledek Date Datum Time ÄŒas Colors Barvy Slots Pole Game No. Číslo hry PrefDialog ... Select from predefined level settings ... Vybrat stupeň obtížnosti Beginner (2 Colors, 2 Slots, Doubles) ZaÄáteÄník (2 barvy, 2 pole, zdvojení) Easy (4 Colors, 3 Slots, No Doubles) Lehká hra (4 barvy, 3 pole, bez zdvojení) Classic (6 Colors, 4 Slots, Doubles) Klasická hra (6 barev, 4 pole, zdvojení) Challenging (8 Colors, 4 Slots, Doubles) NároÄná hra (8 barev, 4 pole, zdvojení) Hard (10 Colors, 5 Slots, Doubles) Těžká hra (10 barev, 5 polí, zdvojení) Slots pole Colors barev Human vs. Computer ÄŒlovÄ›k proti poÄítaÄi Computer vs. Human ÄŒlovÄ›k proti poÄítaÄi Low Nízká Medium StÅ™ední High Vysoká Preferences Nastavení Appearance Vzhled Controls Ovládací prvky Show or hide the Menubar. Ukázat nebo skrýt pruh s hlavní nabídkou. Show Menubar Ukázat pruh s hlavní nabídkou Show or hide the Toolbar. Ukázat nebo skrýt nástrojový pruh. Show Toolbar Ukázat nástrojový pruh Show or hide the Statusbar. Ukázat nebo skrýt stavový pruh. Show Statusbar Ukázat stavový pruh Indicators Ukazatelé If this option is checked, an indicator inside each peg is displayed. Když je zapnuta tato volba, je u každého kamene zobrazen dodateÄný ukazatel. Show Indicators inside pegs Ukázat dodateÄné ukazatele pro kameny Use unique letters as indicators. Použít písmena jako ukazatele. Letter Indicators Písmenní ukazatelé Use unique numbers as indicators. Použít Äísla jako ukazatele. Number Indicators Číselní ukazatelé Use the same neutral background color for each peg, when indicators are shown. Pro vÅ¡echny kameny použít, v případÄ› že jsou zobrazováni ukazatelé, stejnou nenápadnou barvu pozadí. Hide Colors Skrýt barvy Click here if you have changed the color order and now you want to revert it to it's initial state. KlepnÄ›te sem, pokud jste zmÄ›nil poÅ™adí barev, a nyní to chcete vrátit do poÄáteÄního stavu. Reset Color Order Znovu nastavit poÅ™adí barev Game Settings Herní nastavení Level Presets PÅ™ednastavení stupnÄ› obtížnosti Select from predefined combinations of the three different level related settings, the number of colors, the number of slots (columns) and the possibility of pegs of the same color in one row. Vyberte z pÅ™ednastavených spojení tří různých nastavení souvisejících se stupni obtížnosti: poÄet barev, poÄet polí (sloupců) a možnost kamenů stejné barvy v jednom řádku. Number of Slots PoÄet polí Number of Colors PoÄet barev Number of pegs in a single row. Higher values are harder to guess. PoÄet kamenů v jednom řádku. Vyšší hodnoty je těžší uhodnout. Number of all possible colors. Higher values are harder to guess. Celkový poÄet vÅ¡ech možných barev. Vyšší hodnoty je těžší uhodnout. If this option is checked, the hidden combination may contain one or more (even all would be possible) pegs of the same color. If checked, the combination is generally harder to guess. Když je zapnuta tato volba, skryté spojení může obsahovat jeden nebo více kamenů stejné barvy (dokonce je možné, že vÅ¡echny). Je-li zaÅ¡krtnuto, je spojení obecnÄ› obtížnÄ›ji uhodnutelné. Allow Pegs of Same Color Povolit kameny téže barvy Game Mode Herní režim Select from the different game modes. In the 1. mode you have to to guess the hidden, computer generated combination, In the 2. mode your computer will try to guess your own secret combination. Vyberte z různých herních režimů. V prvním režimu musíte uhodnout skryté, poÄítaÄem vytvoÅ™ené spojení. Ve druhém režimu se poÄítaÄ pokusí uhodnout vaÅ¡e vlastní tajné spojení. If checked, a row is closed as soon as you place the last peg and your guess is submitted immediatly. This option only affects the Human vs. Computer game mode. Když je zapnuta tato volba, je řádek uzavÅ™en, jakmile umístíte poslední kámen a váš herní tah je okamžitÄ› vyhodnocen. Tato volba úÄinkuje pouze v herním režimu, kdy hraje ÄlovÄ›k proti poÄítaÄi. Close Rows when the last Peg is placed Zavřít řádky po umístÄ›ní posledního kamene If checked, the computer will determine the corresponding hints for the solver's guess. This option affects only Computer vs. Human games. If checked, you only have to place your secret combination. Then the rest of the game runs automatically until the end. But you can set a delay between the guesses. Je-li zapnuta tato volba, budou automaticky vyplnÄ›na pole s odpovídajícími radami pro odhad Å™eÅ¡itele - poÄítaÄe. Tato volba úÄinkuje pouze pÅ™i hÅ™e poÄítaÄe proti ÄlovÄ›ku. Je-li zaÅ¡krtnuta, musíte pouze umístit své tajné spojení. Pak běží zbytek hry automaticky až do konce. OvÅ¡em mezi herními tahy můžete nastavit zpoždÄ›ní. Set Hints automatically Nastavit rady automaticky Adjust the delay (in ms) between two guesses. Upravit zpoždÄ›ní v milisekundách mezi dvÄ›ma herními tahy. Delay in ms ZpoždÄ›ní v ms Solver Strength Síla poÄítaÄe Select from 3 different strength levels for your computer opponent. This option only affects the Computer vs. Human game mode. For the computer's guess in the Human vs. Computer mode always the highest level will be used. Vyberte jednu ze tří různých herních sil pro vaÅ¡eho poÄítaÄového protivníka. Tato volba úÄinkuje pouze v herním režimu, kdy hraje poÄítaÄ proti ÄlovÄ›ku. Pro poÄítaÄův herní tah v režimu, kdy hraje ÄlovÄ›k proti poÄítaÄi se vždy použije nejvyšší úroveň herní síly. Show Game Timer Ukázat herní Äasomíru Display Game Number Zobrazit Äíslo hry Game Lists Seznamy Maximum Row Count: NejvÄ›tší poÄet řádků: Use Highscores Použít nejlepší výsledky Raise the dialog after a game has been won and prompt for the name Vyvolat dialog poté, co hra byla vyhrána, a pobídnout k napsání jména Automatically insert Highscores using the name below Automaticky vložit nejlepší výsledky a pÅ™itom použít jméno níže Name (mandatory for the second option) Jméno (povinné pro druhou volbu) User Interface Uživatelské rozhraní Display the current game number in the footer. To avoid remembering, you can hide it here. Zobrazit Äíslo souÄasné hry v zápatí. Můžete je nechat zde, abyste si je nemusel pamatovat. Timer ÄŒasomíra You may hide the timer to keep calm ;-) But note! Even hidden, time's running in the background. Můžete skrýt Äasomíru, abyste byl víc v klidu. :-) Ale uvÄ›domte si, že i když bude skrytá, Äas pořád poběží na pozadí. Game Properties Vlastnosti hry Select One of the Level Presets: Vybrat jedno z pÅ™ednastavení hry: Or Set the Particular Properties: Nebo nastavit zvláštní vlastnosti: Game Flow Tok hry Solver PoÄítaÄ Limit the number of rows in game tables like highscores etc. Valid values range from 5 to 50. Omezit poÄet řádků v tabulkách ke hÅ™e, jako jsou nejlepší výsledky atd. Rozsah použitelných hodnot je od 5 do 50 řádků. Use Customized Table Row Highlight Colors Použít uživatelsky stanovené barvy pro zvýraznÄ›ní řádků v tabulkách Foreground PopÅ™edí Background Pozadí Highscores Nejlepší výsledky Provide a name with maximum 20 characters here to be used for highscore entries. If you checked the automatic option above, this name is mandatory, otherwise it will be used as proposal which you may change later in the dialog. Zde napiÅ¡te název, který bude mít nejvíc 20 znaků, který se použije pro záznamy v nejlepších výsledcích. Pokud jste zaÅ¡krtli automatickou volbu výše, je tento název povinný, v opaÄném případÄ› se použije jako návrh, jejž můžete pozdÄ›ji zmÄ›nit. Uncheck this if you are confused about the time as fast running ;-) Pokud by vás ukazatel Äasu mÄ›l zneklidňovat, zruÅ¡te zaÅ¡krtnutí této volby Show Tenth and Hundredth Ukázat desetiny a setiny sekund RowHint Commit Your solution VyzkouÅ¡et své Å™eÅ¡ení Click the circles to rate my guess. Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-) KlepnÄ›te na kruhy pro vyhodnocení mého herního tahu. StisknÄ›te Ctrl+H nebo odpovídající tlaÄítko v nástrojovém pruhu, abyste pÅ™enesl onu záležitost s vyhodnocením na tu moji Äást, která je v tomto případÄ› zcela nestranná. :-) ColorCode-0.8.5/gametableview.cpp0000644000175000017500000000625612610773251015376 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include "highscoresmodel.h" #include "gametableview.h" GameTableView::GameTableView(QWidget *parent) : QTableView(parent) { setFocusPolicy(Qt::NoFocus); mGamesListModel = NULL; mHoverRow = -1; setMouseTracking(true); setAttribute(Qt::WA_Hover, true); setAttribute(Qt::WA_AlwaysShowToolTips, true); horizontalHeader()->setStretchLastSection(true); verticalHeader()->setSectionResizeMode(QHeaderView::Fixed); verticalHeader()->setDefaultSectionSize(18); verticalHeader()->hide(); horizontalHeader()->setFixedHeight(18); setGridStyle(Qt::NoPen); setShowGrid(false); setSelectionBehavior(QAbstractItemView::SelectItems); setAlternatingRowColors(true); setFrameStyle(QFrame::NoFrame); setFont(QApplication::font()); horizontalHeader()->setHighlightSections(false); verticalScrollBar()->setTracking(true); connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(ScrollSliderChangedSlot(int))); connect(verticalScrollBar(), SIGNAL(sliderReleased()), this, SLOT(ScrollSliderChangedSlot())); viewport()->setMouseTracking(true); viewport()->setAttribute(Qt::WA_Hover, true); viewport()->setAttribute(Qt::WA_AlwaysShowToolTips, true); viewport()->setFocus(); } void GameTableView::SetGamesListModel(GamesListModel* glm) { mGamesListModel = glm; setModel(glm); connect(this, SIGNAL(HoverRowSignal(int)), mGamesListModel, SLOT(HoverRowSlot(int))); } void GameTableView::CloseEditorSlot(const QModelIndex &index) { if (mGamesListModel != NULL && index.isValid() && index.column() == mGamesListModel->GetColIx(HighScoresModel::COL_USERNAME)) { closeEditor(indexWidget(index), QAbstractItemDelegate::SubmitModelCache); } } void GameTableView::ScrollSliderChangedSlot(int) { SetHoverRowByY((mapFromGlobal(QCursor::pos()).y() - horizontalHeader()->height())); } void GameTableView::SetHoverRowByY(const int y) { int row = rowAt(y); if (row == mHoverRow) { return; } mHoverRow = row; emit HoverRowSignal(mHoverRow); } void GameTableView::mouseMoveEvent(QMouseEvent* e) { QTableView::mouseMoveEvent(e); SetHoverRowByY(e->y()); } void GameTableView::wheelEvent(QWheelEvent* e) { QTableView::wheelEvent(e); SetHoverRowByY(e->y()); } void GameTableView::leaveEvent(QEvent*) { if (mHoverRow == -1) { return; } mHoverRow = -1; emit HoverRowSignal(mHoverRow); } ColorCode-0.8.5/cellbtn.cpp0000644000175000017500000000162312610773251014176 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include "cellbtn.h" CellBtn::CellBtn(QWidget *parent) : QToolButton(parent) { setMouseTracking(true); setAttribute(Qt::WA_Hover, true); } ColorCode-0.8.5/main.cpp0000644000175000017500000000633112610773251013500 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include #include #include #include #include #include "colorcode.h" int main(int argc, char* argv[]) { using namespace std; string lang(""); if (argc > 1) { string str; for (int i = 1; i < argc; ++i) { str = argv[i]; if (str == "-h" || str == "--help") { cout << "usage: ColorCode [options]" << endl; cout << " options:" << endl; cout << " -l cc, --lang=cc use country code cc instead of system locale, accepted values for cc: en|de|cs|fr|hu|es" << endl; cout << " -h, --help prints this message ;-)" << endl; return 0; } else if (str == "-l" && i < argc - 1) { if (std::string(argv[i + 1]) == "de" || std::string(argv[i + 1]) == "en" || std::string(argv[i + 1]) == "cs" || std::string(argv[i + 1]) == "fr" || std::string(argv[i + 1]) == "hu" || std::string(argv[i + 1]) == "es" ) { std::string test(argv[i]); lang = argv[i + 1]; } } else if ( str.size() == 9 && str.find("--lang=") != string::npos && (str.substr(7) == "en" || str.substr(7) == "de" || str.substr(7) == "cs" || str.substr(7) == "fr" || str.substr(7) == "hu" || str.substr(7) == "es" ) ) { lang = str.substr(7); } } } QApplication app(argc, argv); QTranslator qtTranslator; if (lang == "") { qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); } else { qtTranslator.load("qt_" + QString::fromStdString(lang), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); } app.installTranslator(&qtTranslator); QTranslator appTranslator; if (lang == "") { appTranslator.load(":/trans_" + QLocale::system().name()); } else { appTranslator.load(":/trans_" + QString::fromStdString(lang)); } app.installTranslator(&appTranslator); ColorCode w; w.show(); return app.exec(); } ColorCode-0.8.5/background.cpp0000644000175000017500000001125212610773251014671 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include #include "background.h" #include "pegfactory.h" using namespace std; BackGround::BackGround(QObject*) { setCacheMode(QGraphicsItem::DeviceCoordinateCache); setAcceptedMouseButtons(0); QLinearGradient topgrad(0, 16, 0, 129); topgrad.setColorAt(0.0, QColor(0xf8, 0xf8, 0xf8)); topgrad.setColorAt(0.6, QColor(0xb8, 0xb9, 0xbb)); topgrad.setColorAt(1, QColor(0xd4, 0xd5, 0xd7)); mTopGrad = QBrush(topgrad); QLinearGradient botgrad(0, 530, 0, 557); botgrad.setColorAt(0.0, QColor("#d4d5d7")); botgrad.setColorAt(0.3, QColor("#cecfd1")); botgrad.setColorAt(1.0, QColor("#b0b1b3")); mBotGrad = QBrush(botgrad); QLinearGradient lgrad(0, 190, 320, 370); lgrad.setColorAt(0.0, QColor(0xff, 0xff, 0xff, 0xa0)); lgrad.setColorAt(0.49, QColor(0xff, 0xff, 0xff, 0xa0)); lgrad.setColorAt(0.50, QColor(0, 0, 0, 0x80)); lgrad.setColorAt(1.0, QColor(0, 0, 0, 0x80)); mFramePen = QPen(QBrush(lgrad), 1); mPend = QColor("#646568"); mPenl = QColor("#ecedef"); mGrad0 = QColor("#cccdcf"); mGrad1 = QColor("#fcfdff"); mPend.setAlpha(0x32); mPenl.setAlpha(0x50); mGrad0.setAlpha(0x32); mGrad1.setAlpha(0x32); } BackGround::~BackGround() { scene()->removeItem(this); } QRectF BackGround::boundingRect() const { const int margin = 1; return outlineRect().adjusted(-margin, -margin, +margin, +margin); } QRectF BackGround::outlineRect() const { return QRectF(0.0, 0.0, 320.0, 560.0); } void BackGround::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, QWidget* /* widget */) { int i; painter->setPen(Qt::NoPen); QRectF cr = QRectF(3, 3, 314, 554); QPainterPath cpath; cpath.addRoundedRect(cr, 10.1, 10.1); painter->setClipPath(cpath); painter->setClipping(true); painter->setBrush(mTopGrad); painter->drawRect(QRect(4, 4, 312, 125)); painter->setBrush(QBrush(QColor("#707173"))); painter->drawRect(QRect(1, 129, 318, 1)); painter->setPen(Qt::NoPen); for (i = 0; i < 10; ++i) { painter->setBrush(QBrush(QColor("#9e9fa0"))); painter->drawRect(QRect(1, i * 40 + 130, 318, 1)); QLinearGradient rowgrad(0, i * 40 + 131, 0, i * 40 + 169); rowgrad.setColorAt(0.0, QColor("#9a9b9d")); rowgrad.setColorAt(1.0, QColor("#949597")); painter->setBrush(QBrush(rowgrad)); painter->drawRect(QRect(1, i * 40 + 131, 318, 38)); painter->setBrush(QBrush(QColor("#88898b"))); painter->drawRect(QRect(1, i * 40 + 169, 318, 1)); painter->setBrush(QBrush(mPenl)); painter->drawRect(QRectF(277, i * 40 + 130, 39, 1)); painter->drawRect(QRectF(277, i * 40 + 130, 1, 39)); painter->setBrush(QBrush(mPend)); painter->drawRect(QRectF(277, i * 40 + 130 + 39, 40, 1)); painter->drawRect(QRectF(277 + 39, i * 40 + 130, 1, 40)); QRadialGradient grad(QPointF(277 + 10, i * 40 + 130 + 10), 100); grad.setColorAt(0, mGrad0); grad.setColorAt(1, mGrad1); painter->setBrush(QBrush(grad)); painter->drawRect(QRectF(277 + 1, i * 40 + 131, 38.0, 38.0)); painter->setBrush(Qt::NoBrush); QPointF x0 = QPointF(PegFactory::XPOS_BTNS_COL, i * 40 + 130 + 2); QLinearGradient lgrad(x0, QPointF(x0.x() + 36, x0.y() + 36)); lgrad.setColorAt(0.0, QColor(0, 0, 0, 0x80)); lgrad.setColorAt(1.0, QColor(0xff, 0xff, 0xff, 0xa0)); painter->setPen(QPen(QBrush(lgrad), 0.5)); painter->drawEllipse(QRectF(x0.x(), x0.y(), 36, 36)); painter->setPen(Qt::NoPen); } painter->setBrush(mBotGrad); painter->drawRect(QRect(1, 531, 318, 27)); painter->setBrush(QBrush(QColor("#eff0f2"))); painter->drawRect(QRect(1, 530, 318, 1)); painter->setClipping(false); QRectF r = QRectF(3.5, 3.5, 313, 553); painter->setBrush(Qt::NoBrush); painter->setPen(mFramePen); painter->drawRoundedRect(r, 9.8, 9.8); } ColorCode-0.8.5/rowhint.cpp0000644000175000017500000002151012610773251014242 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include #include "rowhint.h" using namespace std; const int RowHint::mPegPos[4][5][3] = { { { 6, 14, 12 }, { 22, 14, 12 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, }, { { 6, 7, 12 }, { 22, 7, 12 }, { 14, 21, 12 }, { 0, 0, 0 }, { 0, 0, 0 }, }, { { 6, 6, 12 }, { 22, 6, 12 }, { 6, 22, 12 }, { 22, 22, 12 }, { 0, 0, 0 }, }, { { 4, 4, 12 }, { 24, 4, 12 }, { 14, 14, 12 }, { 4, 24, 12 }, { 24, 24, 12 } } }; RowHint::RowHint(QObject*) { mIx = -1; mPegCnt = 0; mPen = QPen(QColor("#808080")); mPen.setWidth(2); QRadialGradient grad(QPointF(10, 10), 100); grad.setColorAt(0, QColor("#d8d8d8")); grad.setColorAt(1, QColor("#ffffff")); mBrush1 = QBrush(grad); grad.setColorAt(0, QColor(216, 216, 216, 51)); grad.setColorAt(1, QColor(255, 255, 255, 51)); mBrush0 = QBrush(grad); Reset(0, 0); } RowHint::~RowHint() { scene()->removeItem(this); } void RowHint::Reset(const int pegcnt, const int gamemode) { mActive = true; mSolved = false; SetPegCnt(pegcnt); mHints.clear(); mHints.assign(mPegCnt, 0); SetGameMode(gamemode); SetActive(false); } int RowHint::GetIx() const { return mIx; } void RowHint::SetIx(const int ix) { mIx = ix; } void RowHint::SetPegCnt(const int pegcnt) { mPegCnt = pegcnt; } void RowHint::SetGameMode(const int gamemode) { mGameMode = gamemode; } bool RowHint::IsActive() const { return mActive; } void RowHint::SetActive(bool b) { if (b == mActive) { return; } mActive = b; setAcceptHoverEvents(b); setEnabled(b); if (b) { if (mGameMode == ColorCode::MODE_HVM) { setCursor(Qt::PointingHandCursor); setToolTip(tr("Commit Your solution")); } else if (mGameMode == ColorCode::MODE_MVH) { mSolved = true; mHints.assign(mPegCnt, 0); setCursor(Qt::ArrowCursor); setToolTip(tr("Click the circles to rate my guess.\nHit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-)")); } } else { setCursor(Qt::ArrowCursor); setToolTip(QString("")); } update(boundingRect()); } void RowHint::SetPaused(const bool b) { if (b) { setCursor(Qt::ArrowCursor); setToolTip(QString("")); } else if (mActive) { setCursor(Qt::PointingHandCursor); setToolTip(tr("Commit Your solution")); } update(boundingRect()); } std::vector RowHint::GetHints() { return mHints; } void RowHint::DrawHints(std::vector res) { mHints.clear(); mHints.assign(mPegCnt, 0); for (unsigned i = 0; i < res.size(); ++i) { mHints.at(i) = res.at(i); } mSolved = true; update(boundingRect()); } void RowHint::mousePressEvent(QGraphicsSceneMouseEvent* e) { if (ColorCode::INSTANCE->GetGameState() == ColorCode::STATE_PAUSED) { return; } if (e->button() != Qt::LeftButton) { return; } if (mGameMode == ColorCode::MODE_HVM) { bool disabled = false; if (mActive && !mSolved) { if (e->button() == Qt::LeftButton) { SetActive(false); emit HintPressedSignal(mIx); disabled = true; } } if (!disabled) { QGraphicsItem::mousePressEvent(e); } } else if (mGameMode == ColorCode::MODE_MVH) { qreal xm = e->pos().x(); qreal ym = e->pos().y(); int posix = mPegCnt - 2; for (int i = 0; i < mPegCnt; i++) { if ( xm >= mPegPos[posix][i][0] && xm <= mPegPos[posix][i][0] + mPegPos[posix][i][2] && ym >= mPegPos[posix][i][1] && ym <= mPegPos[posix][i][1] + mPegPos[posix][i][2]) { ++mHints.at(i); if (mHints.at(i) > 2) { mHints.at(i) = 0; } } } update(boundingRect()); } } QPainterPath RowHint::shape() const { QPainterPath path; path.addRect(boundingRect()); return path; } QRectF RowHint::boundingRect() const { const int margin = 1; return outlineRect().adjusted(-margin, -margin, 2 * margin, 2 * margin); } QRectF RowHint::outlineRect() const { return QRectF(0.0, 0.0, 40.0, 40.0); } void RowHint::paint(QPainter* painter, const QStyleOptionGraphicsItem* , QWidget* ) { if (mPegCnt == 0) { return; } int i; QColor pend = QColor("#646568"); QColor penl = QColor("#ecedef"); QColor grad0 = QColor("#cccdcf"); QColor grad1 = QColor("#fcfdff"); if (mActive) { pend.setAlpha(0xff); penl.setAlpha(0xff); grad0.setAlpha(0xff); grad1.setAlpha(0xff); } else if (mSolved) { pend.setAlpha(0xa0); penl.setAlpha(0xa0); grad0.setAlpha(0xa0); grad1.setAlpha(0xa0); } else { pend.setAlpha(0x32); penl.setAlpha(0x50); grad0.setAlpha(0x32); grad1.setAlpha(0x32); } painter->setPen(Qt::NoPen); painter->setBrush(QBrush(penl)); painter->drawRect(QRectF(0.0, 0.0, 39, 1)); painter->drawRect(QRectF(0.0, 0.0, 1, 39)); painter->setBrush(QBrush(pend)); painter->drawRect(QRectF(0.0, 39.0, 40, 1)); painter->drawRect(QRectF(39, 0.0, 1, 40)); QRadialGradient grad(QPointF(10, 10), 100); grad.setColorAt(0, grad0); grad.setColorAt(1, grad1); painter->setBrush(QBrush(grad)); painter->drawRect(QRectF(1, 1.0, 38.0, 38.0)); painter->setBrush(Qt::NoBrush); int posix = mPegCnt - 2; QPointF x0; for (i = 0; i < mPegCnt; i++) { x0 = QPointF(mPegPos[posix][i][0], mPegPos[posix][i][1]); QLinearGradient lgrad(x0, QPointF(x0.x() + 10, x0.y() + 10)); lgrad.setColorAt(0.0, QColor(0, 0, 0, 0xa0)); lgrad.setColorAt(1.0, QColor(0xff, 0xff, 0xff, 0xa0)); painter->setPen(QPen(QBrush(lgrad), 0.5)); painter->drawEllipse(QRectF(mPegPos[posix][i][0], mPegPos[posix][i][1], mPegPos[posix][i][2], mPegPos[posix][i][2])); } if (mSolved && ColorCode::INSTANCE->GetGameState() != ColorCode::STATE_PAUSED) { painter->setPen(Qt::NoPen); for (unsigned i = 0; i < mHints.size(); i++) { if (mHints.at(i) == 0) { continue; } if (mHints.at(i) == 2) { painter->setBrush(QBrush(Qt::black)); } else { painter->setBrush(QBrush(Qt::white)); } painter->drawEllipse(QRectF(mPegPos[posix][i][0], mPegPos[posix][i][1], mPegPos[posix][i][2], mPegPos[posix][i][2])); } } } ColorCode-0.8.5/timedisplay.cpp0000644000175000017500000000776112610773251015110 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include #include "timedisplay.h" #include "gametimer.h" TimeDisplay::TimeDisplay(QGraphicsItem* parent) : QGraphicsTextItem(parent) { setAcceptedMouseButtons(Qt::NoButton); setAcceptHoverEvents(false); mFont = QFont("Arial", 18, QFont::Normal, false); mFont.setStyleHint(QFont::SansSerif); mFont.setPixelSize(24); setFont(mFont); setDefaultTextColor(QColor("#d7d8da")); mShowTenth = true; mSs = mLastSs = ""; mHs = ""; mInterval = 50; mPaused = false; mStopped = true; mGameTime = 0; mTime = 0; mTimer = new GameTimer(this); connect(mTimer, SIGNAL(TimeOutSignal(int)), this, SLOT(DisplayTime(int))); mTimer->Start(); setTextWidth(440); setScale(0.5); } TimeDisplay::~TimeDisplay() { } int TimeDisplay::GetGameTime() const { return mGameTime; } bool TimeDisplay::IsActive() const { return (!mPaused && !mStopped); } bool TimeDisplay::IsPaused() const { return mPaused; } bool TimeDisplay::IsStopped() const { return mPaused; } void TimeDisplay::SetTenth(bool b) { mShowTenth = b; } void TimeDisplay::StartT() { mTime = 0; mT0.start(); DisplayTime(); mPaused = false; mStopped = false; } void TimeDisplay::PauseT() { if (!mStopped && !mPaused) { mTime += mT0.restart(); DisplayTime(); mPaused = true; } } void TimeDisplay::ResumeT() { if (mPaused && !mStopped) { mT0.restart(); mPaused = false; } } void TimeDisplay::StopT() { if (!mStopped && !mPaused) { mTime += mT0.restart(); DisplayTime(); mStopped = true; mPaused = false; mTime = 0; } } void TimeDisplay::DisplayTime(int tick) { if (mPaused || mStopped) { return; } mGameTime = mT0.elapsed() + mTime; mT1 = QTime(0, 0, 0, 0); mT1 = mT1.addMSecs(mGameTime); if (mShowTenth) { if (tick == 0) { mHs = QString::number((int)(mT1.msec()/10)); } else { mHs = QString::number(((int)(mT1.msec()/50))*5); } if (mHs.length() < 2) { mHs.prepend("0"); } } if (isVisible()) { QString tstr; if (!mShowTenth) { mSs = mT1.toString("ss"); if (mSs == mLastSs) { return; } tstr = QString("
%1:%2:%3
").arg( mT1.toString("hh"), mT1.toString("mm"), mSs); mLastSs = mSs; } else { tstr = QString("
%1:%2:%3:%4
").arg( mT1.toString("hh"), mT1.toString("mm"), mT1.toString("ss"), mHs); } setHtml(tstr); } } ColorCode-0.8.5/gametableview.h0000644000175000017500000000276012610773251015037 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef GAMETABLEVIEW_H #define GAMETABLEVIEW_H #include class GamesListModel; class GameTableView : public QTableView { Q_OBJECT public: GamesListModel* mGamesListModel; GameTableView(QWidget * parent = 0); void SetGamesListModel(GamesListModel* glm); public slots: void CloseEditorSlot(const QModelIndex &index); signals: void HoverRowSignal(const int row); protected: void mouseMoveEvent(QMouseEvent* e); void wheelEvent(QWheelEvent* e); void leaveEvent(QEvent* e); protected slots: void ScrollSliderChangedSlot(int v = 0); private: int mHoverRow; void SetHoverRowByY(const int y); }; #endif // GAMETABLEVIEW_H ColorCode-0.8.5/graphicsbtn.cpp0000644000175000017500000001172112610773251015057 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #include #include #include "graphicsbtn.h" using namespace std; GraphicsBtn::GraphicsBtn() { mWidth = 152; setAcceptHoverEvents (true); mLabel = ""; mLabelWidth = 0; mYOffs = 0; mOpOver = 1.0; mOpOut = 1.0; InitGraphics(); SetShapes(); mFillBrush = &mFillOutBrush; mFrameBrush = &mFrameOutBrush; mFont = QFont("Arial", 12, QFont::Bold, false); mFont.setStyleHint(QFont::SansSerif); mFont.setStyleStrategy(QFont::PreferAntialias); SetEnabled(true); } void GraphicsBtn::SetEnabled(bool b) { if (b) { setCursor(Qt::PointingHandCursor); } else { setCursor(Qt::ArrowCursor); } setEnabled(b); } void GraphicsBtn::SetWidth(int w) { mWidth = w; SetShapes(); } void GraphicsBtn::SetLabel(QString str) { mLabel = str; } void GraphicsBtn::ShowBtn(bool b) { if (b) { mFillBrush = &mFillOutBrush; mFrameBrush = &mFrameOutBrush; } setVisible(b); } void GraphicsBtn::SetStatesOpacity(const qreal opOver, const qreal opOut) { mOpOver = opOver; mOpOut = opOut; setOpacity(mOpOut); } void GraphicsBtn::InvertStates() { QBrush tmp = mFillOutBrush; mFillOutBrush = mFillOverBrush; mFillOverBrush = tmp; } void GraphicsBtn::SetHoverState() { if (mFillBrush != &mFillOverBrush) { mFillBrush = &mFillOverBrush; } setOpacity(mOpOver); update(mRect); } void GraphicsBtn::SetOutState() { if (mFillBrush != &mFillOutBrush) { mFillBrush = &mFillOutBrush; } setOpacity(mOpOut); update(mRect); } void GraphicsBtn::SetPressedState() { if (mFrameBrush != &mFrameOverBrush) { mFrameBrush = &mFrameOverBrush; } mYOffs = 1; update(mRect); } void GraphicsBtn::hoverEnterEvent(QGraphicsSceneHoverEvent* e) { SetHoverState(); QGraphicsItem::hoverEnterEvent(e); } void GraphicsBtn::hoverLeaveEvent(QGraphicsSceneHoverEvent* e) { SetOutState(); QGraphicsItem::hoverLeaveEvent(e); } void GraphicsBtn::mousePressEvent(QGraphicsSceneMouseEvent* e) { if (e->button() != Qt::LeftButton) { return; } SetPressedState(); } void GraphicsBtn::mouseReleaseEvent(QGraphicsSceneMouseEvent* e) { if (e->button() != Qt::LeftButton) { return; } mFrameBrush = &mFrameOutBrush; mYOffs = 0; if ( e->pos().x() >= 0 && e->pos().x() <= boundingRect().width() && e->pos().y() >= 0 && e->pos().y() <= boundingRect().height() ) { emit BtnPressSignal(this); } update(mRect); } void GraphicsBtn::InitGraphics() { QLinearGradient fillgrad(0, 2, 0, 36); fillgrad.setColorAt(0.0, QColor("#f7f8fa")); fillgrad.setColorAt(0.5, QColor("#b9babc")); mFillOutBrush = QBrush(fillgrad); QLinearGradient fillovergrad(0, 2, 0, 36); fillovergrad.setColorAt(0.0, QColor("#f7f8fa")); fillovergrad.setColorAt(1.0, QColor("#b9babc")); mFillOverBrush = QBrush(fillovergrad); QLinearGradient framegrad(0, 0, 0, 40); framegrad.setColorAt(1.0, QColor(0, 0, 0, 0xa0)); framegrad.setColorAt(0.0, QColor(0xff, 0xff, 0xff, 0xa0)); mFrameOutBrush = QBrush(framegrad); QLinearGradient frameovergrad(0, 0, 0, 40); frameovergrad.setColorAt(0.0, QColor(0, 0, 0, 0xa0)); frameovergrad.setColorAt(1.0, QColor(0xff, 0xff, 0xff, 0xa0)); mFrameOverBrush = QBrush(frameovergrad); } void GraphicsBtn::SetShapes() { mRect = QRectF(0, 0, mWidth, 38); mRectFill = QRectF(1, 1, mWidth - 2, 36); } QRectF GraphicsBtn::boundingRect() const { const double margin = 0.5; return mRect.adjusted(-margin, -margin, 2 * margin, 2 * margin); } void GraphicsBtn::paint(QPainter *painter, const QStyleOptionGraphicsItem * , QWidget* ) { painter->setPen(Qt::NoPen); painter->setBrush(*mFrameBrush); painter->drawRoundedRect(mRect, 20, 20); painter->setBrush(*mFillBrush); painter->drawRoundedRect(mRectFill, 18, 18); if (mLabel != "") { painter->setRenderHint(QPainter::TextAntialiasing, true); painter->setPen(QPen(QColor("#303133"))); painter->setFont(mFont); painter->drawText(mRectFill.adjusted(0, mYOffs, 0, mYOffs), Qt::AlignCenter, mLabel); } } ColorCode-0.8.5/gametimer.h0000644000175000017500000000233012610773251014166 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef GAMETIMER_H #define GAMETIMER_H #include #include #include "colorcode.h" #include "timedisplay.h" using namespace std; class GameTimer : public QThread { Q_OBJECT public: GameTimer(QObject* parent = 0); ~GameTimer(); void run(); public slots: void Start(); void TimeOut(); signals: void TimeOutSignal(int tick); private: int mInterval; }; #endif // GAMETIMER_H ColorCode-0.8.5/msg.h0000644000175000017500000000237412610773251013012 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef MSG_H #define MSG_H #include #include #include #include #include #include class Msg : public QGraphicsTextItem { public: Msg(); ~Msg(); void ShowMsg(const QString str); QRectF boundingRect() const; void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); private: QTextLayout* mLay; QFont mFont; QRectF mUpdateRect; }; #endif // MSG_H ColorCode-0.8.5/trans_es.qm0000644000175000017500000005203412610773251014226 0ustar dirkdirk<¸dÊÍ!¿`¡½ÝBè‘„OúO%kO&\Sg:m_Ã% _Ã%ù_Ã'¹gÛ¶EÁØ5 ïØ/Úú^ÅëÞN¿*Ø5í*ì06¼b›GßMR̼ûZ6³ ²Z6³&æZ6³J't‘NI™‡J© \‡J©)+ÛAâ NÛAâH0ß~RæiLÔ9‘3.©@¤gíOÜpÚUo± rd&bmd&b>m’>H•sº~<Á€Þ †à( ¬.Ùr¯n~è~•Šò oùÇ%-%'Rp%'R(¶fïÅ n¸¡uˆ%Luˆ%.g‰ñ³:ÆŽù“:¦Ðþ2·ú^jÊY•Ê—…‹Ê—…%1̯Ÿ¢ÿ™|ÿ™-ÜŒ¯b_¦6“ 9¦6“&%¦6“,Õ«Žñ ᫎó«ŽôA«Ž÷q«Žø¡«ŽùÑ«Žü«Žý1«Žþa«‘«Á«ñ«k­ Î7uììã/’;°½:—@"³(`bÑ#_ ªuÓFô ^J·:ÑÒž:ÑÒG~[’“-_u]âPŠÿÆlñÿ9>‰H~amöb¥möb0¨2""¨2"%–¨2"&…ÕDzôÕDzGÕøq *ñ% LJ6¡ìJ<¬î>€?½¨HQhJYý:Ó'F +ÃK WD¿!È ea^Ù laô2 © Þ k ¶Ð.6} %uŽKÀ Œ¯B &ÅÃ-˜ tÂ0\ „G  ˆ  ` ˆ ,4 ÖB#;q -ÒàAj e#; ŽS™Ü ŽS™F‚ Žôž;Á ”Óu¾ ”ýuK —.Cú ºïs É – ÝÂT ÝÂ=Ö 1Ðñ$² 9¼"ä DYó! DYøc DYü¥ DYþç DZ) ‰Ëy ‘ ‰Ëy*b ÑhþI t¾-™Þ À-™Þ-;’y ÷;’y)Çq4Õ#µSyµSy/È¿ÉFΑ!CÙ(Ž$-å‘ ãT囲39ÖiO &Autor&AuthorAbout&Licencia&LicenseAbout¦<br><br>Clon libre de Free MasterMind con un <br>solucionador bastante inteligente.Q

Free MasterMind clone including a built in,
rather intelligent solver.About^Un juego necesario para entrenar tu cerebro ;-)&A needful game to train your brain ;-)About&Acerca de ColorCodeAbout ColorCodeAbout AutorAuthorAboutEste programa es software libre; lo puedes distribuir y/o modificar bajo los términos de la Licencia general pública (GPL) tal y como la publica la Free Software Foundation; ya la bien la versión 3 de la licencia, o (si se desea) cualquier versión posterior.ï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.AboutVersiónVersionAbout iconoiconAbout &Juego&Game ColorCode &Ayuda&Help ColorCode&Nuevo juego &New Game ColorCode&&Reiniciar el juego &Restart Game ColorCode &Fila&Row ColorCode&Condiguración &Settings ColorCode &Tirar la toalla&Throw In The Towel ColorCode(Acerca de &ColorCodeAbout &ColorCode ColorCodeAcerca de &Qt About &Qt ColorCodeAcerca de QtAbout Qt ColorCode>Permitir fichas del mismo colorAllow Pegs of Same Color ColorCode>Permitir fichas del mismo colorAllow Pegs of the Same Color ColorCodeXPrinicipiante (2 Colores, 2 Ranuras, Dobles)%Beginner (2 Colors, 2 Slots, Doubles) ColorCodeTDesafiante (8 Colores, 4 Ranuras, Dobles)(Challenging (8 Colors, 4 Slots, Doubles) ColorCodeLClásico (6 Colores, 4 Ranuras, Dobles)$Classic (6 Colors, 4 Slots, Doubles) ColorCodeDespejar fila Clear Row ColorCode\Cerrar filas cuando se coloque la última ficha&Close Rows when the last Peg is placed ColorCodeColorCode ColorCode ColorCodeColoresColors ColorCode&Ordenador vs HumanoComputer vs Human ColorCode&Ordenador vs HumanoComputer vs. Human ColorCode.Conjetura del ordenadorComputer's Guess ColorCode4¡Felicidades! ¡Has ganado!Congratulation! You have won! ColorCode Ctrl+ACtrl+A ColorCode Ctrl+CCtrl+C ColorCode Ctrl+DCtrl+D ColorCode Ctrl+GCtrl+G ColorCode Ctrl+HCtrl+H ColorCode Ctrl+ICtrl+I ColorCode Ctrl+LCtrl+L ColorCode Ctrl+MCtrl+M ColorCode Ctrl+NCtrl+N ColorCode Ctrl+PCtrl+P ColorCode Ctrl+QCtrl+Q ColorCode Ctrl+RCtrl+R ColorCodeCtrl+Shift+C Ctrl+Shift+C ColorCodeCtrl+Shift+H Ctrl+Shift+H ColorCodeCtrl+Shift+L Ctrl+Shift+L ColorCodeCtrl+Shift+N Ctrl+Shift+N ColorCodeCtrl+Shift+R Ctrl+Shift+R ColorCode Ctrl+TCtrl+T ColorCodeDNo permitir fichas del mismo colorDisallow Pegs of the Same Color ColorCodeJ¿Realmente quieres darte por vencido?Do you really want to give in? ColorCodeZ¿Quieres rendirte y comenzar un nuevo juego?,Do you want to give in and start a new Game? ColorCode8¿No quieres verme ganar? ;-)%Don't you like to see me winning? ;-) ColorCode HechoDone ColorCode,Duplicar fila anteriorDuplicate Previous Row ColorCode &SalirE&xit ColorCodeHFácil (4 Colores, 2 Ranuras, Dobles)$Easy (4 Colors, 3 Slots, No Doubles) ColorCodeD¡Embarazoso! ¡He perdido un juego!Embarrassing! I lost a game! ColorCodeF1F1 ColorCodeHRellenar una fila de forma aleatoriaFill Row by Random ColorCode JuegoGame ColorCodeModo de juego Game Mode ColorCodeRendirseGive In ColorCodeNDifícil (10 Colores, 5 Ranuras, Dobles)"Hard (10 Colors, 5 Slots, Doubles) ColorCode&Humano vs OrdenadorHuman vs Computer ColorCode&Humano vs OrdenadorHuman vs. Computer ColorCode NivelLevel ColorCode8Valores prefijados del nivel Level Presets ColorCodeMensajeMessage ColorCodeNuevo juegoNew Game ColorCodeNoNo ColorCodej¡No! ¡Es imposible! ¿Me has dado indicaciones falsas?4Nope! Thats impossible! Did you gave me false hints? ColorCode&Ayuda en línea Online &Help ColorCode,Fichas del mismo colorPegs of Same Color ColorCode*Coloca las fichas ...Place Your pegs ... ColorCodeTIntroduce tu código de colores secreto ...Place Your secret ColorCode ... ColorCodePor favor, puntúe la conjetura. Pular Ok o la tecla enter una vez listo.Permitir fichas del mismo colorAllow Pegs of Same Color PrefDialogXPrinicipiante (2 Colores, 2 Ranuras, Dobles)%Beginner (2 Colors, 2 Slots, Doubles) PrefDialogTDesafiante (8 Colores, 4 Ranuras, Dobles)(Challenging (8 Colors, 4 Slots, Doubles) PrefDialogLClásico (6 Colores, 4 Ranuras, Dobles)$Classic (6 Colors, 4 Slots, Doubles) PrefDialogÀHaz click aquí si has cambiado el orden de los colores y ahora quieres volver al estado inicial.dClick here if you have changed the color order and now you want to revert it to it's initial state.  PrefDialog\Cerrar filas cuando se coloque la última ficha&Close Rows when the last Peg is placed PrefDialogColoresColors PrefDialog&Ordenador vs HumanoComputer vs. Human PrefDialogControlesControls PrefDialogRetraso en ms Delay in ms PrefDialogHFácil (4 Colores, 2 Ranuras, Dobles)$Easy (4 Colors, 3 Slots, No Doubles) PrefDialogModo de juego Game Mode PrefDialog.Configuración del juego Game Settings PrefDialogNDifícil (10 Colores, 5 Ranuras, Dobles)"Hard (10 Colors, 5 Slots, Doubles) PrefDialogOcultar colores Hide Colors PrefDialogAltoHigh PrefDialog&Humano vs OrdenadorHuman vs. Computer PrefDialogfSi se marca, una fila se cierra tan pronto como pongas la última ficha y tu conjetura se envía inmediatamente. Esta opción solo afecta a las partidas en modo Humano vs. Ordenador. If checked, a row is closed as soon as you place the last peg and your guess is submitted immediatly. This option only affects the Human vs. Computer game mode. PrefDialog®Si se marca, el ordenador determinará las correspondientes pistas para la conjetura del solucionador. Esta opción afecta sólo a las aprtidas Ordenador vs. Humano. Si se marca, sólo tienes que fijar la combinación secreta. Entonces el resto del juego se ejecuta automáticamente hasta el final. Pero puedes fijar el retraso entre las conjeturas./If checked, the computer will determine the corresponding hints for the solver's guess. This option affects only Computer vs. Human games. If checked, you only have to place your secret combination. Then the rest of the game runs automatically until the end. But you can set a delay between the guesses. PrefDialog”Si esta opción esta marcada, se muestra un indicador dentro de cada ficha.EIf this option is checked, an indicator inside each peg is displayed. PrefDialogŠSi esta opción esta seleccionada, la combinación oculta puede contener una o más (incluso todas sería posible) fichas del mismo color. Si se marca, la combinación suele ser más difícil de adivinar.¸If this option is checked, the hidden combination may contain one or more (even all would be possible) pegs of the same color. If checked, the combination is generally harder to guess. PrefDialogIndicadores Indicators PrefDialog(Indicadores de letraLetter Indicators PrefDialogBajoLow PrefDialog MedioMedium PrefDialog*Número de indicadoresNumber Indicators PrefDialog"Número de coloresNumber of Colors PrefDialog"Número de ranurasNumber of Slots PrefDialog Número de colores posible. Los valores más altos son más difíciles de averiguar.ANumber of all possible colors. Higher values are harder to guess. PrefDialog´Número de fichas en una única línea. Los valores más altos son más difíciles de averiguar.BNumber of pegs in a single row. Higher values are harder to guess. PrefDialogPreferencias Preferences PrefDialog8Restablecer orden de coloresReset Color Order PrefDialogîSeleccionar de entre 3 niveles distintos de dificultar para el ordendor contrincante. Esta opción solo afecta al modo de juego Ordenador vs. Humano. Para la conjetura del ordenador en el modo Humano vs Ordenador siempre se utiliza el nivel máximo.ÝSelect from 3 different strength levels for your computer opponent. This option only affects the Computer vs. Human game mode. For the computer's guess in the Human vs. Computer mode always the highest level will be used. PrefDialog°Seleccionar de entra las combinaciones predefinidas de tres niveles de configuraciones relativas al nivel, el número de colores, el número de ranuras (columnas) y la posibilidad de fichas del mismo color en una fila.ÁSelect from predefined combinations of the three different level related settings, the number of colors, the number of slots (columns) and the possibility of pegs of the same color in one row.  PrefDialog¨Seleccionar de entre los distintos tipos de partidas. En el modo 1 tienes que adivinar la combinación oculta, generada por el ordenador, en el modo 2 tu ordenador intentará adivinar tu propia combinación secreta.ÁSelect from the different game modes. In the 1. mode you have to to guess the hidden, computer generated combination, In the 2. mode your computer will try to guess your own secret combination. PrefDialog<Mostrar pistas automáticamenteSet Hints automatically PrefDialogPMostrar indicadores dentro de las fichasShow Indicators inside pegs PrefDialog,Mostrar barra de menus Show Menubar PrefDialog.Mostrar barra de estadoShow Statusbar PrefDialog:Mostrar barra de herramientas Show Toolbar PrefDialogHMostrar o ocultar la barra de menus.Show or hide the Menubar. PrefDialogJMostrar o ocultar la barra de estado.Show or hide the Statusbar. PrefDialogVMostrar o ocultar la barra de herramientas.Show or hide the Toolbar. PrefDialogRanurasSlots PrefDialog0Habilidad del resolvedorSolver Strength PrefDialogœUsar el mismo fondo neutro por cada ficha, cuando se muestran los indicadores.NUse the same neutral background color for each peg, when indicators are shown. PrefDialogJUsar letras únicas como indicadores.!Use unique letters as indicators. PrefDialogJUsar números únicos como indicadores.!Use unique numbers as indicators. PrefDialogJHaz click en los círculos para puntuar mi resultado. Pulsa Ctrl+H o el botón correspondiente de la barra de tareas para dejar a una parte imparcial de mi hacerlo ;-)…Click the circles to rate my guess. Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-)RowHint$Enviar tu soluciónCommit Your solutionRowHintˆColorCode-0.8.5/trans_fr.ts0000644000175000017500000011355212610773251014242 0ustar dirkdirk UTF-8 About &Author &Auteur icon icône &License &Licence A needful game to train your brain ;-) Un programme incontournable pour entraîner votre cerveau ;-) ColorCode ColorCode About ColorCode À propos de ColorCode <br><br>Free MasterMind clone including a built in,<br>rather intelligent solver. <br><br>Clone du logiciel MasterMind incluant un résolveur plutôt malin. Version Version Author Auteur 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. Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier selon les termes de la GNU General Public License (licence générale publique du projet GNU), telle qu'elle est publiée par la Free Software Foundation (Fondation pour le Logiciel Libre), soit sous sa version 3, soit (selon votre choix) sous n'importe quelle version ultérieure. ButtonsCell Play this Game again Rejouer cette partie Save this Game as Bookmark Enregister un signet pour cette partie Remove from List Effacer de la liste Copy Game Number to Clipboard Copier le numéro de partie dans le Presse-papiers ColorCode New Game Nouvelle partie Do you want to give in and start a new Game? Voulez-vous abandonner et démarrer une nouvelle partie ? About Qt À propos de Qt &New Game &Nouvelle partie Ctrl+N &Restart Game &Redémarrer la partie Ctrl+R Ctrl+R E&xit &Quitter Ctrl+Q Ctrl+T Ctrl+C Ctrl+A About &Qt À propos de &Qt &Game &Partie &Settings &Préférences &Help &Aide Game Partie Message The changed settings will only apply to new games! Do you want to give in the current and start a new Game? Les préférences modifiées ne s'appliqueront qu'aux nouvelles parties ! Voulez-vous abandonner la partie et en démarrer une nouvelle ? Place Your pegs ... Placez vos fiches... Congratulation! You have won! Congratulations ! Vous gagnâtes ! Sorry! You lost! Désolé ! Vous perdîtes ! Ctrl+I Give In Abandonner Do you really want to give in? Voulez-vous réellement abandonner ? &Throw In The Towel &Donner sa langue au chat Ctrl+G Sure, You're too weak for me! Vous êtes trop faible pour moi ; c'est sûr ! Ctrl+Shift+R Ctrl+Shift+C Fill Row by Random Garnir la rangée au hasard Duplicate Previous Row Dupliquer la rangée précédente Ctrl+D Clear Row Effacer la rangée &Row &Rangée About &ColorCode À propos de &ColorCode Ctrl+M Show Toolbar Afficher la barre d'outils Show Menubar Afficher la barre de menu Show Statusbar Afficher la barre d'état Allow Pegs of the Same Color Autoriser plusieurs fiches de même couleur Level Niveau Computer's Guess Essai de l'ordinateur Ctrl+H Press the Hint Field or Key Enter if You're done. Cliquer sur le champ des fiches d'indices ou presser la touche Entrée quand vous êtes prêt. Disallow Pegs of the Same Color Interdire plusieurs fiches de même couleur Close Rows when the last Peg is placed Finaliser la rangée quand la dernière fiche est placée Ctrl+L Beginner (2 Colors, 2 Slots, Doubles) Débutant (2 couleurs, 2 trous, doubles) Easy (4 Colors, 3 Slots, No Doubles) Facile (4 couleurs, 3 trous, pas de doubles) Classic (6 Colors, 4 Slots, Doubles) Classique (6 couleurs, 4 trous, doubles) Challenging (8 Colors, 4 Slots, Doubles) Évolué (8 couleurs, 4 trous, doubles) Hard (10 Colors, 5 Slots, Doubles) Difficile (10 couleurs, 5 trous, doubles) Level Presets Niveaux Colors Couleurs Pegs of Same Color Fiches de même couleurs autorisées Slots Trous Yes Oui No Non Reset Color Order Réinitialiser l'ordre des couleurs Ctrl+Shift+L Online &Help &Aide en ligne F1 Done Fait Ctrl+Shift+N Rate it for me Évaluer pour moi Human vs Computer Humain contre Ordinateur Computer vs Human Ordinateur contre Humain Game Mode Mode de jeu Press the button below or Key Enter if You're done. Cliquer le bouton ci-dessous ou presser la touche Entrée quand vous êtes prêt. Place Your secret ColorCode ... Placez votre code couleur secret... Please rate the guess. Press OK or Key Enter if You're done. Evaluer l'essai. Cliquer OK ou presser la touche Entrée quand vous êtes prêt. The impossible happened, sorry. L'impossible advint, désolé. Yeah! I guessed it, man! Youpi! Je l'ai deviné ! Embarrassing! I lost a game! Embarassant ! J'ai perdu la partie ! Nope! Thats impossible! Did you gave me false hints? Nenni ! Ceci est impossible ! M'avez-vous donné de faux indices ? Don't you like to see me winning? ;-) Aimez-vous me voir gagner ? ;-) Set Hints automatically Afficher les indices automatiquement Ctrl+Shift+H Preferences Préférences Ctrl+P Show Indicators Montrer les indicateurs sur les fiches The chosen settings do not allow pegs of the same color! Les préférences choisies ne permettent pas plusieurs fiches de même couleur ! &Start particular Game &Démarrer une partie en particulier &Bookmark current Game &Enregister un signet pour cette partie Ctrl+B Ctrl+B Ctrl+Alt+H Ctrl+Alt+H &Recent Games &Parties récentes Ctrl+Alt+R Ctrl+Alt+R &Bookmarks &Signets Ctrl+Alt+B Ctrl+Alt+B Ctrl+Shift+S Ctrl+Shift+S Game &Lists &Parties guessed and rated ... deviné et évalué... Let me think ... Je réfléchis... Computer vs. Human Ordinateur contre Humain &Highscores &Meilleurs scores Ctrl+Shift+B Ctrl+Alt+N Ctrl+Alt+N &Have a Break &Mettre en pause &Bookmark Current Game &Mettre unsignet au jeu Ctrl+Shift+T Ctrl+Shift+T Show Timer Montrer le minuteur Display Game Number Afficher le numéro de partie Allow Pegs of Same Color Autoriser des fiches de même couleur Disallow Pegs of Same Color Ne pas autoriser des fiches de même couleur Ctrl+Alt+C Ctrl+Alt+C Ctrl+Shift+P Ctrl+Shift+P &Resume Game &Redémarrer le jeu Human vs. Computer Humain contre Ordinateur Game Number Numéro de partie Paused En pause &Copy Game Number &Copier le numéro de partie ColorCode ColorCode GameNoDisplay Human vs. Computer Humain contre Ordinateur Game Number Numéro de partie GameTablesDialog ColorCode Games Jeux ColorCode Game Properties Propriétés de la partie User Utilisateur Color Count Nombre de couleurs Slot Count Nombre de fiches Pegs of Same Color Fiches de même couleur Yes Oui Game Number Numéro de partie Date and Time Date et heure Duration Durée Insert Game Number Insérer un numéro de partie Play Jouer Recent Games Parties récentes Bookmarks Signets Highscores Meilleurs scores Clear List Effacer liste Close Fermer No Non Message Message This will permanently remove all entries from the List. Do You want to proceed? Ceci effacera définitivement tous les éléments de la liste. Voulez-vous continuer ? Game Number Input Entrée numéro de partie Bookmarked Games Jeux marqués avec un signet High Score List Liste des meilleurs scores Please provide a name! Otherwise your score won't be saved. Merci de donner un nom! Votre score ne serait pas enregistré. Insert an arbitrary game number greater than 0 in the input field above. <br><br>The game properties like color count, slot count etc. will be displayed in the corresponding area above.<br><br>Click the Play button or press key Enter, to play the game. If a game is currently running, it will be aborted. Insérer un numéro de partie arbitraire supérieur à 0 dans le champ ci-dessus.<br><br>Les propriétés de la partie, comme le nombre de couleurs, le nombre de fiches, etc. seront affichées dans la zone correspondante ci-dessus.<br><br>Cliquer sur le bouton Jouer ou presser la touche Entrée pour commencer une partie. Si une partie est en cours, elle sera arrêtée. Game Lists Parties GamesListModel Yes Oui No Non Pegs of Same Color Fiches de même couleur Actions Actions Rank Classement User Utilisateur Score Score Date Date Time Heure Colors Couleurs Slots Trous Game No. Partie No. PrefDialog ... Select from predefined level settings ... Sélectionner à partir des préférences de niveau Beginner (2 Colors, 2 Slots, Doubles) Débutant (2 couleurs, 2 trous, doubles) Easy (4 Colors, 3 Slots, No Doubles) Facile (4 couleurs, 3 trous, pas de doubles) Classic (6 Colors, 4 Slots, Doubles) Classique (6 couleurs, 4 trous, doubles) Challenging (8 Colors, 4 Slots, Doubles) Évolué (8 couleurs, 4 trous, doubles) Hard (10 Colors, 5 Slots, Doubles) Difficile (10 couleurs, 5 trous, doubles) Slots Trous Colors Couleurs Human vs. Computer Humain contre Ordinateur Computer vs. Human Ordinateur contre Humain Low Bas Medium Moyen High Élevé Preferences Préférences Appearance Apparence Controls Contrôles Show or hide the Menubar. Afficher ou cacher la barre de menu. Show Menubar Afficher la barre de menu Show or hide the Toolbar. Afficher ou cacher la barre d'outils. Show Toolbar Afficher la barre d'outils Show or hide the Statusbar. Afficher ou cacher la barre d'état. Show Statusbar Afficher la barre d'état Indicators Indicateurs de fiche If this option is checked, an indicator inside each peg is displayed. Si cette option est cochée, un indicateur est affiché à l'intérieur de chaque fiche. Show Indicators inside pegs Montrer les indicateurs sur les fiches Use unique letters as indicators. Utiliser des lettres uniques comme indicateurs. Letter Indicators Lettres indicateur Use unique numbers as indicators. Utiliser des chiffres uniques comme indicateurs. Number Indicators Chiffres indicateur Use the same neutral background color for each peg, when indicators are shown. Utiliser la même couleur de fond neutre pour chaque fiche, quand les indicateurs sont affichés. Hide Colors Cacher les couleurs Click here if you have changed the color order and now you want to revert it to it's initial state. Cliquer ici si vous avez changé l'ordre des couleurs et que vous voulez revenir à son état initial. Reset Color Order Réinitialiser l'ordre des couleurs Game Settings Préférences de jeu Level Presets Niveaux prédéfinis Select from predefined combinations of the three different level related settings, the number of colors, the number of slots (columns) and the possibility of pegs of the same color in one row. Sélectionner un niveau à partir de niveaux prédéfinis. Number of Slots Nombre de trous Number of Colors Nombre de couleurs Number of pegs in a single row. Higher values are harder to guess. Nombre de fiches sur une rangée. Plus le nombre est élevé, plus la combinaison est difficile à deviner. Number of all possible colors. Higher values are harder to guess. Nombre de couleurs autorisées. Plus le nombre est élevé, plus la combinaison est difficile à deviner. If this option is checked, the hidden combination may contain one or more (even all would be possible) pegs of the same color. If checked, the combination is generally harder to guess. Si cette option est cochée, la combinaison cachée peut contenir une ou plusieurs (ou toutes) fiches de même couleur. Dans ce cas, la combinaison est généralement plus difficile à deviner. Allow Pegs of Same Color Autoriser plusieurs fiches de même couleur Game Mode Mode de jeu Select from the different game modes. In the 1. mode you have to to guess the hidden, computer generated combination, In the 2. mode your computer will try to guess your own secret combination. Sélectionner un mode de jeu parmi ceux disponibles. Dans le mode 1 il vous faut deviner la combinaison cachée, telle que choisie par l'ordinateur. Dans mode 2, l'ordinateur doit deviner la combinaison telle que vous l'aurez choisie vous-même. If checked, a row is closed as soon as you place the last peg and your guess is submitted immediatly. This option only affects the Human vs. Computer game mode. Si cette opions est cochée, votre essai est immédiatement évalué dès que la dernière fiche est placée dans son trou. Close Rows when the last Peg is placed Finaliser la rangée quand la dernière fiche est placée If checked, the computer will determine the corresponding hints for the solver's guess. This option affects only Computer vs. Human games. If checked, you only have to place your secret combination. Then the rest of the game runs automatically until the end. But you can set a delay between the guesses. Si cette option est cochée, l'ordinateur déterminera les indices pour l'essai. Cette option affecte uniquement les parties Ordinateur contre Humain. Si cette option est cochée, il vous faut uniquement définir une combinaison secrète. Ensuite, la partie se déroule automatiquement jusques à la fin. Vous pouvez régler un délai entre les essais, cependant. Set Hints automatically Afficher les indices automatiquement Adjust the delay (in ms) between two guesses. Régler le délai (en millisecondes) entre deux essais. Delay in ms Délai en millisecondes Solver Strength Force du résolveur Select from 3 different strength levels for your computer opponent. This option only affects the Computer vs. Human game mode. For the computer's guess in the Human vs. Computer mode always the highest level will be used. Sélectionner la force de votre adversaire parmi trois niveaux prédéfinis. Show Game Timer Afficher le minuteur de partie Display Game Number Afficher le numéro de partie Game Lists Parties Maximum Row Count: Nombre maximum de rangées : Use Highscores Utiliser les meilleurs scores Raise the dialog after a game has been won and prompt for the name Afficher la boîte de dialogue quand une partie est gagnée et demander le nom Automatically insert Highscores using the name below Insérer automatiquement les meilleurs scores en utilisant le nom ci-dessous Name (mandatory for the second option) Nom (obligatoire pour la deuxième option) User Interface Interface utilisateur Display the current game number in the footer. To avoid remembering, you can hide it here. Afficher le numéro de cette partie dans en bas de fenêtre. Pour éviter de vous en souvenir, cachez-le ici. Timer MInuteur You may hide the timer to keep calm ;-) But note! Even hidden, time's running in the background. Cachez-donc le minuteur pour garder votre sang-froid ;-) Attention ! Même caché, le minuteur tourne en arrière-plan. Game Properties Propriétés de la partie Select One of the Level Presets: Choisir l'un des niveaux disponibles: Or Set the Particular Properties: Ou régler les propriétés: Game Flow Flux de jeu Solver Résolveur Limit the number of rows in game tables like highscores etc. Valid values range from 5 to 50. Limiter le nombre de lignes dans les tableaux, comme les meilleurs scores, etc. Valeurs autorisées comprises entres 5 et 50. Use Customized Table Row Highlight Colors Utiliser des couleurs personnalisées pour les lignes du tableau Foreground Avant-plan Background Arrière-plan Highscores Meilleurs scores Provide a name with maximum 20 characters here to be used for highscore entries. If you checked the automatic option above, this name is mandatory, otherwise it will be used as proposal which you may change later in the dialog. Donner un nom de 20 caractères au plus pour identifier les valeurs des meilleurs scores. Si l'option automatique ci-dessus est cochée, ce nom est obligatoire, sinon il sera employé comme proposition qu'il sera possible de modifier plus loin dans cette boîte de dialogue. Uncheck this if you are confused about the time as fast running ;-) Décocher cette case si vous êtes gêné par le temps qui court ;-) Show Tenth and Hundredth Montrer les dizièmes et les centièmes RowHint Commit Your solution Envoyer votre solution Click the circles to rate my guess. Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-) Cliquer les cercles pour évaluer mon essai. Pressez Ctrl+H ou le bouton de barre d'outils pour que je le fasse à votre place de la manière la plus impartiales possible ;-) ColorCode-0.8.5/trans_es.ts0000644000175000017500000011066512610773251014244 0ustar dirkdirk UTF-8 About &Author &Autor icon icono &License &Licencia A needful game to train your brain ;-) Un juego necesario para entrenar tu cerebro ;-) ColorCode ColorCode About ColorCode Acerca de ColorCode <br><br>Free MasterMind clone including a built in,<br>rather intelligent solver. <br><br>Clon libre de Free MasterMind con un <br>solucionador bastante inteligente. Version Versión Author Autor 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. Este programa es software libre; lo puedes distribuir y/o modificar bajo los términos de la Licencia general pública (GPL) tal y como la publica la Free Software Foundation; ya la bien la versión 3 de la licencia, o (si se desea) cualquier versión posterior. ButtonsCell Play this Game again Save this Game as Bookmark Remove from List Copy Game Number to Clipboard ColorCode New Game Nuevo juego Do you want to give in and start a new Game? ¿Quieres rendirte y comenzar un nuevo juego? About Qt Acerca de Qt &New Game &Nuevo juego Ctrl+N Ctrl+N &Restart Game &Reiniciar el juego Ctrl+R Ctrl+R E&xit &Salir Ctrl+Q Ctrl+Q Ctrl+T Ctrl+T Ctrl+C Ctrl+C Ctrl+A Ctrl+A About &Qt Acerca de &Qt &Game &Juego &Settings &Condiguración &Help &Ayuda Game Juego Message Mensaje The changed settings will only apply to new games! Do you want to give in the current and start a new Game? ¡Los cambies en la configuración solo tendrán efecto en las nuevas partidas! ¿Quieres abandonar la actual y comenzar una nueva partida? Place Your pegs ... Coloca las fichas ... Congratulation! You have won! ¡Felicidades! ¡Has ganado! Sorry! You lost! ¡Lo siento! ¡Has perdido! Ctrl+I Ctrl+I Give In Rendirse Do you really want to give in? ¿Realmente quieres darte por vencido? &Throw In The Towel &Tirar la toalla Ctrl+G Ctrl+G Sure, You're too weak for me! Claro, ¡Eres demasiado débil para mi! Ctrl+Shift+R Ctrl+Shift+R Ctrl+Shift+C Ctrl+Shift+C Fill Row by Random Rellenar una fila de forma aleatoria Duplicate Previous Row Duplicar fila anterior Ctrl+D Ctrl+D Clear Row Despejar fila &Row &Fila ColorCode ColorCode About &ColorCode Acerca de &ColorCode Ctrl+M Ctrl+M Show Toolbar Mostrar barra de herramientas Show Menubar Mostrar barra de menus Show Statusbar Mostrar barra de estado Allow Pegs of the Same Color Permitir fichas del mismo color Level Nivel Computer's Guess Conjetura del ordenador Ctrl+H Ctrl+H Press the Hint Field or Key Enter if You're done. Pulsa el campo pista o la tecla enter si has terminado. Disallow Pegs of the Same Color No permitir fichas del mismo color Close Rows when the last Peg is placed Cerrar filas cuando se coloque la última ficha Ctrl+L Ctrl+L Beginner (2 Colors, 2 Slots, Doubles) Prinicipiante (2 Colores, 2 Ranuras, Dobles) Easy (4 Colors, 3 Slots, No Doubles) Fácil (4 Colores, 2 Ranuras, Dobles) Classic (6 Colors, 4 Slots, Doubles) Clásico (6 Colores, 4 Ranuras, Dobles) Challenging (8 Colors, 4 Slots, Doubles) Desafiante (8 Colores, 4 Ranuras, Dobles) Hard (10 Colors, 5 Slots, Doubles) Difícil (10 Colores, 5 Ranuras, Dobles) Level Presets Valores prefijados del nivel Colors Colores Pegs of Same Color Fichas del mismo color Slots Ranuras Yes Sí No No Reset Color Order Resetear el orden de los colores Ctrl+Shift+L Ctrl+Shift+L Online &Help &Ayuda en línea F1 F1 Done Hecho Ctrl+Shift+N Ctrl+Shift+N Rate it for me Puntúalo por mi Human vs Computer Humano vs Ordenador Computer vs Human Ordenador vs Humano Game Mode Modo de juego Press the button below or Key Enter if You're done. Pulsa el botón a continuación o la tecla enter si has terminado. Place Your secret ColorCode ... Introduce tu código de colores secreto ... Please rate the guess. Press OK or Key Enter if You're done. Por favor, puntúe la conjetura. Pular Ok o la tecla enter una vez listo. The impossible happened, sorry. Lo imposible ha sucedido, lo siento. Yeah! I guessed it, man! ¡Sii! ¡Lo adiviné! Embarrassing! I lost a game! ¡Embarazoso! ¡He perdido un juego! Nope! Thats impossible! Did you gave me false hints? ¡No! ¡Es imposible! ¿Me has dado indicaciones falsas? Don't you like to see me winning? ;-) ¿No quieres verme ganar? ;-) Set Hints automatically Mostar pistas automáticamente Ctrl+Shift+H Ctrl+Shift+H Preferences Preferencias Ctrl+P Ctrl+P Show Indicators Mostrar indicadores The chosen settings do not allow pegs of the same color! ¡La configuración elegida no permite fichas del mismo color! &Start particular Game Ctrl+B &Highscores Ctrl+Alt+H &Recent Games Ctrl+Alt+R &Bookmarks Ctrl+Alt+B Ctrl+Shift+S Game &Lists guessed and rated ... Let me think ... Computer vs. Human Ordenador vs Humano Ctrl+Shift+B Ctrl+Alt+N &Have a Break &Bookmark Current Game Ctrl+Shift+T Show Timer Display Game Number Allow Pegs of Same Color Permitir fichas del mismo color Disallow Pegs of Same Color Ctrl+Alt+C Ctrl+Shift+P &Resume Game Human vs. Computer Humano vs Ordenador Game Number Paused &Copy Game Number GameNoDisplay Human vs. Computer Humano vs Ordenador GameTablesDialog ColorCode Games Game Properties User Color Count Slot Count Pegs of Same Color Fichas del mismo color Game Number Date and Time Duration Insert Game Number Play Recent Games Bookmarks Highscores Clear List Close Insert an arbitrary game number greater than 0 in the input field above. <br><br>The game properties like color count, slot count etc. will be displayed in the corresponding area above.<br><br>Click the Play button or press key Enter, to play the game. If a game is currently running, it will be aborted. Yes Sí No No Message Mensaje This will permanently remove all entries from the List. Do You want to proceed? Game Number Input Bookmarked Games High Score List Please provide a name! Otherwise your score won't be saved. Game Lists GamesListModel Yes Sí No No Pegs of Same Color Fichas del mismo color Actions Rank User Score Date Time Colors Colores Slots Ranuras Game No. PrefDialog ... Select from predefined level settings ... Seleccionar de las configuraciones de niveles predefinidas Beginner (2 Colors, 2 Slots, Doubles) Prinicipiante (2 Colores, 2 Ranuras, Dobles) Easy (4 Colors, 3 Slots, No Doubles) Fácil (4 Colores, 2 Ranuras, Dobles) Classic (6 Colors, 4 Slots, Doubles) Clásico (6 Colores, 4 Ranuras, Dobles) Challenging (8 Colors, 4 Slots, Doubles) Desafiante (8 Colores, 4 Ranuras, Dobles) Hard (10 Colors, 5 Slots, Doubles) Difícil (10 Colores, 5 Ranuras, Dobles) Slots Ranuras Colors Colores Human vs. Computer Humano vs Ordenador Computer vs. Human Ordenador vs Humano Low Bajo Medium Medio High Alto Preferences Preferencias Appearance Apariencia Controls Controles Show or hide the Menubar. Mostrar o ocultar la barra de menus. Show Menubar Mostrar barra de menus Show or hide the Toolbar. Mostrar o ocultar la barra de herramientas. Show Toolbar Mostrar barra de herramientas Show or hide the Statusbar. Mostrar o ocultar la barra de estado. Show Statusbar Mostrar barra de estado Indicators Indicadores If this option is checked, an indicator inside each peg is displayed. Si esta opción esta marcada, se muestra un indicador dentro de cada ficha. Show Indicators inside pegs Mostrar indicadores dentro de las fichas Use unique letters as indicators. Usar letras únicas como indicadores. Letter Indicators Indicadores de letra Use unique numbers as indicators. Usar números únicos como indicadores. Number Indicators Número de indicadores Use the same neutral background color for each peg, when indicators are shown. Usar el mismo fondo neutro por cada ficha, cuando se muestran los indicadores. Hide Colors Ocultar colores Click here if you have changed the color order and now you want to revert it to it's initial state. Haz click aquí si has cambiado el orden de los colores y ahora quieres volver al estado inicial. Reset Color Order Restablecer orden de colores Game Settings Configuración del juego Level Presets Valores prefijados del nivel Select from predefined combinations of the three different level related settings, the number of colors, the number of slots (columns) and the possibility of pegs of the same color in one row. Seleccionar de entra las combinaciones predefinidas de tres niveles de configuraciones relativas al nivel, el número de colores, el número de ranuras (columnas) y la posibilidad de fichas del mismo color en una fila. Number of Slots Número de ranuras Number of Colors Número de colores Number of pegs in a single row. Higher values are harder to guess. Número de fichas en una única línea. Los valores más altos son más difíciles de averiguar. Number of all possible colors. Higher values are harder to guess. Número de colores posible. Los valores más altos son más difíciles de averiguar. If this option is checked, the hidden combination may contain one or more (even all would be possible) pegs of the same color. If checked, the combination is generally harder to guess. Si esta opción esta seleccionada, la combinación oculta puede contener una o más (incluso todas sería posible) fichas del mismo color. Si se marca, la combinación suele ser más difícil de adivinar. Allow Pegs of Same Color Permitir fichas del mismo color Game Mode Modo de juego Select from the different game modes. In the 1. mode you have to to guess the hidden, computer generated combination, In the 2. mode your computer will try to guess your own secret combination. Seleccionar de entre los distintos tipos de partidas. En el modo 1 tienes que adivinar la combinación oculta, generada por el ordenador, en el modo 2 tu ordenador intentará adivinar tu propia combinación secreta. If checked, a row is closed as soon as you place the last peg and your guess is submitted immediatly. This option only affects the Human vs. Computer game mode. Si se marca, una fila se cierra tan pronto como pongas la última ficha y tu conjetura se envía inmediatamente. Esta opción solo afecta a las partidas en modo Humano vs. Ordenador. Close Rows when the last Peg is placed Cerrar filas cuando se coloque la última ficha If checked, the computer will determine the corresponding hints for the solver's guess. This option affects only Computer vs. Human games. If checked, you only have to place your secret combination. Then the rest of the game runs automatically until the end. But you can set a delay between the guesses. Si se marca, el ordenador determinará las correspondientes pistas para la conjetura del solucionador. Esta opción afecta sólo a las aprtidas Ordenador vs. Humano. Si se marca, sólo tienes que fijar la combinación secreta. Entonces el resto del juego se ejecuta automáticamente hasta el final. Pero puedes fijar el retraso entre las conjeturas. Set Hints automatically Mostrar pistas automáticamente Adjust the delay (in ms) between two guesses. Ajustar el retraso (en ms) entre dos conjeturas. Delay in ms Retraso en ms Solver Strength Habilidad del resolvedor Select from 3 different strength levels for your computer opponent. This option only affects the Computer vs. Human game mode. For the computer's guess in the Human vs. Computer mode always the highest level will be used. Seleccionar de entre 3 niveles distintos de dificultar para el ordendor contrincante. Esta opción solo afecta al modo de juego Ordenador vs. Humano. Para la conjetura del ordenador en el modo Humano vs Ordenador siempre se utiliza el nivel máximo. Show Game Timer Display Game Number Game Lists Maximum Row Count: Use Highscores Raise the dialog after a game has been won and prompt for the name Automatically insert Highscores using the name below Name (mandatory for the second option) User Interface Display the current game number in the footer. To avoid remembering, you can hide it here. Timer You may hide the timer to keep calm ;-) But note! Even hidden, time's running in the background. Game Properties Select One of the Level Presets: Or Set the Particular Properties: Game Flow Solver Limit the number of rows in game tables like highscores etc. Valid values range from 5 to 50. Use Customized Table Row Highlight Colors Foreground Background Highscores Provide a name with maximum 20 characters here to be used for highscore entries. If you checked the automatic option above, this name is mandatory, otherwise it will be used as proposal which you may change later in the dialog. Uncheck this if you are confused about the time as fast running ;-) Show Tenth and Hundredth RowHint Commit Your solution Enviar tu solución Click the circles to rate my guess. Hit Ctrl+H or the corresponding toolbar button to let an impartial part of me do this for you ;-) Haz click en los círculos para puntuar mi resultado. Pulsa Ctrl+H o el botón correspondiente de la barra de tareas para dejar a una parte imparcial de mi hacerlo ;-) ColorCode-0.8.5/settings.h0000644000175000017500000000553112610773251014062 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef SETTINGS_H #define SETTINGS_H #include #include #include "ccgame.h" class Settings : public QObject { Q_OBJECT public: Settings(); ~Settings(); static const int INDICATOR_LETTER; static const int INDICATOR_NUMBER; static const int DEF_COLOR_CNT; static const int DEF_PEG_CNT; static const int DEF_DOUBLES; static const int DEF_LIST_MAX_CNT; static const int HIGHSCORE_NO; static const int HIGHSCORE_PROMPT; static const int HIGHSCORE_AUTO; static const int MAX_LENGTH_USERNAME; void Init(); void InitSettings(); void ReadSettings(); void Validate(); void SaveLastSettings(); void RestoreLastSettings(); void RestoreDefSettings(); void WriteSettings(); QMap GetDefaultsMap() const; CCGame* GetCurSettingsGame() const; QString GetActiveRowHFg() const; QString GetActiveRowHBg() const; QSettings mSettings; bool mShowToolBar; bool mShowMenuBar; bool mShowStatusBar; bool mShowTimer; bool mShowTenth; bool mShowGameNo; bool mShowIndicators; int mIndicatorType; bool mHideColors; bool mCustomRowHColor; QString mRowHColorFg; QString mRowHColorBg; int mPegCnt; int mColorCnt; bool mDoubles; int mGameMode; bool mAutoClose; bool mAutoHints; int mSolverStrength; int mHintsDelay; QString mPrevGamesStr; QString mSavedGamesStr; QString mHighGamesStr; int mGamesListMaxCnt; int mHighScoreHandling; QString mHighScoreUserName; public slots: signals: void ReadSettingsGamesDone(); private: void RestoreSettingsMap(QMap &map); void SaveSettingsMap(QMap &map); QMap mDefMap; QMap mLastMap; }; Settings* GetSettings(); #endif // SETTINGS_H ColorCode-0.8.5/graphicsbtn.h0000644000175000017500000000426212610773251014526 0ustar dirkdirk/* ColorCode, a free MasterMind clone with built in solver * Copyright (C) 2009 Dirk Laebisch * http://www.laebisch.com/ * * ColorCode 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. * * ColorCode 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 ColorCode. If not, see . */ #ifndef GRAPHICSBTN_H #define GRAPHICSBTN_H #include #include #include #include #include #include #include class GraphicsBtn : public QObject, public QGraphicsItem { Q_OBJECT Q_INTERFACES(QGraphicsItem) public: GraphicsBtn(); void SetEnabled(bool b); void SetWidth(int w); void SetLabel(QString str); void ShowBtn(bool b); void SetStatesOpacity(const qreal opOver, const qreal opOut); void InvertStates(); void SetHoverState(); void SetOutState(); void SetPressedState(); void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); QRectF boundingRect() const; signals: void BtnPressSignal(GraphicsBtn* btn); protected: void hoverEnterEvent(QGraphicsSceneHoverEvent* e); void hoverLeaveEvent(QGraphicsSceneHoverEvent* e); void mousePressEvent(QGraphicsSceneMouseEvent* e); void mouseReleaseEvent(QGraphicsSceneMouseEvent* e); virtual void InitGraphics(); virtual void SetShapes(); QString mLabel; int mWidth; int mLabelWidth; int mYOffs; qreal mOpOver; qreal mOpOut; QRectF mRect; QRectF mRectFill; QRectF mIconRect; QBrush mFillOutBrush; QBrush mFillOverBrush; QBrush* mFillBrush; QBrush mFrameOutBrush; QBrush mFrameOverBrush; QBrush* mFrameBrush; QFont mFont; }; #endif // GRAPHICSBTN_H