commit 2b6d39f9d5b75f466fb9fe6f2957e3d006602f83 Author: doitux Date: Sat Jan 13 02:40:33 2007 +0000 import local repo diff --git a/ChangeLog b/ChangeLog new file mode 100755 index 00000000..50cd5577 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,28 @@ +2006-10-16 version 0.3: + +- change: some changes on game-speed and game-rhythm. game-speed delay near 0 is possible ;) +- change: gui-language changed from german to english +- change: some ai-engine changes +- change: now POT-distribution works better (especially for multible All-In situation and split-pot) +- change: switched to Qt-4.2 +- change: some GUI-changes (e.g. killed the "Next Round"-Button --> task #131930) +- bugfix: #1572742 - "bet-loop" +- tasks: new published tasks #131988, #131980, #131987, #131978, #131992, #132018 + + +2006-10-04 version 0.2.1: + +- bugfix: fix the Bug that causes freeze average all 52 rounds. It was a problem with random-number-generation + + +2006-10-04 version 0.2: + +- first public release +- feature: now you can play preflop, flop, turn and river +- change: its nearly complete portet to qt4 + + +2006-05-18 version 0.1: + +- first release +- feature: you can play preflop and river \ No newline at end of file diff --git a/Doxyfile b/Doxyfile new file mode 100755 index 00000000..6b56b24d --- /dev/null +++ b/Doxyfile @@ -0,0 +1,275 @@ +# Doxyfile 1.4.1-KDevelop + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = pokerth.kdevelop +PROJECT_NUMBER = 0.1 +OUTPUT_DIRECTORY = +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = /home/doitux/Projekte/qt-c++/qupil/0.3.2/ +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +SUBGROUPING = YES +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = YES +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = /home/doitux/Projekte/qt-c++/pokerth/pokerth +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.C \ + *.CC \ + *.C++ \ + *.II \ + *.I++ \ + *.H \ + *.HH \ + *.H++ \ + *.CS \ + *.PHP \ + *.PHP3 \ + *.M \ + *.MM \ + *.C \ + *.H \ + *.tlh \ + *.diff \ + *.patch \ + *.moc \ + *.xpm \ + *.dox +RECURSIVE = yes +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = yes +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = pokerth.tag +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/copying b/copying new file mode 100755 index 00000000..5b6e7c66 --- /dev/null +++ b/copying @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) 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 +this service 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 make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. 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. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the 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 a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE 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. + + 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 +convey 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 2 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, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision 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, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This 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 Library General +Public License instead of this License. diff --git a/pokerth.kdevelop b/pokerth.kdevelop new file mode 100755 index 00000000..69090703 --- /dev/null +++ b/pokerth.kdevelop @@ -0,0 +1,183 @@ + + + + FThauer FHammer + f.thauer@web.de + 0.1 + KDevTrollProject + C++ + + Qt + + + . + false + + + + + + + + + + false + false + + + *.o,*.lo,CVS + false + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + w3c-dom-level2-html + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + kde2book + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + ruby + ruby_bugs + sdl + stl + w3c-svg + sw + w3c-uaag10 + wxwidgets_bugs + + + KDE Libraries (Doxygen) + + + + + + + + + + + true + false + false + + + false + true + 10 + + + + + bin/pokerth + + executable + / + false + true + + + + + + + true + false + 1 + false + + 0 + + + + + + + + + + + + + + + + + + Doxygen-Dokumentation + pokerth.tag + + + + + pokerth + pokerth + Pokerth + POKERTH + FThauer FHammer + f.thauer@web.de + GPL + COPYING + 0.1 + 2006 + /home/doitux/Projekte/qt-c++/pokerth/pokerth + + + + + true + true + true + false + true + true + true + 250 + 400 + 250 + + + true + 4 + /usr/qt/static/4.2.2 + + + + set + m_,_ + theValue + true + true + + + + + + + + + + .h + .cpp + + + diff --git a/pokerth.kdevelop.pcs b/pokerth.kdevelop.pcs new file mode 100755 index 00000000..1bb31af1 Binary files /dev/null and b/pokerth.kdevelop.pcs differ diff --git a/pokerth.kdevses b/pokerth.kdevses new file mode 100755 index 00000000..35cac897 --- /dev/null +++ b/pokerth.kdevses @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pokerth.pro b/pokerth.pro new file mode 100755 index 00000000..0120a86c --- /dev/null +++ b/pokerth.pro @@ -0,0 +1,72 @@ +# Diese Datei wurde mit dem qmake-Manager von KDevelop erstellt. +# ------------------------------------------- +# Unterordner relativ zum Projektordner: . +# Das Target ist eine Anwendung: bin/pokerth + +INSTALLS += TARGET +TARGET.files += bin/* +TARGET.path = /usr/bin/ +FORMS += mainwindow.ui \ + aboutpokerth.ui \ + newgamedialog.ui +HEADERS += mainwindowimpl.h \ + newgamedialogimpl.h \ + aboutpokerthimpl.h \ + log.h \ + guiinterface.h \ + guiwrapper.h \ + session.h \ + game.h \ + localhand.h \ + localboard.h \ + localplayer.h \ + cardsvalue.h \ + localpreflop.h \ + localflop.h \ + localturn.h \ + localriver.h \ + tools.h \ + handinterface.h \ + playerinterface.h \ + boardinterface.h \ + preflopinterface.h \ + flopinterface.h \ + turninterface.h \ + riverinterface.h + +SOURCES += pokerth.cpp \ + mainwindowimpl.cpp \ + newgamedialogimpl.cpp \ + aboutpokerthimpl.cpp \ + log.cpp \ + guiinterface.cpp \ + guiwrapper.cpp \ + session.cpp \ + game.cpp \ + localhand.cpp \ + localboard.cpp \ + localplayer.cpp \ + cardsvalue.cpp \ + localpreflop.cpp \ + localflop.cpp \ + localturn.cpp \ + localriver.cpp \ + tools.cpp \ + handinterface.cpp \ + playerinterface.cpp \ + boardinterface.cpp \ + preflopinterface.cpp \ + flopinterface.cpp \ + turninterface.cpp \ + riverinterface.cpp + +RESOURCES = deck.qrc +TEMPLATE = app +DEPENDPATH += src uics src/gui src/engine_interfaces src/local_engine src/network_engine +INCLUDEPATH += . src uics src/gui src/engine_interfaces src/local_engine src/network_engine +CONFIG += qt release +UI_DIR = uics +TARGET = bin/pokerth +MOC_DIR = mocs +OBJECTS_DIR = obj +QT += qt3support diff --git a/src/cards/1px.png b/src/cards/1px.png new file mode 100755 index 00000000..cd956f4e Binary files /dev/null and b/src/cards/1px.png differ diff --git a/src/cards/logo1-140x100_neu.png b/src/cards/logo1-140x100_neu.png new file mode 100644 index 00000000..c0439f45 Binary files /dev/null and b/src/cards/logo1-140x100_neu.png differ diff --git a/src/cards/mycards/0.png b/src/cards/mycards/0.png new file mode 100755 index 00000000..a9783f50 Binary files /dev/null and b/src/cards/mycards/0.png differ diff --git a/src/cards/mycards/1.png b/src/cards/mycards/1.png new file mode 100755 index 00000000..67eeaae2 Binary files /dev/null and b/src/cards/mycards/1.png differ diff --git a/src/cards/mycards/10.png b/src/cards/mycards/10.png new file mode 100755 index 00000000..c8a172c8 Binary files /dev/null and b/src/cards/mycards/10.png differ diff --git a/src/cards/mycards/11.png b/src/cards/mycards/11.png new file mode 100755 index 00000000..3025a397 Binary files /dev/null and b/src/cards/mycards/11.png differ diff --git a/src/cards/mycards/12.png b/src/cards/mycards/12.png new file mode 100755 index 00000000..061c5474 Binary files /dev/null and b/src/cards/mycards/12.png differ diff --git a/src/cards/mycards/13.png b/src/cards/mycards/13.png new file mode 100755 index 00000000..daf43056 Binary files /dev/null and b/src/cards/mycards/13.png differ diff --git a/src/cards/mycards/14.png b/src/cards/mycards/14.png new file mode 100755 index 00000000..bf75cc38 Binary files /dev/null and b/src/cards/mycards/14.png differ diff --git a/src/cards/mycards/15.png b/src/cards/mycards/15.png new file mode 100755 index 00000000..987f6266 Binary files /dev/null and b/src/cards/mycards/15.png differ diff --git a/src/cards/mycards/16.png b/src/cards/mycards/16.png new file mode 100755 index 00000000..54091ca2 Binary files /dev/null and b/src/cards/mycards/16.png differ diff --git a/src/cards/mycards/17.png b/src/cards/mycards/17.png new file mode 100755 index 00000000..287772ed Binary files /dev/null and b/src/cards/mycards/17.png differ diff --git a/src/cards/mycards/18.png b/src/cards/mycards/18.png new file mode 100755 index 00000000..2fe1c9da Binary files /dev/null and b/src/cards/mycards/18.png differ diff --git a/src/cards/mycards/19.png b/src/cards/mycards/19.png new file mode 100755 index 00000000..794ab965 Binary files /dev/null and b/src/cards/mycards/19.png differ diff --git a/src/cards/mycards/2.png b/src/cards/mycards/2.png new file mode 100755 index 00000000..fb4fc622 Binary files /dev/null and b/src/cards/mycards/2.png differ diff --git a/src/cards/mycards/20.png b/src/cards/mycards/20.png new file mode 100755 index 00000000..d7638527 Binary files /dev/null and b/src/cards/mycards/20.png differ diff --git a/src/cards/mycards/21.png b/src/cards/mycards/21.png new file mode 100755 index 00000000..f3427ab2 Binary files /dev/null and b/src/cards/mycards/21.png differ diff --git a/src/cards/mycards/22.png b/src/cards/mycards/22.png new file mode 100755 index 00000000..7177414d Binary files /dev/null and b/src/cards/mycards/22.png differ diff --git a/src/cards/mycards/23.png b/src/cards/mycards/23.png new file mode 100755 index 00000000..434ffc6d Binary files /dev/null and b/src/cards/mycards/23.png differ diff --git a/src/cards/mycards/24.png b/src/cards/mycards/24.png new file mode 100755 index 00000000..17d6b740 Binary files /dev/null and b/src/cards/mycards/24.png differ diff --git a/src/cards/mycards/25.png b/src/cards/mycards/25.png new file mode 100755 index 00000000..064ab4dc Binary files /dev/null and b/src/cards/mycards/25.png differ diff --git a/src/cards/mycards/26.png b/src/cards/mycards/26.png new file mode 100755 index 00000000..b83fb9ad Binary files /dev/null and b/src/cards/mycards/26.png differ diff --git a/src/cards/mycards/27.png b/src/cards/mycards/27.png new file mode 100755 index 00000000..bfc0b7af Binary files /dev/null and b/src/cards/mycards/27.png differ diff --git a/src/cards/mycards/28.png b/src/cards/mycards/28.png new file mode 100755 index 00000000..38a7ba62 Binary files /dev/null and b/src/cards/mycards/28.png differ diff --git a/src/cards/mycards/29.png b/src/cards/mycards/29.png new file mode 100755 index 00000000..384cebf7 Binary files /dev/null and b/src/cards/mycards/29.png differ diff --git a/src/cards/mycards/3.png b/src/cards/mycards/3.png new file mode 100755 index 00000000..3d7d5e26 Binary files /dev/null and b/src/cards/mycards/3.png differ diff --git a/src/cards/mycards/30.png b/src/cards/mycards/30.png new file mode 100755 index 00000000..a9f76902 Binary files /dev/null and b/src/cards/mycards/30.png differ diff --git a/src/cards/mycards/31.png b/src/cards/mycards/31.png new file mode 100755 index 00000000..61e710ee Binary files /dev/null and b/src/cards/mycards/31.png differ diff --git a/src/cards/mycards/32.png b/src/cards/mycards/32.png new file mode 100755 index 00000000..0b580d22 Binary files /dev/null and b/src/cards/mycards/32.png differ diff --git a/src/cards/mycards/33.png b/src/cards/mycards/33.png new file mode 100755 index 00000000..bd83cd69 Binary files /dev/null and b/src/cards/mycards/33.png differ diff --git a/src/cards/mycards/34.png b/src/cards/mycards/34.png new file mode 100755 index 00000000..7b41e331 Binary files /dev/null and b/src/cards/mycards/34.png differ diff --git a/src/cards/mycards/35.png b/src/cards/mycards/35.png new file mode 100755 index 00000000..a79da129 Binary files /dev/null and b/src/cards/mycards/35.png differ diff --git a/src/cards/mycards/36.png b/src/cards/mycards/36.png new file mode 100755 index 00000000..11f18781 Binary files /dev/null and b/src/cards/mycards/36.png differ diff --git a/src/cards/mycards/37.png b/src/cards/mycards/37.png new file mode 100755 index 00000000..140a5730 Binary files /dev/null and b/src/cards/mycards/37.png differ diff --git a/src/cards/mycards/38.png b/src/cards/mycards/38.png new file mode 100755 index 00000000..acd42956 Binary files /dev/null and b/src/cards/mycards/38.png differ diff --git a/src/cards/mycards/39.png b/src/cards/mycards/39.png new file mode 100755 index 00000000..649aeb8f Binary files /dev/null and b/src/cards/mycards/39.png differ diff --git a/src/cards/mycards/4.png b/src/cards/mycards/4.png new file mode 100755 index 00000000..bbbcf56e Binary files /dev/null and b/src/cards/mycards/4.png differ diff --git a/src/cards/mycards/40.png b/src/cards/mycards/40.png new file mode 100755 index 00000000..a2bf0068 Binary files /dev/null and b/src/cards/mycards/40.png differ diff --git a/src/cards/mycards/41.png b/src/cards/mycards/41.png new file mode 100755 index 00000000..33ae3c95 Binary files /dev/null and b/src/cards/mycards/41.png differ diff --git a/src/cards/mycards/42.png b/src/cards/mycards/42.png new file mode 100755 index 00000000..0eeb2eab Binary files /dev/null and b/src/cards/mycards/42.png differ diff --git a/src/cards/mycards/43.png b/src/cards/mycards/43.png new file mode 100755 index 00000000..acf4fafe Binary files /dev/null and b/src/cards/mycards/43.png differ diff --git a/src/cards/mycards/44.png b/src/cards/mycards/44.png new file mode 100755 index 00000000..087e20f1 Binary files /dev/null and b/src/cards/mycards/44.png differ diff --git a/src/cards/mycards/45.png b/src/cards/mycards/45.png new file mode 100755 index 00000000..4107d753 Binary files /dev/null and b/src/cards/mycards/45.png differ diff --git a/src/cards/mycards/46.png b/src/cards/mycards/46.png new file mode 100755 index 00000000..e94e6309 Binary files /dev/null and b/src/cards/mycards/46.png differ diff --git a/src/cards/mycards/47.png b/src/cards/mycards/47.png new file mode 100755 index 00000000..3aa2bf99 Binary files /dev/null and b/src/cards/mycards/47.png differ diff --git a/src/cards/mycards/48.png b/src/cards/mycards/48.png new file mode 100755 index 00000000..096d5fac Binary files /dev/null and b/src/cards/mycards/48.png differ diff --git a/src/cards/mycards/49.png b/src/cards/mycards/49.png new file mode 100755 index 00000000..dc0ebba9 Binary files /dev/null and b/src/cards/mycards/49.png differ diff --git a/src/cards/mycards/5.png b/src/cards/mycards/5.png new file mode 100755 index 00000000..4722e78d Binary files /dev/null and b/src/cards/mycards/5.png differ diff --git a/src/cards/mycards/50.png b/src/cards/mycards/50.png new file mode 100755 index 00000000..af97ab57 Binary files /dev/null and b/src/cards/mycards/50.png differ diff --git a/src/cards/mycards/51.png b/src/cards/mycards/51.png new file mode 100755 index 00000000..1e933a4f Binary files /dev/null and b/src/cards/mycards/51.png differ diff --git a/src/cards/mycards/6.png b/src/cards/mycards/6.png new file mode 100755 index 00000000..9a5c7086 Binary files /dev/null and b/src/cards/mycards/6.png differ diff --git a/src/cards/mycards/7.png b/src/cards/mycards/7.png new file mode 100755 index 00000000..374363e1 Binary files /dev/null and b/src/cards/mycards/7.png differ diff --git a/src/cards/mycards/8.png b/src/cards/mycards/8.png new file mode 100755 index 00000000..cc673c71 Binary files /dev/null and b/src/cards/mycards/8.png differ diff --git a/src/cards/mycards/9.png b/src/cards/mycards/9.png new file mode 100755 index 00000000..dcbd860f Binary files /dev/null and b/src/cards/mycards/9.png differ diff --git a/src/cards/mycards/flipside.png b/src/cards/mycards/flipside.png new file mode 100755 index 00000000..15c184f1 Binary files /dev/null and b/src/cards/mycards/flipside.png differ diff --git a/src/cards/othercards/0.png b/src/cards/othercards/0.png new file mode 100755 index 00000000..47142cb3 Binary files /dev/null and b/src/cards/othercards/0.png differ diff --git a/src/cards/othercards/1.png b/src/cards/othercards/1.png new file mode 100755 index 00000000..855c1f38 Binary files /dev/null and b/src/cards/othercards/1.png differ diff --git a/src/cards/othercards/10.png b/src/cards/othercards/10.png new file mode 100755 index 00000000..406a6f7e Binary files /dev/null and b/src/cards/othercards/10.png differ diff --git a/src/cards/othercards/11.png b/src/cards/othercards/11.png new file mode 100755 index 00000000..4fe42958 Binary files /dev/null and b/src/cards/othercards/11.png differ diff --git a/src/cards/othercards/12.png b/src/cards/othercards/12.png new file mode 100755 index 00000000..c903cfb5 Binary files /dev/null and b/src/cards/othercards/12.png differ diff --git a/src/cards/othercards/13.png b/src/cards/othercards/13.png new file mode 100755 index 00000000..b6ad7c9c Binary files /dev/null and b/src/cards/othercards/13.png differ diff --git a/src/cards/othercards/14.png b/src/cards/othercards/14.png new file mode 100755 index 00000000..801063e4 Binary files /dev/null and b/src/cards/othercards/14.png differ diff --git a/src/cards/othercards/15.png b/src/cards/othercards/15.png new file mode 100755 index 00000000..cf85a216 Binary files /dev/null and b/src/cards/othercards/15.png differ diff --git a/src/cards/othercards/16.png b/src/cards/othercards/16.png new file mode 100755 index 00000000..ea1ebce4 Binary files /dev/null and b/src/cards/othercards/16.png differ diff --git a/src/cards/othercards/17.png b/src/cards/othercards/17.png new file mode 100755 index 00000000..575d460e Binary files /dev/null and b/src/cards/othercards/17.png differ diff --git a/src/cards/othercards/18.png b/src/cards/othercards/18.png new file mode 100755 index 00000000..041ab1c1 Binary files /dev/null and b/src/cards/othercards/18.png differ diff --git a/src/cards/othercards/19.png b/src/cards/othercards/19.png new file mode 100755 index 00000000..07fbdb2e Binary files /dev/null and b/src/cards/othercards/19.png differ diff --git a/src/cards/othercards/2.png b/src/cards/othercards/2.png new file mode 100755 index 00000000..b2faee45 Binary files /dev/null and b/src/cards/othercards/2.png differ diff --git a/src/cards/othercards/20.png b/src/cards/othercards/20.png new file mode 100755 index 00000000..1f361369 Binary files /dev/null and b/src/cards/othercards/20.png differ diff --git a/src/cards/othercards/21.png b/src/cards/othercards/21.png new file mode 100755 index 00000000..b5d89db2 Binary files /dev/null and b/src/cards/othercards/21.png differ diff --git a/src/cards/othercards/22.png b/src/cards/othercards/22.png new file mode 100755 index 00000000..9380bb3b Binary files /dev/null and b/src/cards/othercards/22.png differ diff --git a/src/cards/othercards/23.png b/src/cards/othercards/23.png new file mode 100755 index 00000000..44496b59 Binary files /dev/null and b/src/cards/othercards/23.png differ diff --git a/src/cards/othercards/24.png b/src/cards/othercards/24.png new file mode 100755 index 00000000..5e8176fe Binary files /dev/null and b/src/cards/othercards/24.png differ diff --git a/src/cards/othercards/25.png b/src/cards/othercards/25.png new file mode 100755 index 00000000..c8f98187 Binary files /dev/null and b/src/cards/othercards/25.png differ diff --git a/src/cards/othercards/26.png b/src/cards/othercards/26.png new file mode 100755 index 00000000..9c8f18b3 Binary files /dev/null and b/src/cards/othercards/26.png differ diff --git a/src/cards/othercards/27.png b/src/cards/othercards/27.png new file mode 100755 index 00000000..caee7180 Binary files /dev/null and b/src/cards/othercards/27.png differ diff --git a/src/cards/othercards/28.png b/src/cards/othercards/28.png new file mode 100755 index 00000000..91368e5d Binary files /dev/null and b/src/cards/othercards/28.png differ diff --git a/src/cards/othercards/29.png b/src/cards/othercards/29.png new file mode 100755 index 00000000..28a4d4fb Binary files /dev/null and b/src/cards/othercards/29.png differ diff --git a/src/cards/othercards/3.png b/src/cards/othercards/3.png new file mode 100755 index 00000000..c856a87e Binary files /dev/null and b/src/cards/othercards/3.png differ diff --git a/src/cards/othercards/30.png b/src/cards/othercards/30.png new file mode 100755 index 00000000..54546205 Binary files /dev/null and b/src/cards/othercards/30.png differ diff --git a/src/cards/othercards/31.png b/src/cards/othercards/31.png new file mode 100755 index 00000000..df5e2d19 Binary files /dev/null and b/src/cards/othercards/31.png differ diff --git a/src/cards/othercards/32.png b/src/cards/othercards/32.png new file mode 100755 index 00000000..e1feb214 Binary files /dev/null and b/src/cards/othercards/32.png differ diff --git a/src/cards/othercards/33.png b/src/cards/othercards/33.png new file mode 100755 index 00000000..7174bd92 Binary files /dev/null and b/src/cards/othercards/33.png differ diff --git a/src/cards/othercards/34.png b/src/cards/othercards/34.png new file mode 100755 index 00000000..ee4fb6ba Binary files /dev/null and b/src/cards/othercards/34.png differ diff --git a/src/cards/othercards/35.png b/src/cards/othercards/35.png new file mode 100755 index 00000000..66d3acc2 Binary files /dev/null and b/src/cards/othercards/35.png differ diff --git a/src/cards/othercards/36.png b/src/cards/othercards/36.png new file mode 100755 index 00000000..4bd3bd12 Binary files /dev/null and b/src/cards/othercards/36.png differ diff --git a/src/cards/othercards/37.png b/src/cards/othercards/37.png new file mode 100755 index 00000000..cc48cece Binary files /dev/null and b/src/cards/othercards/37.png differ diff --git a/src/cards/othercards/38.png b/src/cards/othercards/38.png new file mode 100755 index 00000000..c2525fc5 Binary files /dev/null and b/src/cards/othercards/38.png differ diff --git a/src/cards/othercards/39.png b/src/cards/othercards/39.png new file mode 100755 index 00000000..d5f52f8e Binary files /dev/null and b/src/cards/othercards/39.png differ diff --git a/src/cards/othercards/4.png b/src/cards/othercards/4.png new file mode 100755 index 00000000..b6018164 Binary files /dev/null and b/src/cards/othercards/4.png differ diff --git a/src/cards/othercards/40.png b/src/cards/othercards/40.png new file mode 100755 index 00000000..29cbe205 Binary files /dev/null and b/src/cards/othercards/40.png differ diff --git a/src/cards/othercards/41.png b/src/cards/othercards/41.png new file mode 100755 index 00000000..d9d5cf7e Binary files /dev/null and b/src/cards/othercards/41.png differ diff --git a/src/cards/othercards/42.png b/src/cards/othercards/42.png new file mode 100755 index 00000000..cdf3c5fc Binary files /dev/null and b/src/cards/othercards/42.png differ diff --git a/src/cards/othercards/43.png b/src/cards/othercards/43.png new file mode 100755 index 00000000..e8df1500 Binary files /dev/null and b/src/cards/othercards/43.png differ diff --git a/src/cards/othercards/44.png b/src/cards/othercards/44.png new file mode 100755 index 00000000..1d5d70ca Binary files /dev/null and b/src/cards/othercards/44.png differ diff --git a/src/cards/othercards/45.png b/src/cards/othercards/45.png new file mode 100755 index 00000000..77aaaff6 Binary files /dev/null and b/src/cards/othercards/45.png differ diff --git a/src/cards/othercards/46.png b/src/cards/othercards/46.png new file mode 100755 index 00000000..51ae56a2 Binary files /dev/null and b/src/cards/othercards/46.png differ diff --git a/src/cards/othercards/47.png b/src/cards/othercards/47.png new file mode 100755 index 00000000..c28348bf Binary files /dev/null and b/src/cards/othercards/47.png differ diff --git a/src/cards/othercards/48.png b/src/cards/othercards/48.png new file mode 100755 index 00000000..bd59e6bf Binary files /dev/null and b/src/cards/othercards/48.png differ diff --git a/src/cards/othercards/49.png b/src/cards/othercards/49.png new file mode 100755 index 00000000..933ef0b8 Binary files /dev/null and b/src/cards/othercards/49.png differ diff --git a/src/cards/othercards/5.png b/src/cards/othercards/5.png new file mode 100755 index 00000000..c24e7ca1 Binary files /dev/null and b/src/cards/othercards/5.png differ diff --git a/src/cards/othercards/50.png b/src/cards/othercards/50.png new file mode 100755 index 00000000..1487dc9d Binary files /dev/null and b/src/cards/othercards/50.png differ diff --git a/src/cards/othercards/51.png b/src/cards/othercards/51.png new file mode 100755 index 00000000..c91de3f2 Binary files /dev/null and b/src/cards/othercards/51.png differ diff --git a/src/cards/othercards/6.png b/src/cards/othercards/6.png new file mode 100755 index 00000000..52702bda Binary files /dev/null and b/src/cards/othercards/6.png differ diff --git a/src/cards/othercards/7.png b/src/cards/othercards/7.png new file mode 100755 index 00000000..107fd163 Binary files /dev/null and b/src/cards/othercards/7.png differ diff --git a/src/cards/othercards/8.png b/src/cards/othercards/8.png new file mode 100755 index 00000000..8727fb97 Binary files /dev/null and b/src/cards/othercards/8.png differ diff --git a/src/cards/othercards/9.png b/src/cards/othercards/9.png new file mode 100755 index 00000000..4fc1e777 Binary files /dev/null and b/src/cards/othercards/9.png differ diff --git a/src/cards/othercards/flipside.png b/src/cards/othercards/flipside.png new file mode 100755 index 00000000..816dbcbb Binary files /dev/null and b/src/cards/othercards/flipside.png differ diff --git a/src/deck.qrc b/src/deck.qrc new file mode 100755 index 00000000..158c6347 --- /dev/null +++ b/src/deck.qrc @@ -0,0 +1,113 @@ + + + cards/logo1-140x100_neu.png + cards/mycards/0.png + cards/mycards/1.png + cards/mycards/10.png + cards/mycards/11.png + cards/mycards/12.png + cards/mycards/13.png + cards/mycards/14.png + cards/mycards/15.png + cards/mycards/16.png + cards/mycards/17.png + cards/mycards/18.png + cards/mycards/19.png + cards/mycards/2.png + cards/mycards/20.png + cards/mycards/21.png + cards/mycards/22.png + cards/mycards/23.png + cards/mycards/24.png + cards/mycards/25.png + cards/mycards/26.png + cards/mycards/27.png + cards/mycards/28.png + cards/mycards/29.png + cards/mycards/3.png + cards/mycards/30.png + cards/mycards/31.png + cards/mycards/32.png + cards/mycards/33.png + cards/mycards/34.png + cards/mycards/35.png + cards/mycards/36.png + cards/mycards/37.png + cards/mycards/38.png + cards/mycards/39.png + cards/mycards/4.png + cards/mycards/40.png + cards/mycards/41.png + cards/mycards/42.png + cards/mycards/43.png + cards/mycards/44.png + cards/mycards/45.png + cards/mycards/46.png + cards/mycards/47.png + cards/mycards/48.png + cards/mycards/49.png + cards/mycards/5.png + cards/mycards/50.png + cards/mycards/51.png + cards/mycards/6.png + cards/mycards/7.png + cards/mycards/8.png + cards/mycards/9.png + cards/mycards/flipside.png + + + cards/othercards/0.png + cards/othercards/1.png + cards/othercards/10.png + cards/othercards/11.png + cards/othercards/12.png + cards/othercards/13.png + cards/othercards/14.png + cards/othercards/15.png + cards/othercards/16.png + cards/othercards/17.png + cards/othercards/18.png + cards/othercards/19.png + cards/othercards/2.png + cards/othercards/20.png + cards/othercards/21.png + cards/othercards/22.png + cards/othercards/23.png + cards/othercards/24.png + cards/othercards/25.png + cards/othercards/26.png + cards/othercards/27.png + cards/othercards/28.png + cards/othercards/29.png + cards/othercards/3.png + cards/othercards/30.png + cards/othercards/31.png + cards/othercards/32.png + cards/othercards/33.png + cards/othercards/34.png + cards/othercards/35.png + cards/othercards/36.png + cards/othercards/37.png + cards/othercards/38.png + cards/othercards/39.png + cards/othercards/4.png + cards/othercards/40.png + cards/othercards/41.png + cards/othercards/42.png + cards/othercards/43.png + cards/othercards/44.png + cards/othercards/45.png + cards/othercards/46.png + cards/othercards/47.png + cards/othercards/48.png + cards/othercards/49.png + cards/othercards/5.png + cards/othercards/50.png + cards/othercards/51.png + cards/othercards/6.png + cards/othercards/7.png + cards/othercards/8.png + cards/othercards/9.png + cards/othercards/flipside.png + + diff --git a/src/engine_interfaces/boardinterface.cpp b/src/engine_interfaces/boardinterface.cpp new file mode 100644 index 00000000..4af2fb59 --- /dev/null +++ b/src/engine_interfaces/boardinterface.cpp @@ -0,0 +1,26 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "boardinterface.h" + +BoardInterface::~BoardInterface() +{ +} + + diff --git a/src/engine_interfaces/boardinterface.h b/src/engine_interfaces/boardinterface.h new file mode 100644 index 00000000..e3c4cba1 --- /dev/null +++ b/src/engine_interfaces/boardinterface.h @@ -0,0 +1,44 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef BOARDINTERFACE_H +#define BOARDINTERFACE_H + +class BoardInterface{ +public: + + virtual ~BoardInterface(); + +// virtual void setPlayer(LocalPlayer**); +// virtual void setHand(LocalHand*); +// +// void setMyCards(int* theValue) { int i; for(i=0; i<5; i++) myCards[i] = theValue[i]; } +// void getMyCards(int* theValue) { int i; for(i=0; i<5; i++) theValue[i] = myCards[i]; } +// +// int getPot() const { return pot;} +// void setPot(int theValue) { pot = theValue;} +// int getSets() const { return sets; } +// +// void collectSets(); +// void collectPot(); + + +}; + +#endif diff --git a/src/engine_interfaces/flopinterface.cpp b/src/engine_interfaces/flopinterface.cpp new file mode 100644 index 00000000..ee38a770 --- /dev/null +++ b/src/engine_interfaces/flopinterface.cpp @@ -0,0 +1,31 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "flopinterface.h" + +FlopInterface::FlopInterface() +{ +} + + +FlopInterface::~FlopInterface() +{ +} + + diff --git a/src/engine_interfaces/flopinterface.h b/src/engine_interfaces/flopinterface.h new file mode 100644 index 00000000..3de9cd1d --- /dev/null +++ b/src/engine_interfaces/flopinterface.h @@ -0,0 +1,34 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef FLOPINTERFACE_H +#define FLOPINTERFACE_H + +/** + @author FThauer FHammer +*/ +class FlopInterface{ +public: + FlopInterface(); + + ~FlopInterface(); + +}; + +#endif diff --git a/src/engine_interfaces/handinterface.cpp b/src/engine_interfaces/handinterface.cpp new file mode 100644 index 00000000..07d91759 --- /dev/null +++ b/src/engine_interfaces/handinterface.cpp @@ -0,0 +1,31 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "handinterface.h" + +HandInterface::HandInterface() +{ +} + + +HandInterface::~HandInterface() +{ +} + + diff --git a/src/engine_interfaces/handinterface.h b/src/engine_interfaces/handinterface.h new file mode 100644 index 00000000..a9a23757 --- /dev/null +++ b/src/engine_interfaces/handinterface.h @@ -0,0 +1,34 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef HANDINTERFACE_H +#define HANDINTERFACE_H + +/** + @author FThauer FHammer +*/ +class HandInterface{ +public: + HandInterface(); + + ~HandInterface(); + +}; + +#endif diff --git a/src/engine_interfaces/playerinterface.cpp b/src/engine_interfaces/playerinterface.cpp new file mode 100644 index 00000000..239c8ad6 --- /dev/null +++ b/src/engine_interfaces/playerinterface.cpp @@ -0,0 +1,31 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "playerinterface.h" + +PlayerInterface::PlayerInterface() +{ +} + + +PlayerInterface::~PlayerInterface() +{ +} + + diff --git a/src/engine_interfaces/playerinterface.h b/src/engine_interfaces/playerinterface.h new file mode 100644 index 00000000..9812e35d --- /dev/null +++ b/src/engine_interfaces/playerinterface.h @@ -0,0 +1,34 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef PLAYERINTERFACE_H +#define PLAYERINTERFACE_H + +/** + @author FThauer FHammer +*/ +class PlayerInterface{ +public: + PlayerInterface(); + + ~PlayerInterface(); + +}; + +#endif diff --git a/src/engine_interfaces/preflopinterface.cpp b/src/engine_interfaces/preflopinterface.cpp new file mode 100644 index 00000000..6bd352b9 --- /dev/null +++ b/src/engine_interfaces/preflopinterface.cpp @@ -0,0 +1,26 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "preflopinterface.h" + +PreflopInterface::~PreflopInterface() +{ +} + + diff --git a/src/engine_interfaces/preflopinterface.h b/src/engine_interfaces/preflopinterface.h new file mode 100644 index 00000000..b297177e --- /dev/null +++ b/src/engine_interfaces/preflopinterface.h @@ -0,0 +1,32 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef PREFLOPINTERFACE_H +#define PREFLOPINTERFACE_H + +class PreflopInterface{ +public: + + virtual ~PreflopInterface(); + + + +}; + +#endif diff --git a/src/engine_interfaces/riverinterface.cpp b/src/engine_interfaces/riverinterface.cpp new file mode 100644 index 00000000..12bc18ba --- /dev/null +++ b/src/engine_interfaces/riverinterface.cpp @@ -0,0 +1,31 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "riverinterface.h" + +RiverInterface::RiverInterface() +{ +} + + +RiverInterface::~RiverInterface() +{ +} + + diff --git a/src/engine_interfaces/riverinterface.h b/src/engine_interfaces/riverinterface.h new file mode 100644 index 00000000..113a8d37 --- /dev/null +++ b/src/engine_interfaces/riverinterface.h @@ -0,0 +1,34 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef RIVERINTERFACE_H +#define RIVERINTERFACE_H + +/** + @author FThauer FHammer +*/ +class RiverInterface{ +public: + RiverInterface(); + + ~RiverInterface(); + +}; + +#endif diff --git a/src/engine_interfaces/turninterface.cpp b/src/engine_interfaces/turninterface.cpp new file mode 100644 index 00000000..642786bb --- /dev/null +++ b/src/engine_interfaces/turninterface.cpp @@ -0,0 +1,31 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "turninterface.h" + +TurnInterface::TurnInterface() +{ +} + + +TurnInterface::~TurnInterface() +{ +} + + diff --git a/src/engine_interfaces/turninterface.h b/src/engine_interfaces/turninterface.h new file mode 100644 index 00000000..30d8609a --- /dev/null +++ b/src/engine_interfaces/turninterface.h @@ -0,0 +1,34 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef TURNINTERFACE_H +#define TURNINTERFACE_H + +/** + @author FThauer FHammer +*/ +class TurnInterface{ +public: + TurnInterface(); + + ~TurnInterface(); + +}; + +#endif diff --git a/src/game.cpp b/src/game.cpp new file mode 100755 index 00000000..f1047685 --- /dev/null +++ b/src/game.cpp @@ -0,0 +1,131 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "game.h" + +#include "localhand.h" +#include "guiinterface.h" + + +using namespace std; + +Game::Game(mainWindowImpl *w, GuiInterface* g, int qP, int sC, int sB) : myW(w), myGui(g), actualHand(0), actualBoard(0), startQuantityPlayers(qP), startCash(sC), startSmallBlind(sB), actualQuantityPlayers(qP), actualSmallBlind(sB), actualHandID(0), dealerPosition(0) +{ + int i; + + for(i=0; igetMaxQuantityPlayers(); i++) { + playerArray[i] = 0; + } + +// myEngine = new EngineWrapper(); + + + myW->setGame(this); + +// myGui->setGameEngine(myEngine); + + // Board erstellen + actualBoard = new LocalBoard(); + + // ersten Dealer bestimmen + Tools myTool; + myTool.getRandNumber(0, startQuantityPlayers-1, 1, &dealerPosition, 0); + + // Player erstellen + LocalPlayer *tempPlayer; + for(i=0; igetMaxQuantityPlayers(); i++) { + tempPlayer = new LocalPlayer(actualBoard, i, startCash, startQuantityPlayers > i, 0); + playerArray[i] = tempPlayer; + } + actualBoard->setPlayer(playerArray); + + //// SPIEL-SCHLEIFE + + startHand(); + + // SPIEL-SCHLEIFE + + +} + + +Game::~Game() +{ + int i; + + delete actualBoard; + actualBoard = 0; + delete actualHand; + actualHand = 0; + + LocalPlayer *tempPlayer; + for(i=0; igetMaxQuantityPlayers(); i++) { + tempPlayer = playerArray[i]; + playerArray[i] = 0; + delete tempPlayer; + } + +} + +void Game::startHand() +{ + int i; + + //eventuell vorhandene Hand l�chen + if(actualHand) { + delete actualHand; + actualHand = 0; + } + + actualHandID++; + + // smallBlind alle 9 Runden erh�en + if(actualHandID%9 == 0) actualSmallBlind *= 2; + + //Spieler Action auf 0 setzen + for(i=0; igetMaxQuantityPlayers(); i++) { + playerArray[i]->setMyAction(0); + } + + // Spieler mit leerem Cash auf inactive setzen + for(i=0; igetMaxQuantityPlayers(); i++) { + if(playerArray[i]->getMyCash() == 0) playerArray[i]->setMyActiveStatus(0); + } + + //Spiel-Men disablen +// myW->actionNewGame->setDisabled(TRUE); + + + // Hand erstellen + actualHand = new LocalHand(myW, myGui, actualBoard, playerArray, actualHandID, actualQuantityPlayers, dealerPosition, actualSmallBlind, startCash); + + //GUI bereinigen + myW->nextRoundCleanGui(); + + //Spielernamen schreiben + myW->refreshPlayerName(); + + // Dealer-Button weiterschieben --> Achtung inactive + do { + dealerPosition = (dealerPosition+1)%(myW->getMaxQuantityPlayers()); + } while(!(playerArray[dealerPosition]->getMyActiveStatus())); + + + // Abfrage Cash==0 -> player inactive -> actualQuantityPlayer-- +} diff --git a/src/game.h b/src/game.h new file mode 100755 index 00000000..cba428d8 --- /dev/null +++ b/src/game.h @@ -0,0 +1,89 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef GAME_H +#define GAME_H + +#include + +class LocalHand; +class LocalBoard; +class mainWindowImpl; +class GuiInterface; +class LocalPlayer; + + +class Game { + +public: + Game(mainWindowImpl*, GuiInterface*, int, int, int); + + ~Game(); + + //Zufgriff Startvariablen + void setStartQuantityPlayers(const int& theValue) { startQuantityPlayers = theValue; } + int getStartQuantityPlayers() const { return startQuantityPlayers; } + + void setStartSmallBlind(const int& theValue) { startSmallBlind = theValue; } + int getStartSmallBlind() const { return startSmallBlind; } + + void setStartCash(const int& theValue) { startCash = theValue; } + int getStartCash() const { return startCash; } + + void setDealerPosition(const int& theValue) { dealerPosition = theValue; } + int getDealerPosition() const { return dealerPosition; } + + + //Zufgriff Laufvariablen + void setActualQuantityPlayers(const int& theValue) { actualQuantityPlayers = theValue; } + int getActualQuantityPlayers() const { return actualQuantityPlayers; } + + void setActualSmallBlind(const int& theValue) { actualSmallBlind = theValue; } + int getActualSmallBlind() const { return actualSmallBlind; } + + void setActualHandID(const int& theValue) { actualHandID = theValue; } + int getActualHandID() const { return actualHandID; } + + void startHand(); + + + +private: + + mainWindowImpl *myW; + GuiInterface *myGui; + LocalHand *actualHand; + LocalBoard *actualBoard; + LocalPlayer *playerArray[5]; + + //Startvariablen + int startQuantityPlayers; + int startCash; + int startSmallBlind; + + //Laufvariablen + int actualQuantityPlayers; + int actualSmallBlind; + int actualHandID; + int dealerPosition; + + +}; + +#endif diff --git a/src/gui/aboutpokerth.ui b/src/gui/aboutpokerth.ui new file mode 100755 index 00000000..589fac58 --- /dev/null +++ b/src/gui/aboutpokerth.ui @@ -0,0 +1,521 @@ + + aboutPokerth + + + + 0 + 0 + 485 + 277 + + + + About PokerTH + + + + 9 + + + 6 + + + + + 0 + + + + About + + + + 9 + + + 6 + + + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Nimbus Sans L'; font-size:9px; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">PokerTH</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Poker-Engine for the popular "Texas Holdem"-Poker</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Singleplayer-Modus</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Up to 4 Opponents</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Coded in C++ / QT4</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"><span style=" font-weight:400;">© 2006, FHammer &amp; FThauer</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + Project + + + + 9 + + + 6 + + + + + Qt::Vertical + + + + 20 + 81 + + + + + + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Nimbus Sans L'; font-size:9px; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Projectpage: </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> <a href="http://sourceforge.net/projects/qupil"><span style=" text-decoration: underline; color:#0000ff;">http://sourceforge.net/projects/pokerth</span></a></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Authors: </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Felix Hammer (<a href="mailto:fhammer@lehrsaiten.de"><span style=" text-decoration: underline; color:#0000ff;">f.hammer@web.de</span></a>)</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Florian Thauer (<a href="mailto:fhammer@lehrsaiten.de"><span style=" text-decoration: underline; color:#0000ff;">f.thauer@web.de</span></a>)</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> + + + + + + + + License + + + + 9 + + + 6 + + + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This Software is published under the Terms of GPL v2:</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> GNU GENERAL PUBLIC LICENSE</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Version 2, June 1991</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Copyright (C) 1989, 1991 Free Software Foundation, Inc.,</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Everyone is permitted to copy and distribute verbatim copies</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> of this license document, but changing it is not allowed.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Preamble</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> The licenses for most software are designed to take away your</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">freedom to share and change it. By contrast, the GNU General Public</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">License is intended to guarantee your freedom to share and change free</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">software--to make sure the software is free for all its users. This</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">General Public License applies to most of the Free Software</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Foundation's software and to any other program whose authors commit to</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">using it. (Some other Free Software Foundation software is covered by</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">the GNU Lesser General Public License instead.) You can apply it to</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">your programs, too.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> When we speak of free software, we are referring to freedom, not</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">price. Our General Public Licenses are designed to make sure that you</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">have the freedom to distribute copies of free software (and charge for</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">this service if you wish), that you receive source code or can get it</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">if you want it, that you can change the software or use pieces of it</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">in new free programs; and that you know you can do these things.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> To protect your rights, we need to make restrictions that forbid</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">anyone to deny you these rights or to ask you to surrender the rights.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These restrictions translate to certain responsibilities for you if you</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">distribute copies of the software, or if you modify it.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> For example, if you distribute copies of such a program, whether</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">gratis or for a fee, you must give the recipients all the rights that</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">you have. You must make sure that they, too, receive or can get the</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">source code. And you must show them these terms so they know their</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">rights.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> We protect your rights with two steps: (1) copyright the software, and</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(2) offer you this license which gives you legal permission to copy,</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">distribute and/or modify the software.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Also, for each author's protection and ours, we want to make certain</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">that everyone understands that there is no warranty for this free</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">software. If the software is modified by someone else and passed on, we</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">want its recipients to know that what they have is not the original, so</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">that any problems introduced by others will not reflect on the original</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">authors' reputations.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Finally, any free program is threatened constantly by software</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">patents. We wish to avoid the danger that redistributors of a free</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">program will individually obtain patent licenses, in effect making the</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">program proprietary. To prevent this, we have made it clear that any</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">patent must be licensed for everyone's free use or not licensed at all.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> The precise terms and conditions for copying, distribution and</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">modification follow.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> GNU GENERAL PUBLIC LICENSE</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 0. This License applies to any program or other work which contains</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">a notice placed by the copyright holder saying it may be distributed</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">under the terms of this General Public License. The "Program", below,</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">refers to any such program or work, and a "work based on the Program"</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">means either the Program or any derivative work under copyright law:</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">that is to say, a work containing the Program or a portion of it,</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">either verbatim or with modifications and/or translated into another</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">language. (Hereinafter, translation is included without limitation in</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">the term "modification".) Each licensee is addressed as "you".</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Activities other than copying, distribution and modification are not</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">covered by this License; they are outside its scope. The act of</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">running the Program is not restricted, and the output from the Program</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">is covered only if its contents constitute a work based on the</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Program (independent of having been made by running the Program).</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Whether that is true depends on what the Program does.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 1. You may copy and distribute verbatim copies of the Program's</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">source code as you receive it, in any medium, provided that you</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">conspicuously and appropriately publish on each copy an appropriate</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">copyright notice and disclaimer of warranty; keep intact all the</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">notices that refer to this License and to the absence of any warranty;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">and give any other recipients of the Program a copy of this License</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">along with the Program.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may charge a fee for the physical act of transferring a copy, and</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">you may at your option offer warranty protection in exchange for a fee.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 2. You may modify your copy or copies of the Program or any portion</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">of it, thus forming a work based on the Program, and copy and</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">distribute such modifications or work under the terms of Section 1</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">above, provided that you also meet all of these conditions:</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> a) You must cause the modified files to carry prominent notices</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> stating that you changed the files and the date of any change.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> b) You must cause any work that you distribute or publish, that in</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> whole or in part contains or is derived from the Program or any</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> part thereof, to be licensed as a whole at no charge to all third</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> parties under the terms of this License.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> c) If the modified program normally reads commands interactively</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> when run, you must cause it, when started running for such</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> interactive use in the most ordinary way, to print or display an</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> announcement including an appropriate copyright notice and a</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> notice that there is no warranty (or else, saying that you provide</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> a warranty) and that users may redistribute the program under</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> these conditions, and telling the user how to view a copy of this</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> License. (Exception: if the Program itself is interactive but</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> does not normally print such an announcement, your work based on</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> the Program is not required to print an announcement.)</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These requirements apply to the modified work as a whole. If</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">identifiable sections of that work are not derived from the Program,</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">and can be reasonably considered independent and separate works in</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">themselves, then this License, and its terms, do not apply to those</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">sections when you distribute them as separate works. But when you</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">distribute the same sections as part of a whole which is a work based</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">on the Program, the distribution of the whole must be on the terms of</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">this License, whose permissions for other licensees extend to the</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">entire whole, and thus to each and every part regardless of who wrote it.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Thus, it is not the intent of this section to claim rights or contest</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">your rights to work written entirely by you; rather, the intent is to</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">exercise the right to control the distribution of derivative or</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">collective works based on the Program.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In addition, mere aggregation of another work not based on the Program</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">with the Program (or with a work based on the Program) on a volume of</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">a storage or distribution medium does not bring the other work under</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">the scope of this License.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 3. You may copy and distribute the Program (or a work based on it,</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">under Section 2) in object code or executable form under the terms of</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sections 1 and 2 above provided that you also do one of the following:</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> a) Accompany it with the complete corresponding machine-readable</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> source code, which must be distributed under the terms of Sections</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 1 and 2 above on a medium customarily used for software interchange; or,</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> b) Accompany it with a written offer, valid for at least three</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> years, to give any third party, for a charge no more than your</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> cost of physically performing source distribution, a complete</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> machine-readable copy of the corresponding source code, to be</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> distributed under the terms of Sections 1 and 2 above on a medium</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> customarily used for software interchange; or,</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> c) Accompany it with the information you received as to the offer</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> to distribute corresponding source code. (This alternative is</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> allowed only for noncommercial distribution and only if you</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> received the program in object code or executable form with such</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> an offer, in accord with Subsection b above.)</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The source code for a work means the preferred form of the work for</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">making modifications to it. For an executable work, complete source</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">code means all the source code for all modules it contains, plus any</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">associated interface definition files, plus the scripts used to</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">control compilation and installation of the executable. However, as a</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">special exception, the source code distributed need not include</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">anything that is normally distributed (in either source or binary</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">form) with the major components (compiler, kernel, and so on) of the</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">operating system on which the executable runs, unless that component</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">itself accompanies the executable.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If distribution of executable or object code is made by offering</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">access to copy from a designated place, then offering equivalent</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">access to copy the source code from the same place counts as</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">distribution of the source code, even though third parties are not</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">compelled to copy the source along with the object code.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 4. You may not copy, modify, sublicense, or distribute the Program</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">except as expressly provided under this License. Any attempt</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">otherwise to copy, modify, sublicense or distribute the Program is</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">void, and will automatically terminate your rights under this License.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">However, parties who have received copies, or rights, from you under</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">this License will not have their licenses terminated so long as such</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">parties remain in full compliance.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 5. You are not required to accept this License, since you have not</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">signed it. However, nothing else grants you permission to modify or</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">distribute the Program or its derivative works. These actions are</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">prohibited by law if you do not accept this License. Therefore, by</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">modifying or distributing the Program (or any work based on the</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Program), you indicate your acceptance of this License to do so, and</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">all its terms and conditions for copying, distributing or modifying</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">the Program or works based on it.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 6. Each time you redistribute the Program (or any work based on the</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Program), the recipient automatically receives a license from the</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">original licensor to copy, distribute or modify the Program subject to</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">these terms and conditions. You may not impose any further</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">restrictions on the recipients' exercise of the rights granted herein.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You are not responsible for enforcing compliance by third parties to</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">this License.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 7. If, as a consequence of a court judgment or allegation of patent</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">infringement or for any other reason (not limited to patent issues),</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">conditions are imposed on you (whether by court order, agreement or</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">otherwise) that contradict the conditions of this License, they do not</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">excuse you from the conditions of this License. If you cannot</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">distribute so as to satisfy simultaneously your obligations under this</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">License and any other pertinent obligations, then as a consequence you</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">may not distribute the Program at all. For example, if a patent</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">license would not permit royalty-free redistribution of the Program by</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">all those who receive copies directly or indirectly through you, then</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">the only way you could satisfy both it and this License would be to</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">refrain entirely from distribution of the Program.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If any portion of this section is held invalid or unenforceable under</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">any particular circumstance, the balance of the section is intended to</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">apply and the section as a whole is intended to apply in other</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">circumstances.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">It is not the purpose of this section to induce you to infringe any</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">patents or other property right claims or to contest validity of any</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">such claims; this section has the sole purpose of protecting the</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">integrity of the free software distribution system, which is</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">implemented by public license practices. Many people have made</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">generous contributions to the wide range of software distributed</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">through that system in reliance on consistent application of that</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">system; it is up to the author/donor to decide if he or she is willing</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">to distribute software through any other system and a licensee cannot</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">impose that choice.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This section is intended to make thoroughly clear what is believed to</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">be a consequence of the rest of this License.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 8. If the distribution and/or use of the Program is restricted in</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">certain countries either by patents or by copyrighted interfaces, the</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">original copyright holder who places the Program under this License</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">may add an explicit geographical distribution limitation excluding</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">those countries, so that distribution is permitted only in or among</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">countries not thus excluded. In such case, this License incorporates</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">the limitation as if written in the body of this License.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 9. The Free Software Foundation may publish revised and/or new versions</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">of the General Public License from time to time. Such new versions will</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">be similar in spirit to the present version, but may differ in detail to</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">address new problems or concerns.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Each version is given a distinguishing version number. If the Program</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">specifies a version number of this License which applies to it and "any</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">later version", you have the option of following the terms and conditions</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">either of that version or of any later version published by the Free</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Software Foundation. If the Program does not specify a version number of</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">this License, you may choose any version ever published by the Free Software</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Foundation.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 10. If you wish to incorporate parts of the Program into other free</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">programs whose distribution conditions are different, write to the author</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">to ask for permission. For software which is copyrighted by the Free</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Software Foundation, write to the Free Software Foundation; we sometimes</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">make exceptions for this. Our decision will be guided by the two goals</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">of preserving the free status of all derivatives of our free software and</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">of promoting the sharing and reuse of software generally.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> NO WARRANTY</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">REPAIR OR CORRECTION.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">POSSIBILITY OF SUCH DAMAGES.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> END OF TERMS AND CONDITIONS</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> How to Apply These Terms to Your New Programs</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> If you develop a new program, and you want it to be of the greatest</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">possible use to the public, the best way to achieve this is to make it</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">free software which everyone can redistribute and change under these terms.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> To do so, attach the following notices to the program. It is safest</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">to attach them to the start of each source file to most effectively</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">convey the exclusion of warranty; and each file should have at least</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">the "copyright" line and a pointer to where the full notice is found.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> &lt;one line to give the program's name and a brief idea of what it does.&gt;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Copyright (C) &lt;year&gt; &lt;name of author&gt;</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> This program is free software; you can redistribute it and/or modify</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> it under the terms of the GNU General Public License as published by</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> the Free Software Foundation; either version 2 of the License, or</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> (at your option) any later version.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> This program is distributed in the hope that it will be useful,</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> but WITHOUT ANY WARRANTY; without even the implied warranty of</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> GNU General Public License for more details.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> You should have received a copy of the GNU General Public License along</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> with this program; if not, write to the Free Software Foundation, Inc.,</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Also add information on how to contact you by electronic and paper mail.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If the program is interactive, make it output a short notice like this</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">when it starts in an interactive mode:</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Gnomovision version 69, Copyright (C) year name of author</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> This is free software, and you are welcome to redistribute it</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> under certain conditions; type `show c' for details.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The hypothetical commands `show w' and `show c' should show the appropriate</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">parts of the General Public License. Of course, the commands you use may</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">be called something other than `show w' and `show c'; they could even be</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">mouse-clicks or menu items--whatever suits your program.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You should also get your employer (if you work as a programmer) or your</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">school, if any, to sign a "copyright disclaimer" for the program, if</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">necessary. Here is a sample; alter the names:</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Yoyodyne, Inc., hereby disclaims all copyright interest in the program</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> `Gnomovision' (which makes passes at compilers) written by James Hacker.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> &lt;signature of Ty Coon&gt;, 1 April 1989</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Ty Coon, President of Vice</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This General Public License does not permit incorporating your program into</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">proprietary programs. If your program is a subroutine library, you may</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">consider it more useful to permit linking proprietary applications with the</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">library. If this is what you want to do, use the GNU Lesser General</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Public License instead of this License.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> + + + + + + + + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + + 131 + 31 + + + + + + + + Close + + + + + + + + + + + okButton + clicked() + aboutPokerth + accept() + + + 278 + 253 + + + 96 + 254 + + + + + diff --git a/src/gui/aboutpokerthimpl.cpp b/src/gui/aboutpokerthimpl.cpp new file mode 100755 index 00000000..f86ca8e4 --- /dev/null +++ b/src/gui/aboutpokerthimpl.cpp @@ -0,0 +1,28 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "aboutpokerthimpl.h" + +aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, const char *name) + : QDialog(parent, name) +{ + + setupUi(this); + +} diff --git a/src/gui/aboutpokerthimpl.h b/src/gui/aboutpokerthimpl.h new file mode 100755 index 00000000..1ccb3152 --- /dev/null +++ b/src/gui/aboutpokerthimpl.h @@ -0,0 +1,32 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef ABOUTPOKERTHIMPL_H +#define ABOUTPOKERTHIMPL_H + +#include "ui_aboutpokerth.h" + + +class aboutPokerthImpl: public QDialog, public Ui::aboutPokerth { +Q_OBJECT +public: + aboutPokerthImpl(QWidget *parent = 0, const char *name = 0); +}; + +#endif diff --git a/src/gui/guiinterface.cpp b/src/gui/guiinterface.cpp new file mode 100644 index 00000000..ea44ddad --- /dev/null +++ b/src/gui/guiinterface.cpp @@ -0,0 +1,26 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "guiinterface.h" + +GuiInterface::~GuiInterface() +{ +} + + diff --git a/src/gui/guiinterface.h b/src/gui/guiinterface.h new file mode 100644 index 00000000..1a85ce96 --- /dev/null +++ b/src/gui/guiinterface.h @@ -0,0 +1,61 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef GUIINTERFACE_H +#define GUIINTERFACE_H + +// #include +#include + + +class GuiInterface{ +public: + virtual ~GuiInterface(); + + + virtual void showPlayerActionLogMsg(std::string playName, int &action, int &setValue) const=0; + + virtual void refreshSet() const=0; + virtual void refreshChangePlayer() const=0; + + virtual void dealFlopCards() const=0; + virtual void dealTurnCard() const=0; + virtual void dealRiverCard() const=0; + + virtual void nextPlayerAnimation() const=0; + + virtual void preflopAnimation1() const=0; + virtual void preflopAnimation2() const=0; + + virtual void flopAnimation1() const=0; + virtual void flopAnimation2() const=0; + + virtual void turnAnimation1() const=0; + virtual void turnAnimation2() const=0; + + virtual void riverAnimation1() const=0; + virtual void riverAnimation2() const=0; + + virtual void postRiverAnimation1() const=0; +// virtual void postRiverAnimation2() const=0; + + +}; + +#endif diff --git a/src/gui/guiwrapper.cpp b/src/gui/guiwrapper.cpp new file mode 100644 index 00000000..0608d1e9 --- /dev/null +++ b/src/gui/guiwrapper.cpp @@ -0,0 +1,73 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "guiwrapper.h" + +#include "log.h" +#include "mainwindowimpl.h" + +using namespace std; + + +GuiWrapper::GuiWrapper(mainWindowImpl* w) : myW(w) +{ + +// Am Ende soll GuiWrapper mainWindowImpl +// myW = new mainWindowImpl(); +// myW->show(); + +// Jetzt muss myW erstmal aus Session kommen! + + myLog = new Log(myW); + + +} + + +GuiWrapper::~GuiWrapper() +{ +} + + +void GuiWrapper::showPlayerActionLogMsg(string playerName, int &action, int &setValue) const { myLog->showPlayerActionLogMsg(playerName, action, setValue); +} + +void GuiWrapper::refreshSet() const { myW->refreshSet(); } +void GuiWrapper::refreshChangePlayer() const { myW->refreshChangePlayer(); } + + +void GuiWrapper::dealFlopCards() const { myW->dealFlopCards0(); } +void GuiWrapper::dealTurnCard() const { myW->dealTurnCards0(); } +void GuiWrapper::dealRiverCard() const { myW->dealRiverCards0(); } + +void GuiWrapper::nextPlayerAnimation() const { myW->nextPlayerAnimation(); } + +void GuiWrapper::preflopAnimation1() const { myW->preflopAnimation1(); } +void GuiWrapper::preflopAnimation2() const { myW->preflopAnimation2(); } + +void GuiWrapper::flopAnimation1() const { myW->flopAnimation1(); } +void GuiWrapper::flopAnimation2() const { myW->flopAnimation2(); } + +void GuiWrapper::turnAnimation1() const { myW->turnAnimation1(); } +void GuiWrapper::turnAnimation2() const { myW->turnAnimation2(); } + +void GuiWrapper::riverAnimation1() const { myW->riverAnimation1(); } +void GuiWrapper::riverAnimation2() const { myW->riverAnimation2(); } + +void GuiWrapper::postRiverAnimation1() const { myW->postRiverAnimation1(); } diff --git a/src/gui/guiwrapper.h b/src/gui/guiwrapper.h new file mode 100644 index 00000000..b5eb104e --- /dev/null +++ b/src/gui/guiwrapper.h @@ -0,0 +1,72 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef GUIWRAPPER_H +#define GUIWRAPPER_H + +#include + +class mainWindowImpl; +class Log; + + + +class GuiWrapper : public GuiInterface +{ +public: + GuiWrapper(mainWindowImpl*); + + ~GuiWrapper(); + + + + virtual void showPlayerActionLogMsg(std::string playerName, int &action, int &setValue) const; + virtual void refreshSet() const; + virtual void refreshChangePlayer() const; + + virtual void dealFlopCards() const; + virtual void dealTurnCard() const; + virtual void dealRiverCard() const; + + virtual void nextPlayerAnimation() const; + + virtual void preflopAnimation1() const; + virtual void preflopAnimation2() const; + + virtual void flopAnimation1() const; + virtual void flopAnimation2() const; + + virtual void turnAnimation1() const; + virtual void turnAnimation2() const; + + virtual void riverAnimation1() const; + virtual void riverAnimation2() const; + + virtual void postRiverAnimation1() const; +// virtual void postRiverAnimation2() const; + +private: + + mainWindowImpl *myW; + Log *myLog; + + +}; + +#endif diff --git a/src/gui/log.cpp b/src/gui/log.cpp new file mode 100644 index 00000000..03a2f324 --- /dev/null +++ b/src/gui/log.cpp @@ -0,0 +1,72 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "log.h" + +#include "mainwindowimpl.h" + +using namespace std; + +Log::Log(mainWindowImpl* w) : myW(w) +{ + +} + +Log::~Log() +{ +} + +void Log::showPlayerActionLogMsg(string playerName, int &action, int &setValue) const { + + QString msg; + msg = QString::fromStdString(playerName); + + switch (action) { + + case 1: msg += " folds."; + break; + case 2: msg += " checks."; + break; + case 3: msg += " calls "; + break; + case 4: msg += " bets "; + break; + case 5: msg += " sets "; + break; + case 6: msg += " is all in with "; + break; + default: msg += "ERROR"; + } + + if (action >= 3) { msg += QString::number(setValue,10)+"$."; } + + myW->textBrowser_Log->append(msg); + +} + + + +// void Log::msgPlayerAction(QString playerName, int action , int setValue) { +// +// +// +// // actualHand->getMainWindowImpl()->textBrowser_Log->append(msg); +// +// } + diff --git a/src/gui/log.h b/src/gui/log.h new file mode 100644 index 00000000..4e414647 --- /dev/null +++ b/src/gui/log.h @@ -0,0 +1,47 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef LOG_H +#define LOG_H + +#include +#include +#include + + + +class mainWindowImpl; + +class Log{ +public: + Log(mainWindowImpl*); + + ~Log(); + + + void showPlayerActionLogMsg(std::string playName, int &action, int &setValue) const; + + +private: + + mainWindowImpl *myW; + +}; + +#endif diff --git a/src/gui/mainwindow-win.ui b/src/gui/mainwindow-win.ui new file mode 100644 index 00000000..e70de7f6 --- /dev/null +++ b/src/gui/mainwindow-win.ui @@ -0,0 +1,3588 @@ + + mainWindow + + + + 0 + 0 + 874 + 670 + + + + + 0 + 0 + 0 + 0 + + + + + 874 + 670 + + + + + 874 + 670 + + + + + + + + + 0 + 0 + 0 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 74 + 131 + 83 + + + + + + + 0 + 0 + 0 + + + + + + + 103 + 141 + 178 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + + 0 + 0 + 0 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 74 + 131 + 83 + + + + + + + 0 + 0 + 0 + + + + + + + 103 + 141 + 178 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + + 128 + 128 + 128 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 199 + 199 + 199 + + + + + + + 255 + 255 + 255 + + + + + + + 128 + 128 + 128 + + + + + + + 74 + 131 + 83 + + + + + + + 74 + 131 + 83 + + + + + + + 0 + 0 + 0 + + + + + + + 86 + 117 + 148 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + PokerTH - The Open-Source Texas Holdem Engine + + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 21 + 20 + + + + + + + + true + + + + + + + + 0 + 0 + 0 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 86 + 170 + 86 + + + + + + + 0 + 0 + 0 + + + + + + + 103 + 141 + 178 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + + 0 + 0 + 0 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 86 + 170 + 86 + + + + + + + 0 + 0 + 0 + + + + + + + 103 + 141 + 178 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + + 128 + 128 + 128 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 199 + 199 + 199 + + + + + + + 255 + 255 + 255 + + + + + + + 128 + 128 + 128 + + + + + + + 86 + 170 + 86 + + + + + + + 86 + 170 + 86 + + + + + + + 0 + 0 + 0 + + + + + + + 86 + 117 + 148 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + true + + + + + + + 9 + + + 6 + + + + + QFrame::HLine + + + QFrame::Sunken + + + Qt::Horizontal + + + + + + + 0 + + + 6 + + + + + 0 + + + 3 + + + + + + 16777215 + 25 + + + + &Raise + + + Alt+R + + + + + + + + 16777215 + 25 + + + + &Bet + + + Alt+B + + + + + + + + 16777215 + 25 + + + + &Call + + + Alt+C + + + + + + + + 16777215 + 25 + + + + C&heck + + + Alt+H + + + + + + + + 16777215 + 25 + + + + &Fold + + + Alt+F + + + + + + + + + Qt::Horizontal + + + + 7 + 20 + + + + + + + + + 4 + 4 + 0 + 0 + + + + QFrame::Box + + + QFrame::Raised + + + + 11 + + + 6 + + + + + + 4 + 4 + 0 + 0 + + + + + 80 + 112 + + + + + 80 + 112 + + + + true + + + + + + + + 4 + 4 + 0 + 0 + + + + + 80 + 112 + + + + + 80 + 112 + + + + true + + + + + + + + + + Qt::Horizontal + + + + 7 + 20 + + + + + + + + 0 + + + 6 + + + + + 0 + + + 3 + + + + + + 60 + 25 + + + + &Set + + + Alt+S + + + + + + + &All in + + + Alt+A + + + + + + + + 55 + 0 + + + + + + + + + + + 16 + 76 + + + + + 16777215 + 76 + + + + QFrame::Box + + + QFrame::Raised + + + + 8 + + + 0 + + + + + + + + + + + + + + + + + + + 16777215 + 30 + + + + QFrame::Box + + + QFrame::Raised + + + + 0 + + + 0 + + + + + + 133 + 0 + + + + + + + + + + + + + + + 16777215 + 30 + + + + true + + + QFrame::Box + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + 128 + 0 + + + + + + + + + + + + + + + 30 + 25 + + + + + 16777215 + 30 + + + + QFrame::Box + + + QFrame::Raised + + + + 5 + + + 0 + + + + + + 124 + 0 + + + + + + + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 21 + 20 + + + + + + + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + + 20 + 20 + + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + 0 + 0 + 0 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 86 + 170 + 86 + + + + + + + 0 + 0 + 0 + + + + + + + 103 + 141 + 178 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + + 0 + 0 + 0 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 86 + 170 + 86 + + + + + + + 0 + 0 + 0 + + + + + + + 103 + 141 + 178 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + + 128 + 128 + 128 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 199 + 199 + 199 + + + + + + + 255 + 255 + 255 + + + + + + + 128 + 128 + 128 + + + + + + + 86 + 170 + 86 + + + + + + + 86 + 170 + 86 + + + + + + + 0 + 0 + 0 + + + + + + + 86 + 117 + 148 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + true + + + + + + + 9 + + + 6 + + + + + + 0 + 0 + 0 + 0 + + + + + 104 + 114 + + + + true + + + QFrame::Box + + + QFrame::Raised + + + + 4 + + + 4 + + + + + true + + + QFrame::Box + + + QFrame::Raised + + + + 4 + + + 0 + + + + + + 0 + 30 + + + + + 16777215 + 30 + + + + true + + + + + + + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + true + + + + + + + + + + 0 + + + 4 + + + + + + 0 + 26 + + + + + 16777215 + 26 + + + + + + + + + + + + 0 + 26 + + + + + 16777215 + 26 + + + + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + QFrame::Box + + + QFrame::Raised + + + + 9 + + + 6 + + + + + + 57 + 80 + + + + + 57 + 80 + + + + + + + + + + + + 57 + 80 + + + + + 57 + 80 + + + + + + + + + + + + 57 + 80 + + + + + 57 + 80 + + + + + + + + + + + + 57 + 80 + + + + + 57 + 80 + + + + + + + + + + + + 57 + 80 + + + + + 57 + 80 + + + + + + + + + + + + + + 0 + + + 6 + + + + + + 95 + 16 + + + + QFrame::Box + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + + + + + + + 95 + 36 + + + + true + + + QFrame::Box + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + + + + + + + + + + + Qt::Horizontal + + + + 20 + 20 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 20 + 16 + + + + + + + + 0 + + + 6 + + + + + false + + + + 209 + 0 + + + + true + + + Player 1 + + + + 9 + + + 6 + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 46 + 28 + + + + + + + + QFrame::HLine + + + QFrame::Sunken + + + Qt::Horizontal + + + + + + + 0 + + + 6 + + + + + + 16 + 28 + + + + QFrame::Box + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + QFrame::Box + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + true + + + QFrame::Box + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + + QFrame::Box + + + QFrame::Raised + + + + 3 + + + 3 + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + + + + 54 + 60 + + + + + 16777215 + 60 + + + + QFrame::Box + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + 35 + 0 + + + + + + + + + 35 + 0 + + + + + + + + + + + + + + false + + + + 209 + 0 + + + + true + + + Player 2 + + + + 9 + + + 6 + + + + + + 54 + 60 + + + + + 16777215 + 60 + + + + QFrame::Box + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + 35 + 0 + + + + + + + + + 35 + 0 + + + + + + + + + + + 0 + + + 6 + + + + + + 16 + 28 + + + + QFrame::Box + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + QFrame::Box + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + true + + + QFrame::Box + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + + QFrame::HLine + + + QFrame::Sunken + + + Qt::Horizontal + + + + + + + QFrame::Box + + + QFrame::Raised + + + + 3 + + + 3 + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 46 + 28 + + + + + + + + + + + false + + + + 209 + 0 + + + + true + + + Player 3 + + + + 9 + + + 6 + + + + + + 54 + 60 + + + + + 16777215 + 60 + + + + QFrame::Box + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + 35 + 0 + + + + + + + + + 35 + 0 + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 46 + 28 + + + + + + + + 0 + + + 6 + + + + + + 16 + 28 + + + + QFrame::Box + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + QFrame::Box + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + true + + + QFrame::Box + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + + QFrame::HLine + + + QFrame::Sunken + + + Qt::Horizontal + + + + + + + QFrame::Box + + + QFrame::Raised + + + + 3 + + + 3 + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + + + + + + false + + + + 209 + 0 + + + + true + + + Player 4 + + + + 9 + + + 6 + + + + + + 54 + 60 + + + + + 16777215 + 60 + + + + QFrame::Box + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + 35 + 0 + + + + + + + + + 35 + 0 + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 46 + 28 + + + + + + + + QFrame::Box + + + QFrame::Raised + + + + 3 + + + 3 + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + + + QFrame::HLine + + + QFrame::Sunken + + + Qt::Horizontal + + + + + + + 0 + + + 6 + + + + + + 16 + 28 + + + + QFrame::Box + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + QFrame::Box + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + true + + + QFrame::Box + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 20 + 20 + + + + + + + + + + 0 + 0 + 874 + 30 + + + + + Game + + + + + + + + + + + Start New Game ... + + + + + Quit + + + + + About PokerTH ... + + + + + + Q3Frame + QFrame +
Qt3Support/Q3Frame
+ 1 +
+
+ + + + +
diff --git a/src/gui/mainwindow.ui b/src/gui/mainwindow.ui new file mode 100644 index 00000000..bad1ff0c --- /dev/null +++ b/src/gui/mainwindow.ui @@ -0,0 +1,3946 @@ + + mainWindow + + + + 0 + 0 + 874 + 670 + + + + + 0 + 0 + 0 + 0 + + + + + 874 + 670 + + + + + 874 + 670 + + + + + + + + + 0 + 0 + 0 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 74 + 131 + 83 + + + + + + + 0 + 0 + 0 + + + + + + + 103 + 141 + 178 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + + 0 + 0 + 0 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 74 + 131 + 83 + + + + + + + 0 + 0 + 0 + + + + + + + 103 + 141 + 178 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + + 128 + 128 + 128 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 199 + 199 + 199 + + + + + + + 255 + 255 + 255 + + + + + + + 128 + 128 + 128 + + + + + + + 74 + 131 + 83 + + + + + + + 74 + 131 + 83 + + + + + + + 0 + 0 + 0 + + + + + + + 86 + 117 + 148 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + PokerTH - The Open-Source Texas Holdem Engine + + + + + 9 + + + 6 + + + + + Qt::Vertical + + + + 861 + 20 + + + + + + + + 0 + + + 6 + + + + + 0 + + + 6 + + + + + Qt::Vertical + + + + 121 + 101 + + + + + + + + + 140 + 100 + + + + + 140 + 100 + + + + true + + + :/mycards/cards/logo1-140x100_neu.png + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 83 + 20 + + + + + + + + true + + + + + + + + 0 + 0 + 0 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 86 + 170 + 86 + + + + + + + 0 + 0 + 0 + + + + + + + 103 + 141 + 178 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + + 0 + 0 + 0 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 86 + 170 + 86 + + + + + + + 0 + 0 + 0 + + + + + + + 103 + 141 + 178 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + + 128 + 128 + 128 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 199 + 199 + 199 + + + + + + + 255 + 255 + 255 + + + + + + + 128 + 128 + 128 + + + + + + + 86 + 170 + 86 + + + + + + + 86 + 170 + 86 + + + + + + + 0 + 0 + 0 + + + + + + + 86 + 117 + 148 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + true + + + + + + + 9 + + + 6 + + + + + QFrame::HLine + + + QFrame::Sunken + + + Qt::Horizontal + + + + + + + + 16777215 + 30 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + 0 + + + + + + + + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 5 + + + 0 + + + + + + + + + + + + + + + 0 + + + 6 + + + + + 0 + + + 3 + + + + + + 55 + 25 + + + + &Raise + + + Alt+R + + + + + + + + 55 + 25 + + + + &Bet + + + Alt+B + + + + + + + + 55 + 25 + + + + &Call + + + Alt+C + + + + + + + + 55 + 25 + + + + C&heck + + + Alt+H + + + + + + + + 55 + 25 + + + + &Fold + + + Alt+F + + + + + + + + + + 4 + 4 + 0 + 0 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 11 + + + 6 + + + + + + 4 + 4 + 0 + 0 + + + + + 80 + 112 + + + + + 80 + 112 + + + + true + + + + + + + + 4 + 4 + 0 + 0 + + + + + 80 + 112 + + + + + 80 + 112 + + + + true + + + + + + + + + + 0 + + + 6 + + + + + 0 + + + 3 + + + + + + 34 + 25 + + + + &Set + + + Alt+S + + + + + + + &All in + + + Alt+A + + + + + + + + 40 + 0 + + + + + + + + + + + 16 + 76 + + + + + 903343 + 76 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 8 + + + 0 + + + + + + + + + + + + + + + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + 16 + 20 + + + + + + + + 0 + + + 6 + + + + + Qt::Vertical + + + + 20 + 20 + + + + + + + + + 211 + 180 + + + + + + + + + 255 + 255 + 255 + + + + + + + 86 + 170 + 86 + + + + + + + + + 255 + 255 + 255 + + + + + + + 86 + 170 + 86 + + + + + + + + + 86 + 170 + 86 + + + + + + + 86 + 170 + 86 + + + + + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 5 + + + 5 + + + + + Qt::Horizontal + + + + + + + 0 + + + 6 + + + + + Speed: + + + + + + + 1 + + + + + + + + + + 40 + 20 + + + + Stop + + + + + + + + + + + + 255 + 255 + 255 + + + + + + + 86 + 170 + 86 + + + + + + + + + 255 + 255 + 255 + + + + + + + 86 + 170 + 86 + + + + + + + + + 86 + 170 + 86 + + + + + + + 86 + 170 + 86 + + + + + + + + 0 + + + + Log + + + + 9 + + + 6 + + + + + + 100 + 60 + + + + + 200 + 97 + + + + + + + + + 203 + 237 + 180 + + + + + + + 203 + 237 + 180 + + + + + + + 36 + 72 + 36 + + + + + + + 203 + 237 + 180 + + + + + + + + + 203 + 237 + 180 + + + + + + + 203 + 237 + 180 + + + + + + + 36 + 72 + 36 + + + + + + + 203 + 237 + 180 + + + + + + + + + 203 + 237 + 180 + + + + + + + 199 + 199 + 199 + + + + + + + 86 + 170 + 86 + + + + + + + 86 + 117 + 148 + + + + + + + + + 8 + + + + Qt::ScrollBarAlwaysOff + + + + + + + + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 20 + 20 + + + + + + + + 0 + + + 6 + + + + + false + + + + 209 + 178 + + + + true + + + + + + + 9 + + + 6 + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 46 + 28 + + + + + + + + QFrame::HLine + + + QFrame::Sunken + + + Qt::Horizontal + + + + + + + 0 + + + 6 + + + + + + 16 + 28 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 3 + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + + + + 54 + 60 + + + + + 16777215 + 60 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + 35 + 0 + + + + + + + + + 35 + 0 + + + + + + + + + + + + + + false + + + + 209 + 178 + + + + true + + + + + + + 9 + + + 6 + + + + + + 54 + 60 + + + + + 16777215 + 60 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + 35 + 0 + + + + + + + + + 35 + 0 + + + + + + + + + + + 0 + + + 6 + + + + + + 16 + 28 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + + QFrame::HLine + + + QFrame::Sunken + + + Qt::Horizontal + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 3 + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 46 + 28 + + + + + + + + + + + false + + + + 209 + 178 + + + + true + + + + + + + 9 + + + 6 + + + + + + 54 + 60 + + + + + 16777215 + 60 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + 35 + 0 + + + + + + + + + 35 + 0 + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 46 + 28 + + + + + + + + 0 + + + 6 + + + + + + 16 + 28 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + + QFrame::HLine + + + QFrame::Sunken + + + Qt::Horizontal + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 3 + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + + + + + + false + + + + 209 + 178 + + + + true + + + + + + + 9 + + + 6 + + + + + + 54 + 60 + + + + + 16777215 + 60 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + 35 + 0 + + + + + + + + + 35 + 0 + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 46 + 28 + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 3 + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + 4 + 4 + 0 + 0 + + + + + 57 + 80 + + + + true + + + + + + + + + + QFrame::HLine + + + QFrame::Sunken + + + Qt::Horizontal + + + + + + + 0 + + + 6 + + + + + + 16 + 28 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + 16 + 28 + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + 0 + 20 + + + + + + + + + + + + + + + + + + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + + 20 + 20 + + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + 0 + 0 + 0 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 86 + 170 + 86 + + + + + + + 0 + 0 + 0 + + + + + + + 103 + 141 + 178 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + + 0 + 0 + 0 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 86 + 170 + 86 + + + + + + + 0 + 0 + 0 + + + + + + + 103 + 141 + 178 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + + 128 + 128 + 128 + + + + + + + 221 + 223 + 228 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 85 + 85 + + + + + + + 199 + 199 + 199 + + + + + + + 199 + 199 + 199 + + + + + + + 255 + 255 + 255 + + + + + + + 128 + 128 + 128 + + + + + + + 86 + 170 + 86 + + + + + + + 86 + 170 + 86 + + + + + + + 0 + 0 + 0 + + + + + + + 86 + 117 + 148 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 238 + + + + + + + 82 + 24 + 139 + + + + + + + 232 + 232 + 232 + + + + + + + + true + + + + + + + 9 + + + 6 + + + + + + 0 + 0 + 0 + 0 + + + + + 104 + 114 + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 4 + + + 4 + + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 4 + + + 0 + + + + + + 0 + 30 + + + + + 16777215 + 30 + + + + true + + + + + + + + + + + 0 + 25 + + + + + 16777215 + 25 + + + + true + + + + + + + + + + 0 + + + 4 + + + + + + 0 + 26 + + + + + 16777215 + 26 + + + + + + + + + 0 + 26 + + + + + 16777215 + 26 + + + + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 9 + + + 6 + + + + + + 57 + 80 + + + + + 57 + 80 + + + + + + + + + + + + 57 + 80 + + + + + 57 + 80 + + + + + + + + + + + + 57 + 80 + + + + + 57 + 80 + + + + + + + + + + + + 57 + 80 + + + + + 57 + 80 + + + + + + + + + + + + 57 + 80 + + + + + 57 + 80 + + + + + + + + + + + + + + 0 + + + 6 + + + + + + 95 + 16 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 0 + + + + + + + + + + + + 95 + 36 + + + + true + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 3 + + + 0 + + + + + + + + + + + + + + + + Qt::Horizontal + + + + 20 + 20 + + + + + + + + + + + + 0 + 0 + 874 + 29 + + + + + Game + + + + + + + + + + + Start New Game ... + + + + + Quit + + + + + About PokerTH ... + + + + + + Q3Frame + QFrame +
Qt3Support/Q3Frame
+ 1 +
+
+ + + + +
diff --git a/src/gui/mainwindowimpl.cpp b/src/gui/mainwindowimpl.cpp new file mode 100755 index 00000000..ee2d9dde --- /dev/null +++ b/src/gui/mainwindowimpl.cpp @@ -0,0 +1,1225 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "mainwindowimpl.h" + +#include "newgamedialogimpl.h" +#include "aboutpokerthimpl.h" +#include "game.h" +#include "localhand.h" +#include "session.h" + +// #include "player.h" +// #include "board.h" + +#define FORMATLEFT(X) "

(X)" +#define FORMATRIGHT(X) "(X)

" + +// muss mit GUI übereinstimmen +const int maxQuantityPlayersConst = 5; +// !!! in game.h ebenfalls bei playerArray[?] setzen !!! +// !!! in hand.h ebenfalls bei roundStartCashArray[?] setzen !!! + + +using namespace std; + +mainWindowImpl::mainWindowImpl(QMainWindow *parent, const char *name) + : QMainWindow(parent, name), actualGame(0), actualHand(0), mySession(0), maxQuantityPlayers(maxQuantityPlayersConst), gameSpeed(1), debugMode(0) +{ + + setupUi(this); + + int i; + + pushButton_raise->setDisabled(TRUE); + pushButton_call->setDisabled(TRUE); + pushButton_bet->setDisabled(TRUE); + pushButton_set->setDisabled(TRUE); + pushButton_fold->setDisabled(TRUE); + pushButton_allin->setDisabled(TRUE); + pushButton_check->setDisabled(TRUE); + + spinBox_set->setDisabled(TRUE); + + // userWidgetsArray init + userWidgetsArray[0] = pushButton_raise; + userWidgetsArray[1] = pushButton_call; + userWidgetsArray[2] = pushButton_bet; + userWidgetsArray[3] = pushButton_set; + userWidgetsArray[4] = pushButton_fold; + userWidgetsArray[5] = pushButton_allin; + userWidgetsArray[6] = pushButton_check; + userWidgetsArray[7] = spinBox_set; + + //Hintergrundfarbe der userWidgets anpassen; + for(i=0; i<=7; i++) { + QPalette tempPalette = userWidgetsArray[i]->palette(); + QColor tempColor = tempPalette.color(QPalette::Window); + tempPalette.setColor(QPalette::Button, tempColor); + userWidgetsArray[i]->setPalette(tempPalette); + } + + //Timer Objekt erstellen + potDistributeTimer = new QTimer(this); + + + // buttonLabelArray init + buttonLabelArray[0] = textLabel_Button0; + buttonLabelArray[1] = textLabel_Button1; + buttonLabelArray[2] = textLabel_Button2; + buttonLabelArray[3] = textLabel_Button3; + buttonLabelArray[4] = textLabel_Button4; + + // cashLabelArray init + cashLabelArray[0] = textLabel_Cash0; + cashLabelArray[1] = textLabel_Cash1; + cashLabelArray[2] = textLabel_Cash2; + cashLabelArray[3] = textLabel_Cash3; + cashLabelArray[4] = textLabel_Cash4; + + // cashTopLabelArray init + cashTopLabelArray[0] = textLabel_TopCash0; + cashTopLabelArray[1] = textLabel_TopCash1; + cashTopLabelArray[2] = textLabel_TopCash2; + cashTopLabelArray[3] = textLabel_TopCash3; + cashTopLabelArray[4] = textLabel_TopCash4; + + // setLabelArray init + setLabelArray[0] = textLabel_Set0; + setLabelArray[1] = textLabel_Set1; + setLabelArray[2] = textLabel_Set2; + setLabelArray[3] = textLabel_Set3; + setLabelArray[4] = textLabel_Set4; + + // statusLabelArray init + actionLabelArray[0] = textLabel_Status0; + actionLabelArray[1] = textLabel_Status1; + actionLabelArray[2] = textLabel_Status2; + actionLabelArray[3] = textLabel_Status3; + actionLabelArray[4] = textLabel_Status4; + + // GroupBoxArray init + groupBoxArray[0] = groupBox0; + groupBoxArray[1] = groupBox1; + groupBoxArray[2] = groupBox2; + groupBoxArray[3] = groupBox3; + groupBoxArray[4] = groupBox4; + + // boardCardsArray init + boardCardsArray[0] = pixmapLabel_cardBoard0; + boardCardsArray[1] = pixmapLabel_cardBoard1; + boardCardsArray[2] = pixmapLabel_cardBoard2; + boardCardsArray[3] = pixmapLabel_cardBoard3; + boardCardsArray[4] = pixmapLabel_cardBoard4; + + // holeCardsArray int + holeCardsArray[0][0] = pixmapLabel_card0a; + holeCardsArray[0][1] = pixmapLabel_card0b; + holeCardsArray[1][0] = pixmapLabel_card1a; + holeCardsArray[1][1] = pixmapLabel_card1b; + holeCardsArray[2][0] = pixmapLabel_card2a; + holeCardsArray[2][1] = pixmapLabel_card2b; + holeCardsArray[3][0] = pixmapLabel_card3a; + holeCardsArray[3][1] = pixmapLabel_card3b; + holeCardsArray[4][0] = pixmapLabel_card4a; + holeCardsArray[4][1] = pixmapLabel_card4b; + + // Farben initalisieren + active.setRgb(86,170,86); + inactive.setRgb(83,141,107); + highlight.setRgb(151,214,109); + + //firstCallNewGame Test init + firstCallNewGame = TRUE; + + + connect(potDistributeTimer, SIGNAL(timeout()), this, SLOT(postRiverRunAnimation5())); + + connect( actionNewGame, SIGNAL( activated() ), this, SLOT( callNewGameDialog() ) ); + connect( actionAboutPokerth, SIGNAL( activated() ), this, SLOT( callAboutPokerthDialog() ) ); + connect( actionQuit, SIGNAL( activated() ), qApp, SLOT( quit() ) ); + + connect( pushButton_raise, SIGNAL( clicked() ), this, SLOT( myRaise() ) ); + connect( pushButton_call, SIGNAL( clicked() ), this, SLOT( myCall() ) ); + connect( pushButton_bet, SIGNAL( clicked() ), this, SLOT( myBet() ) ); + connect( pushButton_set, SIGNAL( clicked() ), this, SLOT( mySet() ) ); + connect( pushButton_fold, SIGNAL( clicked() ), this, SLOT( myFold() ) ); + connect( pushButton_check, SIGNAL( clicked() ), this, SLOT( myCheck() ) ); + connect( pushButton_allin, SIGNAL( clicked() ), this, SLOT( myAllIn() ) ); + +// connect ( horizontalSlider_speed, (SIGNAL( valueChanged(int value), this, SLOT textLabel_speedSlider + +// tabWidget_2->hide(); +} + + +void mainWindowImpl::callNewGameDialog() { + + newGameDialogImpl *v = new newGameDialogImpl(); + v->exec(); + + if (v->result() == QDialog::Accepted ) { + + if(actualGame) { + mySession->deleteGame(); + actualGame = 0; + } + + //restliche Singleshots abfangen!!! + if (firstCallNewGame) { firstCallNewGame = FALSE; } + else { newRoundTimerBlock = TRUE; } + QTimer::singleShot(40*gameSpeed, this, SLOT( timerBlockerFalse() )); + + + label_Pot->setText("

Pot Total

"); + label_Sets->setText("

Sets:

"); + + gameSpeed = v->spinBox_gameSpeed->value()*10; +// debugMode = v->checkBox_debugMode->isChecked(); + + //Speeds + dealCardsSpeed = (gameSpeed/2)*10; //milliseconds + postRiverRunAnimationSpeed = gameSpeed*18; + winnerBlinkSpeed = gameSpeed*3; //milliseconds + newRoundSpeed = gameSpeed*35; + nextPlayerSpeed1 = 10; // Zeit zwischen dem Setzen des Spielers und dem Verdunkeln + nextPlayerSpeed2 = 4; // Zeit zwischen Verdunkeln des einen und aufhellen des anderen Spielers + nextPlayerSpeed3 = 7; // Zeit bis zwischen Aufhellen und Aktion + preflopNextPlayerSpeed = 10; // Zeit bis zwischen Aufhellen und Aktion im Preflop (etwas langsamer da nicht gerechnet wird. ) + + mySession->startGame(v->spinBox_quantityPlayers->value(), v->spinBox_startCash->value(), v->spinBox_smallBlind->value()); + + } + +} + +void mainWindowImpl::callAboutPokerthDialog() { + + aboutPokerthImpl *v = new aboutPokerthImpl(); + v->exec(); +} + + + +void mainWindowImpl::setGame(Game *g) { actualGame = g; } + +void mainWindowImpl::setHand(LocalHand* br) { actualHand = br; } + +void mainWindowImpl::setSession(Session* s) { mySession = s; } + +//refresh-Funktionen +void mainWindowImpl::refreshSet() { + + int i; + for (i=0; igetPlayerArray()[i]->getMySet() == 0) setLabelArray[i]->setText(""); + else setLabelArray[i]->setText("

Set: "+QString::number(actualHand->getPlayerArray()[i]->getMySet(),10)+" $

"); + } +} + +void mainWindowImpl::refreshButton() { + + QStringList buttonArray; + buttonArray << "" << "D" << "SB" << "BB"; + + int i; + for (i=0; isetText("

"+buttonArray[actualHand->getPlayerArray()[i]->getMyButton()]+"

"); } + +} + +void mainWindowImpl::refreshPlayerName() { + + int i; + for (i=1; isetTitle(QString::fromStdString(actualHand->getPlayerArray()[i]->getMyName())); + } + +} + +void mainWindowImpl::refreshAction() { + + QStringList actionArray; + actionArray << "" << "Fold" << "Check" << "Call" << "Bet" << "Raise" << "All-In"; + + int i; + for (i=0; isetText("

"+actionArray[actualHand->getPlayerArray()[i]->getMyAction()]+"

"); + + if (actualHand->getPlayerArray()[i]->getMyAction()==1) { + groupBoxArray[i]->setDisabled(TRUE); + QPixmap onePix(":/graphics/cards/1px.png"); + if(i != 0) { + holeCardsArray[i][0]->setPixmap(onePix); + holeCardsArray[i][1]->setPixmap(onePix); + } + + QColor c(199,199,199); + QPalette labelPalette = cashTopLabelArray[i]->palette(); + labelPalette.setColor(QPalette::WindowText, c); + cashTopLabelArray[i]->setPalette(labelPalette); + cashTopLabelArray[i]->setAutoFillBackground(FALSE); + } +// else { +// QColor c(0,0,0); +// QPalette labelPalette = cashTopLabelArray[i]->palette(); +// labelPalette.setColor(QPalette::WindowText, c); +// cashTopLabelArray[i]->setPalette(labelPalette); +// cashTopLabelArray[i]->setAutoFillBackground(FALSE); +// } + } + +} + +void mainWindowImpl::refreshCash() { + + int i; + for (i=0; igetPlayerArray()[i]->getMyActiveStatus()) { + + if (i==0) { + cashLabelArray[0]->setText("

"+QString::number(actualHand->getPlayerArray()[i]->getMyCash(),10)+" $

"); + cashTopLabelArray[0]->setText("

Cash:

"); + } + else { + cashLabelArray[i]->setText("

"+QString::number(actualHand->getPlayerArray()[i]->getMyCash(),10)+" $

"); + cashTopLabelArray[i]->setText("

Cash:

"); + } + } else { + cashLabelArray[i]->setText(""); + cashTopLabelArray[i]->setText(""); + } + } + +} + +void mainWindowImpl::refreshGroupbox() { + + int i; + for (i=0; isetEnabled(actualHand->getPlayerArray()[i]->getMyActiveStatus()); + if (actualHand->getPlayerArray()[i]->getMyAction() == 1) groupBoxArray[i]->setDisabled(TRUE); + + if(actualHand->getPlayerArray()[i]->getMyTurn()) { + //Groupbox aufhellen wenn der Spiele dran ist. + QPalette tempPalette = groupBoxArray[i]->palette(); + tempPalette.setColor(QPalette::Window, highlight); + groupBoxArray[i]->setPalette(tempPalette); + + } else { + //Groupbox auf Hintergrundfarbe setzen wenn der Spiele nicht dran aber aktiv ist. + if(actualHand->getPlayerArray()[i]->getMyActiveStatus()) { + QPalette tempPalette = groupBoxArray[i]->palette(); + tempPalette.setColor(QPalette::Window, active); + groupBoxArray[i]->setPalette(tempPalette); + } + //Groupbox verdunkeln wenn der Spiele inactive ist. + else { + QPalette tempPalette = groupBoxArray[i]->palette(); + tempPalette.setColor(QPalette::Window, inactive); + groupBoxArray[i]->setPalette(tempPalette); + } + } + } + + userWidgetsBackgroudColor(); + + +} + +void mainWindowImpl::highlightRoundLabel(QString round) { + + // für PostRiverRun (alte Runden stehen lassen) + if(round != "") { + + QPalette tempPalette = frame_handLabel->palette(); + tempPalette.setColor(QPalette::Window, highlight); + frame_handLabel->setPalette(tempPalette); + + textLabel_handLabel->setText("

"+round+"

"); + textLabel_gameNumber->setText("

Game: "+QString::number(actualHand->getMyID(),10)+"

"); + + } + +} + + +void mainWindowImpl::refreshAll() { + + refreshSet(); + refreshButton(); + refreshAction(); + refreshCash(); + refreshGroupbox(); + +} + +void mainWindowImpl::refreshChangePlayer() { + + refreshSet(); + refreshButton(); + refreshAction(); + refreshCash(); + +} + +void mainWindowImpl::refreshPot() { + + textLabel_Sets->setText("

"+QString::number(actualHand->getBoard()->getSets(),10)+" $

"); + textLabel_Pot->setText("

"+QString::number(actualHand->getBoard()->getPot(),10)+" $

"); + +} + + +void mainWindowImpl::dealHoleCards() { + + QPixmap flipside(":/othercards/cards/othercards/flipside.png"); + QPixmap onePix(":/graphics/cards/1px.png"); + + //TempArrays + QPixmap tempCardsPixmapArray[2]; + int tempCardsIntArray[2]; + + // Karten der Gegner austeilen + int i, j; + for(i=1; igetPlayerArray()[i]->getMyCards(tempCardsIntArray); + for(j=0; j<2; j++) { + if(actualHand->getPlayerArray()[i]->getMyActiveStatus()) { + if (debugMode) { + tempCardsPixmapArray[j].load(":/othercards/cards/othercards/"+QString::number(tempCardsIntArray[j], 10)+".png"); + holeCardsArray[i][j]->setPixmap(tempCardsPixmapArray[j]); + + } + else holeCardsArray[i][j]->setPixmap(flipside); + + } + else { + + holeCardsArray[i][j]->setPixmap(onePix); +// holeCardsArray[i][j]->repaint(); + } + + } + } + + // eigenen Karten austeilen + + actualHand->getPlayerArray()[0]->getMyCards(tempCardsIntArray); + for(i=0; i<2; i++) { + + if(actualHand->getPlayerArray()[0]->getMyActiveStatus()) { + + tempCardsPixmapArray[i].load(":/mycards/cards/mycards/"+QString::number(tempCardsIntArray[i], 10)+".png"); + holeCardsArray[0][i]->setPixmap(tempCardsPixmapArray[i]); + + } + else { + + holeCardsArray[0][i]->setPixmap(onePix); +// holeCardsArray[i][j]->repaint(); + } + } + +} + +void mainWindowImpl::dealFlopCards0() { + +if( !newRoundTimerBlock ){ + + QTimer::singleShot(500, this, SLOT( dealFlopCards1() )); +} +else { newRoundTimerBlock=FALSE; } +} + +void mainWindowImpl::dealFlopCards1() { + +if( !newRoundTimerBlock ){ + + QPixmap flipside(":/othercards/cards/othercards/flipside.png"); + boardCardsArray[0]->setPixmap(flipside); + QTimer::singleShot(dealCardsSpeed, this, SLOT( dealFlopCards2() )); +} +else { newRoundTimerBlock=FALSE; } + +} + +void mainWindowImpl::dealFlopCards2() { + +if( !newRoundTimerBlock ){ + + QPixmap flipside(":/othercards/cards/othercards/flipside.png"); + boardCardsArray[1]->setPixmap(flipside); + QTimer::singleShot(dealCardsSpeed, this, SLOT( dealFlopCards3() )); +} +else { newRoundTimerBlock=FALSE; } + +} + +void mainWindowImpl::dealFlopCards3() { + +if( !newRoundTimerBlock ){ + + QPixmap flipside(":/othercards/cards/othercards/flipside.png"); + boardCardsArray[2]->setPixmap(flipside); + QTimer::singleShot(dealCardsSpeed, this, SLOT( dealFlopCards4() )); + +} +else { newRoundTimerBlock=FALSE; } + +} + +void mainWindowImpl::dealFlopCards4() { + +if( !newRoundTimerBlock ){ + + int tempBoardCardsArray[5]; + QPixmap tempCardsPixmap; + actualHand->getBoard()->getMyCards(tempBoardCardsArray); + tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[0], 10)+".png"); + QPixmap card(tempCardsPixmap); + boardCardsArray[0]->setPixmap(card); + QTimer::singleShot(dealCardsSpeed, this, SLOT( dealFlopCards5() )); +} +else { newRoundTimerBlock=FALSE; } + +} + +void mainWindowImpl::dealFlopCards5() { + +if( !newRoundTimerBlock ){ + + int tempBoardCardsArray[5]; + QPixmap tempCardsPixmap; + actualHand->getBoard()->getMyCards(tempBoardCardsArray); + tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[1], 10)+".png"); + QPixmap card(tempCardsPixmap); + boardCardsArray[1]->setPixmap(card); + QTimer::singleShot(dealCardsSpeed, this, SLOT( dealFlopCards6() )); + +} +else { newRoundTimerBlock=FALSE; } + +} + +void mainWindowImpl::dealFlopCards6() { + +if( !newRoundTimerBlock ){ + + int tempBoardCardsArray[5]; + QPixmap tempCardsPixmap; + actualHand->getBoard()->getMyCards(tempBoardCardsArray); + tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[2], 10)+".png"); + QPixmap card(tempCardsPixmap); + boardCardsArray[2]->setPixmap(card); + + // stable + // wenn alle All In + if(actualHand->getAllInCondition()) { + QTimer::singleShot(1000, this, SLOT( handSwitchRounds() )); + } + // sonst normale Variante + else { + QTimer::singleShot(1, this, SLOT( handSwitchRounds() )); + } + +} +else { newRoundTimerBlock=FALSE; } + +} + + +void mainWindowImpl::dealTurnCards0() { + +if( !newRoundTimerBlock ){ + + QTimer::singleShot(500, this, SLOT( dealTurnCards1() )); +} +else { newRoundTimerBlock=FALSE; } +} + + +void mainWindowImpl::dealTurnCards1() { + +if( !newRoundTimerBlock ){ + + QPixmap flipside(":/othercards/cards/othercards/flipside.png"); + boardCardsArray[3]->setPixmap(flipside); + QTimer::singleShot(dealCardsSpeed, this, SLOT( dealTurnCards2() )); +} +else { newRoundTimerBlock=FALSE; } + +} + +void mainWindowImpl::dealTurnCards2() { + +if( !newRoundTimerBlock ){ + + int tempBoardCardsArray[5]; + QPixmap tempCardsPixmap; + actualHand->getBoard()->getMyCards(tempBoardCardsArray); + tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[3], 10)+".png"); + QPixmap card(tempCardsPixmap); + boardCardsArray[3]->setPixmap(card); + + // stable + // wenn alle All In + if(actualHand->getAllInCondition()) { + QTimer::singleShot(1000, this, SLOT( handSwitchRounds() )); + } + // sonst normale Variante + else { + QTimer::singleShot(1, this, SLOT( handSwitchRounds() )); + } +} +else { newRoundTimerBlock=FALSE; } + +} + + +void mainWindowImpl::dealRiverCards0() { + +if( !newRoundTimerBlock ){ + + QTimer::singleShot(500, this, SLOT( dealRiverCards1() )); +} +else { newRoundTimerBlock=FALSE; } +} + +void mainWindowImpl::dealRiverCards1() { + +if( !newRoundTimerBlock ){ + + QPixmap flipside(":/othercards/cards/othercards/flipside.png"); + boardCardsArray[4]->setPixmap(flipside); + QTimer::singleShot(dealCardsSpeed, this, SLOT( dealRiverCards2() )); + +} +else { newRoundTimerBlock=FALSE; } + +} + +void mainWindowImpl::dealRiverCards2() { + +if( !newRoundTimerBlock ){ + + int tempBoardCardsArray[5]; + QPixmap tempCardsPixmap; + actualHand->getBoard()->getMyCards(tempBoardCardsArray); + tempCardsPixmap.load(":/othercards/cards/othercards/"+QString::number(tempBoardCardsArray[4], 10)+".png"); + QPixmap card(tempCardsPixmap); + boardCardsArray[4]->setPixmap(card); + + + // stable + // wenn alle All In + if(actualHand->getAllInCondition()) { + QTimer::singleShot(1000, this, SLOT( handSwitchRounds() )); + } + // sonst normale Variante + else { + QTimer::singleShot(1, this, SLOT( handSwitchRounds() )); + } + +} +else { newRoundTimerBlock=FALSE; } + + +} + +void mainWindowImpl::meInAction() { + + + switch (actualHand->getActualRound()) { + + case 0: { + if (actualHand->getPlayerArray()[0]->getMyCash()+actualHand->getPlayerArray()[0]->getMySet() > actualHand->getPreflop()->getHighestSet()) { pushButton_raise->setEnabled(TRUE); } + + if ( actualHand->getPlayerArray()[0]->getMySet()== actualHand->getPreflop()->getHighestSet() && actualHand->getPlayerArray()[0]->getMyButton() == 3) { pushButton_check->setEnabled(TRUE); } + else { pushButton_call->setEnabled(TRUE); } + pushButton_fold->setEnabled(TRUE); + } + break; + case 1: { + + pushButton_fold->setEnabled(TRUE); + +// cout << "highestSet in meInAction " << actualHand->getFlop()->getHighestSet() << endl; + if (actualHand->getFlop()->getHighestSet() == 0) { + pushButton_check->setEnabled(TRUE); + pushButton_bet->setEnabled(TRUE); + } + if (actualHand->getFlop()->getHighestSet() > 0 && actualHand->getFlop()->getHighestSet() > actualHand->getPlayerArray()[0]->getMySet()) { + pushButton_call->setEnabled(TRUE); + if (actualHand->getPlayerArray()[0]->getMyCash()+actualHand->getPlayerArray()[0]->getMySet() > actualHand->getPreflop()->getHighestSet()) { pushButton_raise->setEnabled(TRUE); } + } + + + + } + break; + case 2: { + + pushButton_fold->setEnabled(TRUE); + +// cout << "highestSet in meInAction " << actualHand->getFlop()->getHighestSet() << endl; + if (actualHand->getTurn()->getHighestSet() == 0) { + pushButton_check->setEnabled(TRUE); + pushButton_bet->setEnabled(TRUE); + } + if (actualHand->getTurn()->getHighestSet() > 0 && actualHand->getTurn()->getHighestSet() > actualHand->getPlayerArray()[0]->getMySet()) { + pushButton_call->setEnabled(TRUE); + if (actualHand->getPlayerArray()[0]->getMyCash()+actualHand->getPlayerArray()[0]->getMySet() > actualHand->getPreflop()->getHighestSet()) { pushButton_raise->setEnabled(TRUE); } + } + + + + } + break; + case 3: { + + pushButton_fold->setEnabled(TRUE); + +// cout << "highestSet in meInAction " << actualHand->getFlop()->getHighestSet() << endl; + if (actualHand->getRiver()->getHighestSet() == 0) { + pushButton_check->setEnabled(TRUE); + pushButton_bet->setEnabled(TRUE); + } + if (actualHand->getRiver()->getHighestSet() > 0 && actualHand->getRiver()->getHighestSet() > actualHand->getPlayerArray()[0]->getMySet()) { + pushButton_call->setEnabled(TRUE); + if (actualHand->getPlayerArray()[0]->getMyCash()+actualHand->getPlayerArray()[0]->getMySet() > actualHand->getPreflop()->getHighestSet()) { pushButton_raise->setEnabled(TRUE); } + } + + + + } + break; + default: {} + + } + + //Hintergrundfarbe der userWidgets anpassen; + userWidgetsBackgroudColor(); + +} + +void mainWindowImpl::disableMyButtons() { + + pushButton_raise->setDisabled(TRUE); + pushButton_call->setDisabled(TRUE); + pushButton_bet->setDisabled(TRUE); + pushButton_set->setDisabled(TRUE); + pushButton_fold->setDisabled(TRUE); + pushButton_allin->setDisabled(TRUE); + pushButton_check->setDisabled(TRUE); + spinBox_set->setMinimum(0); + spinBox_set->setValue(0); + spinBox_set->setDisabled(TRUE); + + userWidgetsBackgroudColor(); +} + +void mainWindowImpl::myFold(){ + + actualHand->getPlayerArray()[0]->setMyAction(1); + actualHand->getPlayerArray()[0]->setMyTurn(0); + + disableMyButtons(); + + //Spiel läuft weiter + nextPlayerAnimation(); +} + +void mainWindowImpl::myCheck() { + + actualHand->getPlayerArray()[0]->setMyAction(2); + actualHand->getPlayerArray()[0]->setMyTurn(0); + + disableMyButtons(); + + //Spiel läuft weiter + nextPlayerAnimation(); +} +void mainWindowImpl::myCall(){ + + int tempHighestSet = 0; + switch (actualHand->getActualRound()) { + + case 0: {tempHighestSet = actualHand->getPreflop()->getHighestSet();} + break; + case 1: {tempHighestSet = actualHand->getFlop()->getHighestSet();} + break; + case 2: {tempHighestSet = actualHand->getTurn()->getHighestSet();} + break; + case 3: {tempHighestSet = actualHand->getRiver()->getHighestSet();} + break; + default: {} + } + + if (actualHand->getPlayerArray()[0]->getMyCash()+actualHand->getPlayerArray()[0]->getMySet() <= tempHighestSet) { + + actualHand->getPlayerArray()[0]->setMyAction(6); + actualHand->getPlayerArray()[0]->setMySet(actualHand->getPlayerArray()[0]->getMyCash()); + actualHand->getPlayerArray()[0]->setMyCash(0); + } + else { + actualHand->getPlayerArray()[0]->setMySet(tempHighestSet - actualHand->getPlayerArray()[0]->getMySet()); + actualHand->getPlayerArray()[0]->setMyAction(3); + } + actualHand->getPlayerArray()[0]->setMyTurn(0); + + actualHand->getBoard()->collectSets(); + refreshPot(); + + disableMyButtons(); + + //Spiel läuft weiter + nextPlayerAnimation(); +} + +void mainWindowImpl::myBet(){ + + pushButton_bet->setDisabled(TRUE); + + pushButton_set->setEnabled(TRUE); + pushButton_allin->setEnabled(TRUE); + spinBox_set->setEnabled(TRUE); + + //Hintergrundfarbe anpassen; + userWidgetsBackgroudColor(); + + + if (actualHand->getActualRound() <= 2 ) { spinBox_set->setMinimum(actualHand->getSmallBlind()*2); } + else { spinBox_set->setMinimum(actualHand->getSmallBlind()*4); } + + spinBox_set->setMaximum(actualHand->getPlayerArray()[0]->getMyCash()); + spinBox_set->setValue(spinBox_set->minimum()); + spinBox_set->setFocus(); + spinBox_set->selectAll(); + + actualHand->getPlayerArray()[0]->setMyAction(4); + +} + +void mainWindowImpl::myRaise(){ + + pushButton_raise->setDisabled(TRUE); + + pushButton_set->setEnabled(TRUE); + pushButton_allin->setEnabled(TRUE); + spinBox_set->setEnabled(TRUE); + + //Hintergrundfarbe der userWidgets anpassen; + userWidgetsBackgroudColor(); + + + int tempHighestSet = 0; + switch (actualHand->getActualRound()) { + + case 0: {tempHighestSet = actualHand->getPreflop()->getHighestSet();} + break; + case 1: {tempHighestSet = actualHand->getFlop()->getHighestSet();} + break; + case 2: {tempHighestSet = actualHand->getTurn()->getHighestSet();} + break; + case 3: {tempHighestSet = actualHand->getRiver()->getHighestSet();} + break; + default: {} + } + + spinBox_set->setMinimum(tempHighestSet*2 - actualHand->getPlayerArray()[0]->getMySet()); + spinBox_set->setMaximum(actualHand->getPlayerArray()[0]->getMyCash()); + spinBox_set->setValue(spinBox_set->minimum()); + spinBox_set->setFocus(); + spinBox_set->selectAll(); + + actualHand->getPlayerArray()[0]->setMyAction(5); + +} + +void mainWindowImpl::mySet(){ + + int tempCash = actualHand->getPlayerArray()[0]->getMyCash(); + +// cout << "Set-Value " << spinBox_set->value() << endl; + actualHand->getPlayerArray()[0]->setMySet(spinBox_set->value()); +// cout << "MySET " << actualHand->getPlayerArray()[0]->getMySet() << endl; + if (spinBox_set->value() >= tempCash ) { + + actualHand->getPlayerArray()[0]->setMyAction(6); + actualHand->getPlayerArray()[0]->setMySet(actualHand->getPlayerArray()[0]->getMyCash()); + actualHand->getPlayerArray()[0]->setMyCash(0); + + } + + switch (actualHand->getActualRound()) { + + case 0: {actualHand->getPreflop()->setHighestSet(actualHand->getPlayerArray()[0]->getMySet());} + break; + case 1: {actualHand->getFlop()->setHighestSet( actualHand->getPlayerArray()[0]->getMySet());} + break; + case 2: {actualHand->getTurn()->setHighestSet( actualHand->getPlayerArray()[0]->getMySet());} + break; + case 3: {actualHand->getRiver()->setHighestSet( actualHand->getPlayerArray()[0]->getMySet());} + break; + default: {} + } + + + actualHand->getPlayerArray()[0]->setMyTurn(0); + + actualHand->getBoard()->collectSets(); + refreshPot(); + + disableMyButtons(); + + //Spiel läuft weiter + nextPlayerAnimation(); +} + +void mainWindowImpl::myAllIn(){ + + actualHand->getPlayerArray()[0]->setMyAction(6); + actualHand->getPlayerArray()[0]->setMySet(actualHand->getPlayerArray()[0]->getMyCash()); + actualHand->getPlayerArray()[0]->setMyCash(0); + + switch (actualHand->getActualRound()) { + + case 0: {if(actualHand->getPlayerArray()[0]->getMySet() > actualHand->getPreflop()->getHighestSet()) actualHand->getPreflop()->setHighestSet(actualHand->getPlayerArray()[0]->getMySet());} + break; + case 1: {if(actualHand->getPlayerArray()[0]->getMySet() > actualHand->getFlop()->getHighestSet()) actualHand->getFlop()->setHighestSet(actualHand->getPlayerArray()[0]->getMySet());} + break; + case 2: {if(actualHand->getPlayerArray()[0]->getMySet() > actualHand->getTurn()->getHighestSet()) actualHand->getTurn()->setHighestSet(actualHand->getPlayerArray()[0]->getMySet());} + break; + case 3: {if(actualHand->getPlayerArray()[0]->getMySet() > actualHand->getRiver()->getHighestSet()) actualHand->getRiver()->setHighestSet(actualHand->getPlayerArray()[0]->getMySet());} + break; + default: {} + } + + actualHand->getPlayerArray()[0]->setMyTurn(0); + + actualHand->getBoard()->collectSets(); + refreshPot(); + + disableMyButtons(); + + //Spiel läuft weiter + nextPlayerAnimation(); +} + +void mainWindowImpl::nextPlayerAnimation() { + + refreshChangePlayer(); + + //weiter mit switchrounds in Hand + QTimer::singleShot(gameSpeed*nextPlayerSpeed1, this, SLOT( handSwitchRounds() )); +} + +void mainWindowImpl::preflopAnimation1() { QTimer::singleShot(gameSpeed*nextPlayerSpeed2, this, SLOT(preflopAnimation1Action())); } +void mainWindowImpl::preflopAnimation1Action() { actualHand->getPreflop()->preflopRun(); } + +void mainWindowImpl::preflopAnimation2() { QTimer::singleShot(gameSpeed*preflopNextPlayerSpeed, this, SLOT(preflopAnimation2Action())); } +void mainWindowImpl::preflopAnimation2Action() { actualHand->getPreflop()->nextPlayer2(); } + + +void mainWindowImpl::flopAnimation1() { QTimer::singleShot(gameSpeed*nextPlayerSpeed2, this, SLOT(flopAnimation1Action())); } +void mainWindowImpl::flopAnimation1Action() { actualHand->getFlop()->flopRun(); } + +void mainWindowImpl::flopAnimation2() { QTimer::singleShot(gameSpeed*nextPlayerSpeed3, this, SLOT(flopAnimation2Action())); } +void mainWindowImpl::flopAnimation2Action() { actualHand->getFlop()->nextPlayer2(); } + + +void mainWindowImpl::turnAnimation1() { QTimer::singleShot(gameSpeed*nextPlayerSpeed2, this, SLOT(turnAnimation1Action())); } +void mainWindowImpl::turnAnimation1Action() { actualHand->getTurn()->turnRun(); } + +void mainWindowImpl::turnAnimation2() { QTimer::singleShot(gameSpeed*nextPlayerSpeed3, this, SLOT(turnAnimation2Action())); } +void mainWindowImpl::turnAnimation2Action() { actualHand->getTurn()->nextPlayer2(); } + + +void mainWindowImpl::riverAnimation1() { QTimer::singleShot(gameSpeed*nextPlayerSpeed2, this, SLOT(riverAnimation1Action())); } +void mainWindowImpl::riverAnimation1Action() { actualHand->getRiver()->riverRun(); } + +void mainWindowImpl::riverAnimation2() { QTimer::singleShot(gameSpeed*nextPlayerSpeed3, this, SLOT(riverAnimation2Action())); } +void mainWindowImpl::riverAnimation2Action() { actualHand->getRiver()->nextPlayer2(); } + + +void mainWindowImpl::postRiverAnimation1() { QTimer::singleShot(gameSpeed*nextPlayerSpeed2, this, SLOT(postRiverAnimation1Action())); } +void mainWindowImpl::postRiverAnimation1Action() { actualHand->getRiver()->postRiverRun(); } + + +void mainWindowImpl::postRiverRunAnimation1() { + + //RoundsLabel mit "River" dunkel machen + QPalette tempPalette = frame_handLabel->palette(); + tempPalette.setColor(QPalette::Window, active); + frame_handLabel->setPalette(tempPalette); + + //PotLabel aufhellen! + tempPalette = frame_Pot->palette(); + tempPalette.setColor(QPalette::Window, highlight); + frame_Pot->setPalette(tempPalette); + + + + QTimer::singleShot(postRiverRunAnimationSpeed, this, SLOT( postRiverRunAnimation2() )); + +} + +void mainWindowImpl::postRiverRunAnimation2() { + +if( !newRoundTimerBlock ){ + + int i; + + //Aktive Spieler zählen --> wenn nur noch einer nicht-folded dann keine Karten umdrehen + int activePlayersCounter = 0; + for (i=0; igetPlayerArray()[i]->getMyAction() != 1 && actualHand->getPlayerArray()[i]->getMyActiveStatus() == 1) activePlayersCounter++; + } + + if(activePlayersCounter!=1) { + + //Karten der aktiven Spieler umdrehen + QPixmap onePix(":/graphics/cards/1px.png"); + + //TempArrays + QPixmap tempCardsPixmapArray[2]; + int tempCardsIntArray[2]; + + int i, j; + for(i=1; igetPlayerArray()[i]->getMyCards(tempCardsIntArray); + for(j=0; j<2; j++) { + if(actualHand->getPlayerArray()[i]->getMyActiveStatus() && actualHand->getPlayerArray()[i]->getMyAction() != 1) { + + tempCardsPixmapArray[j].load(":/othercards/cards/othercards/"+QString::number(tempCardsIntArray[j], 10)+".png"); + holeCardsArray[i][j]->setPixmap(tempCardsPixmapArray[j]); + + } + } + } + QTimer::singleShot(postRiverRunAnimationSpeed, this, SLOT( postRiverRunAnimation3() )); + } + else { postRiverRunAnimation3(); } +} +else { newRoundTimerBlock=FALSE; } + +} + +void mainWindowImpl::postRiverRunAnimation3() { + +if( !newRoundTimerBlock ){ + + int i; + + //Alle Winner erhellen und "Winner" schreiben + for(i=0; igetPlayerArray()[i]->getMyActiveStatus() && actualHand->getPlayerArray()[i]->getMyAction() != 1 && actualHand->getPlayerArray()[i]->getMyCardsValueInt() == actualHand->getRiver()->getHighestCardsValue() ) { + QPalette tempPalette = groupBoxArray[i]->palette(); + tempPalette.setColor(QPalette::Window, highlight); + groupBoxArray[i]->setPalette(tempPalette); + actionLabelArray[i]->setText("

- Winner -

"); + } + } + + //Hintergrundfarbe der userWidgets anpassen; + userWidgetsBackgroudColor(); + + QTimer::singleShot(postRiverRunAnimationSpeed/2, this, SLOT( postRiverRunAnimation4() )); +} +else { newRoundTimerBlock=FALSE; } + +} + +void mainWindowImpl::postRiverRunAnimation4() { + +if( !newRoundTimerBlock ){ + + distributePotAnimCounter=0; + potDistributeTimer->start(winnerBlinkSpeed); + +} +else { newRoundTimerBlock=FALSE; } + +} + +void mainWindowImpl::postRiverRunAnimation5() { + +if( !newRoundTimerBlock ){ + + int i; + + //CashTopLabel und PotLabel blinken lassen + if (distributePotAnimCounter<10) { + + if (distributePotAnimCounter==0 || distributePotAnimCounter==2 || distributePotAnimCounter==4 || distributePotAnimCounter==6 || distributePotAnimCounter==8) { + + QPalette labelPalette = label_Pot->palette(); + labelPalette.setColor(QPalette::WindowText, highlight); + label_Pot->setPalette(labelPalette); + + for(i=0; igetPlayerArray()[i]->getMyActiveStatus() && actualHand->getPlayerArray()[i]->getMyAction() != 1 && actualHand->getPlayerArray()[i]->getMyCardsValueInt() == actualHand->getRiver()->getHighestCardsValue() ) { + + cashTopLabelArray[i]->setAutoFillBackground(TRUE); + QPalette labelPalette = cashTopLabelArray[i]->palette(); + labelPalette.setColor(QPalette::WindowText, highlight); + cashTopLabelArray[i]->setPalette(labelPalette); + + } + } + } + else { + + QColor c(0,0,0); + QPalette labelPalette = label_Pot->palette(); + labelPalette.setColor(QPalette::WindowText, c); + label_Pot->setPalette(labelPalette); + + for(i=0; igetPlayerArray()[i]->getMyActiveStatus() && actualHand->getPlayerArray()[i]->getMyAction() != 1 && actualHand->getPlayerArray()[i]->getMyCardsValueInt() == actualHand->getRiver()->getHighestCardsValue() ) { + + QPalette labelPalette = cashTopLabelArray[i]->palette(); + labelPalette.setColor(QPalette::WindowText, c); + cashTopLabelArray[i]->setPalette(labelPalette); + cashTopLabelArray[i]->setAutoFillBackground(FALSE); + } + } + } + + distributePotAnimCounter++; + } + else { + potDistributeTimer->stop(); + QTimer::singleShot(gameSpeed, this, SLOT( postRiverRunAnimation6() )); + } + +} +else { + potDistributeTimer->stop(); + newRoundTimerBlock=TRUE; +} + + +} + +void mainWindowImpl::postRiverRunAnimation6() { + +if( !newRoundTimerBlock ){ + + int i; + refreshCash(); + refreshPot(); + + // wenn nur noch ein Spieler aktive "neues Spiel"-Dialog anzeigen + int playersPositiveCashCounter = 0; + for (i=0; igetStartQuantityPlayers(); i++) { + + if (actualHand->getPlayerArray()[i]->getMyCash() > 0) playersPositiveCashCounter++; + } + if (playersPositiveCashCounter==1) { + + callNewGameDialog(); + } + //sonst + else { + + } + QTimer::singleShot(newRoundSpeed, this, SLOT( startNewHand() )); + +} +else { newRoundTimerBlock=FALSE; } + +} + + +void mainWindowImpl::startNewHand() { + +if( !newRoundTimerBlock ){ + + actualGame->startHand(); +} +else { newRoundTimerBlock=FALSE; } + +} + +void mainWindowImpl::handSwitchRounds() { actualHand->switchRounds(); } + +void mainWindowImpl::nextRoundCleanGui() { + + int i; + + // GUI bereinigen + QPixmap onePix(":/graphics/cards/1px.png"); + for (i=0; i<5; i++ ) { boardCardsArray[i]->setPixmap(onePix); } + + QColor c(0,0,0); + for(i=0; ipalette(); + labelPalette.setColor(QPalette::WindowText, c); + cashTopLabelArray[i]->setPalette(labelPalette); + } + + QPalette labelPalette = label_Pot->palette(); + labelPalette.setColor(QPalette::WindowText, c); + label_Pot->setPalette(labelPalette); + + disableMyButtons(); + + QPalette tempPalette = frame_Pot->palette(); + tempPalette.setColor(QPalette::Window, active); + frame_Pot->setPalette(tempPalette); + + textLabel_handLabel->setText("

"); + + tempPalette = frame_handLabel->palette(); + tempPalette.setColor(QPalette::Window, active); + frame_handLabel->setPalette(tempPalette); + + refreshAll(); + +} + +void mainWindowImpl::userWidgetsBackgroudColor() { + + + int i; + for(i=0; i<=7; i++) { + + QPalette tempPalette = userWidgetsArray[i]->palette(); + + if (actualHand->getPlayerArray()[0]->getMyTurn() && userWidgetsArray[i]->isEnabled()) { + //Farbe der Buttons wenn der Spieler dran ist. + QColor tempColor(203,237,180); + tempPalette.setColor(QPalette::Button, tempColor); + } + else { + QColor tempColor = tempPalette.color(QPalette::Window); + tempPalette.setColor(QPalette::Button, tempColor); + + } + userWidgetsArray[i]->setPalette(tempPalette); + } +} + +void mainWindowImpl::timerBlockerFalse() { + + newRoundTimerBlock=FALSE; + +} diff --git a/src/gui/mainwindowimpl.h b/src/gui/mainwindowimpl.h new file mode 100755 index 00000000..03e1a359 --- /dev/null +++ b/src/gui/mainwindowimpl.h @@ -0,0 +1,192 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef MAINWINDOWIMPL_H +#define MAINWINDOWIMPL_H + +#include "ui_mainwindow.h" +#include + +#include +#include + +/*#include "newgamedialogimpl.h" +#include "aboutpokerthimpl.h" +#include "game.h" +#include "localhand.h" +#include "session.h"*/ +//#include "player.h" +//#include "board.h" + +class Game; +class LocalHand; +class Session; +class QColor; + +class mainWindowImpl: public QMainWindow, public Ui::mainWindow { +Q_OBJECT +public: + mainWindowImpl(QMainWindow *parent = 0, const char *name = 0 ); + void setGame(Game*); + void setHand(LocalHand*); + void setSession(Session*); + + + int getMaxQuantityPlayers() const { return maxQuantityPlayers; } + + int getGameSpeed() const { return gameSpeed; } + int getPreflopNextPlayerSpeed() const { return preflopNextPlayerSpeed; } + int getNextPlayerSpeed1() const { return nextPlayerSpeed1; } + int getNextPlayerSpeed2() const { return nextPlayerSpeed2; } + int getNextPlayerSpeed3() const { return nextPlayerSpeed3; } + + //refresh-Funktionen + void refreshSet(); + void refreshButton(); + void refreshPlayerName(); + void refreshAction(); + void refreshCash(); + void refreshGroupbox(); + void refreshAll(); + void refreshChangePlayer(); + void refreshPot(); + + // Karten-Funktionen + void dealHoleCards(); + + //Spieler-Funktionen + void meInAction(); + void disableMyButtons(); + + void highlightRoundLabel(QString); + +public slots: + + void callNewGameDialog() ; + void callAboutPokerthDialog(); + void myFold(); + void myCheck(); + void myCall(); + void myBet(); + void mySet(); + void myRaise(); + void myAllIn(); + + void dealFlopCards0(); + void dealFlopCards1(); + void dealFlopCards2(); + void dealFlopCards3(); + void dealFlopCards4(); + void dealFlopCards5(); + void dealFlopCards6(); + + void dealTurnCards0(); + void dealTurnCards1(); + void dealTurnCards2(); + + void dealRiverCards0(); + void dealRiverCards1(); + void dealRiverCards2(); + + void nextPlayerAnimation(); + + void preflopAnimation1(); + void preflopAnimation1Action(); + void preflopAnimation2(); + void preflopAnimation2Action(); + + void flopAnimation1(); + void flopAnimation1Action(); + void flopAnimation2(); + void flopAnimation2Action(); + + void turnAnimation1(); + void turnAnimation1Action(); + void turnAnimation2(); + void turnAnimation2Action(); + + void riverAnimation1(); + void riverAnimation1Action(); + void riverAnimation2(); + void riverAnimation2Action(); + + void postRiverAnimation1(); + void postRiverAnimation1Action(); + + void postRiverRunAnimation1(); + void postRiverRunAnimation2(); + void postRiverRunAnimation3(); + void postRiverRunAnimation4(); + void postRiverRunAnimation5(); + void postRiverRunAnimation6(); + + void handSwitchRounds(); + + void startNewHand(); + void nextRoundCleanGui(); + + void userWidgetsBackgroudColor(); + void timerBlockerFalse(); + + +private: + + Game *actualGame; + LocalHand *actualHand; + Session *mySession; + + + QTimer *potDistributeTimer; + + QWidget *userWidgetsArray[8]; + QLabel *buttonLabelArray[5]; + QLabel *cashLabelArray[5]; + QLabel *cashTopLabelArray[5]; + QLabel *setLabelArray[5]; + QLabel *actionLabelArray[5]; + QGroupBox *groupBoxArray[5]; + QLabel *boardCardsArray[5]; + QLabel *holeCardsArray[5][2]; + + int maxQuantityPlayers; + + int distributePotAnimCounter; + + //Speed + int gameSpeed; + int dealCardsSpeed; + int postRiverRunAnimationSpeed; + int winnerBlinkSpeed; + int newRoundSpeed; + int nextPlayerSpeed1; + int nextPlayerSpeed2; + int nextPlayerSpeed3; + int preflopNextPlayerSpeed; + int nextOpponentSpeed; + + bool firstCallNewGame; + bool newRoundTimerBlock; + bool debugMode; + + QColor active; + QColor inactive; + QColor highlight; +}; + +#endif diff --git a/src/gui/newgamedialog.ui b/src/gui/newgamedialog.ui new file mode 100755 index 00000000..47b4be57 --- /dev/null +++ b/src/gui/newgamedialog.ui @@ -0,0 +1,217 @@ + + newGameDialog + + + + 0 + 0 + 212 + 212 + + + + Start New Game + + + true + + + + 9 + + + 6 + + + + + Game-Settings + + + + 9 + + + 6 + + + + + 5 + + + 2 + + + 5 + + + + + + + 500 + + + 5 + + + 10 + + + + + + + 5000 + + + 1000 + + + 2000 + + + + + + + Number of Players + + + + + + + Game-Speed + + + + + + + Small Blind + + + + + + + Start Cash + + + + + + + 10 + + + 1 + + + 1 + + + 7 + + + + + + + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + O&K + + + Alt+K + + + true + + + true + + + + + + + Cancel + + + + + + true + + + + + + + + + qPixmapFromMimeSource + + + + buttonOk + clicked() + newGameDialog + accept() + + + 129 + 176 + + + 137 + 100 + + + + + buttonCancel + clicked() + newGameDialog + reject() + + + 222 + 176 + + + 137 + 100 + + + + + diff --git a/src/gui/newgamedialogimpl.cpp b/src/gui/newgamedialogimpl.cpp new file mode 100755 index 00000000..ff030281 --- /dev/null +++ b/src/gui/newgamedialogimpl.cpp @@ -0,0 +1,29 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "newgamedialogimpl.h" + +newGameDialogImpl::newGameDialogImpl(QWidget *parent, const char *name) + : QDialog(parent, name) +{ + + setupUi(this); + +} + diff --git a/src/gui/newgamedialogimpl.h b/src/gui/newgamedialogimpl.h new file mode 100755 index 00000000..39820ae1 --- /dev/null +++ b/src/gui/newgamedialogimpl.h @@ -0,0 +1,39 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef NEWGAMEDIALOGIMPL_H +#define NEWGAMEDIALOGIMPL_H + +#include "ui_newgamedialog.h" + +#include +#include +#include + + +class newGameDialogImpl: public QDialog, public Ui::newGameDialog { +Q_OBJECT +public: + newGameDialogImpl(QWidget *parent = 0, const char *name = 0); + +public slots: + +}; + +#endif diff --git a/src/local_engine/cardsvalue.cpp b/src/local_engine/cardsvalue.cpp new file mode 100755 index 00000000..9b35dd41 --- /dev/null +++ b/src/local_engine/cardsvalue.cpp @@ -0,0 +1,335 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "cardsvalue.h" + +CardsValue::CardsValue() +{ +} + + +CardsValue::~CardsValue() +{ +} + +int CardsValue::holeCardsClass(int one, int two) { + + if((one-1)%13<(two-1)%13) { + int temp = one; + one = two; + two = temp; + } + + + if((one-1)%13 == (two-1)%13) { + if((one-1)%13+2 > 10) return 10; + else { + switch((one-1)%13+2) { + case 10: return 9; + case 9: return 8; + case 8: return 7; + case 7: return 6; + default: return 5; + } + } + } + switch((one-1)%13+2) { + //Ass + case 14: { + if((one-1)/13 == (two-1)/13) { + switch((one-1)%13-(two-1)%13) { + case 1: return 10; + case 2: return 9; + case 3: return 9; + case 4: return 8; + default: return 7; + } + } + else { + switch((one-1)%13-(two-1)%13) { + case 1: return 9; + case 2: return 8; + case 3: return 7; + case 4: return 7; + default: return 4; + } + } + } break; + //König + case 13: { + if((one-1)/13 == (two-1)/13) { + switch((one-1)%13-(two-1)%13) { + case 1: return 9; + case 2: return 8; + case 3: return 8; + case 4: return 6; + default: return 5; + } + } + else { + switch((one-1)%13-(two-1)%13) { + case 1: return 7; + case 2: return 6; + case 3: return 6; + default: return 4; + } + } + } break; + //Dame + case 12: { + if((one-1)/13 == (two-1)/13) { + switch((one-1)%13-(two-1)%13) { + case 1: return 8; + case 2: return 7; + case 3: return 6; + case 4: return 5; + default: return 4; + } + } + else { + switch((one-1)%13-(two-1)%13) { + case 1: return 6; + case 2: return 6; + case 3: return 4; + default: return 3; + } + } + } break; + //Bube + case 11: { + if((one-1)/13 == (two-1)/13) { + switch((one-1)%13-(two-1)%13) { + case 1: return 7; + case 2: return 6; + case 3: return 5; + case 4: return 4; + default: return 3; + } + } + else { + switch((one-1)%13-(two-1)%13) { + case 1: return 6; + case 2: return 5; + case 3: return 4; + default: return 2; + } + } + } break; + //10 + case 10: { + if((one-1)/13 == (two-1)/13) { + switch((one-1)%13-(two-1)%13) { + case 1: return 6; + case 2: return 5; + default: return 2; + } + } + else { + switch((one-1)%13-(two-1)%13) { + case 1: return 5; + case 2: return 4; + default: return 1; + } + } + } break; + //Rest + default: { + if((one-1)%13 - (two-1)%13 <= 2) { + if((one-1)/13 == (two-1)/13) return 5; + else return 3; + } + else { + if((one-1)%13 - (two-1)%13 == 3) return 2; + else return 1; + } + } + } + + +} + +int CardsValue::cardsValue(int *cards) { + +int array[7][2]; + int j1, j2, j3, j4, j5, k1, k2, ktemp[2]; + + // Kartenwerte umwandeln (z.B. [ 11 (Karo König) -> 0 11 ] oder [ 31 (Pik 7) -> 2 5 ] ) + for(j1=0; j1<7; j1++) { + array[j1][0] = cards[j1]/13; + array[j1][1] = cards[j1]%13; + } + + // Karten nach Farben sortieren: Kreuz - Pik - Herz - Karo + for(k1=0; k1<7; k1++) { + for(k2=k1+1; k2<7; k2++) { + if(array[k1][0] 8*100000000+3*1000000 + return 800000000+3*1000000; + } + } + } + } + } + + // auf Flush (Klasse 5) testen + for(j1=0; j1<3; j1++) { + if(array[j1][0] == array[j1+1][0] && array[j1][0] == array[j1+2][0] && array[j1][0] == array[j1+3][0] && array[j1][0] == array[j1+4][0]) { + // Flush -> 5*10000000 + höhste Flush Karten mit absteigender Wertung + return 500000000+array[j1][1]*1000000+array[j1+1][1]*10000+array[j1+2][1]*100+array[j1+3][1]*10+array[j1+4][1]; + } + } + + + + // Karten für den Vierling-, Full-House-, Drilling- und Paartest umsortieren + for(k1=0; k1<7; k1++) { + for(k2=k1+1; k2<7; k2++) { + if(array[k1][1]getMainWindowImpl()->getMaxQuantityPlayers(); i++) sets += playerArray[i]->getMySet(); + +} + +void LocalBoard::collectPot() { + int i; + pot += sets; + sets = 0; + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++){ playerArray[i]->setMySetNull(); } +} + + diff --git a/src/local_engine/localboard.h b/src/local_engine/localboard.h new file mode 100755 index 00000000..64caadcf --- /dev/null +++ b/src/local_engine/localboard.h @@ -0,0 +1,59 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef LOCALBOARD_H +#define LOCALBOARD_H + +#include + +class LocalPlayer; +class LocalHand; + + +class LocalBoard{ +public: + LocalBoard(); + + ~LocalBoard(); + + void setPlayer(LocalPlayer**); + void setHand(LocalHand*); + + void setMyCards(int* theValue) { int i; for(i=0; i<5; i++) myCards[i] = theValue[i]; } + void getMyCards(int* theValue) { int i; for(i=0; i<5; i++) theValue[i] = myCards[i]; } + + int getPot() const { return pot;} + void setPot(int theValue) { pot = theValue;} + int getSets() const { return sets; } + + void collectSets(); + void collectPot(); + + +private: + LocalPlayer **playerArray; + LocalHand *actualHand; + + int myCards[5]; + int pot; + int sets; + +}; + +#endif diff --git a/src/local_engine/localflop.cpp b/src/local_engine/localflop.cpp new file mode 100755 index 00000000..24aaae70 --- /dev/null +++ b/src/local_engine/localflop.cpp @@ -0,0 +1,127 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "localflop.h" +#include "localhand.h" + +using namespace std; + +LocalFlop::LocalFlop(LocalHand* bR, int id, int qP, int dP, int sB) : myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstFlopRun(TRUE), firstFlopRound(TRUE), playersTurn(dP) + +{ + int i; + + //SmallBlind-Position ermitteln + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + if (myHand->getPlayerArray()[i]->getMyButton() == 2) smallBlindPosition = i; + } + +} + + +LocalFlop::~LocalFlop() +{ +} + +void LocalFlop::flopRun() { + +// cout << "NextPlayerSpeed2 stop" << endl; + int i; + + if (firstFlopRun) { + myHand->getGuiInterface()->dealFlopCards(); + firstFlopRun = FALSE; + + } + + else { + bool allHighestSet = 1; + + // prfe, ob alle Sets gleich sind ( falls nicht, dann allHighestSet = 0 ) + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + if(myHand->getPlayerArray()[i]->getMyActiveStatus() && myHand->getPlayerArray()[i]->getMyAction() != 1 && myHand->getPlayerArray()[i]->getMyAction() != 6) { + if(highestSet != myHand->getPlayerArray()[i]->getMySet()) { allHighestSet=0; } + } + } + +// cout << "firstflopround " << firstFlopRound << endl; + + // prfen, ob Flop wirklich dran ist + if(!firstFlopRound && allHighestSet) { + + // Flop nicht dran, weil alle Sets gleich sind + //also gehe in Turn + myHand->setActualRound(2); + + //Action l�chen und ActionButtons refresh + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + if(myHand->getPlayerArray()[i]->getMyAction() != 1 && myHand->getPlayerArray()[i]->getMyAction() != 6) myHand->getPlayerArray()[i]->setMyAction(0); + } + //Sets in den Pot verschieben und Sets = 0 und Pot-refresh + myHand->getBoard()->collectSets(); + myHand->getBoard()->collectPot(); + myHand->getMainWindowImpl()->refreshPot(); + myHand->getMainWindowImpl()->refreshAll(); + + myHand->switchRounds(); + + } + else { + // Flop ist wirklich dran + + // n�hsten Spieler ermitteln + do { playersTurn = (playersTurn+1)%(myHand->getMainWindowImpl()->getMaxQuantityPlayers()); + } while(!(myHand->getPlayerArray()[playersTurn]->getMyActiveStatus()) || (myHand->getPlayerArray()[playersTurn]->getMyAction())==1 || (myHand->getPlayerArray()[playersTurn]->getMyAction())==6); + + //Spieler-Position vor SmallBlind-Position ermitteln + int activePlayerBeforeSmallBlind = smallBlindPosition; + do { activePlayerBeforeSmallBlind = (activePlayerBeforeSmallBlind + myHand->getMainWindowImpl()->getMaxQuantityPlayers() - 1 ) % (myHand->getMainWindowImpl()->getMaxQuantityPlayers()); + } while(!(myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyActiveStatus()) || (myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyAction())==1 || (myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyAction())==6); + + myHand->getPlayerArray()[playersTurn]->setMyTurn(TRUE); + myHand->getMainWindowImpl()->refreshGroupbox(); + +// cout << "activePlayerBeforeSmallBlind " << activePlayerBeforeSmallBlind << endl; +// cout << "playersTurn " << playersTurn << endl; + // wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende + if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstFlopRound = FALSE; } + + if(playersTurn == 0) { + // Wir sind dran +// cout << "actualRound " << myHand->getActualRound() << endl; +// cout << "highestSet vor meInAction " << highestSet << endl; + myHand->getMainWindowImpl()->meInAction(); + } + else { + //Gegner sind dran +// cout << "NextPlayerSpeed3 start" << endl; + myHand->getGuiInterface()->flopAnimation2(); + } + } + } +} + +void LocalFlop::nextPlayer2() { + +// cout << "NextPlayerSpeed3 stop" << endl; + myHand->getPlayerArray()[playersTurn]->action(); + +} + + diff --git a/src/local_engine/localflop.h b/src/local_engine/localflop.h new file mode 100755 index 00000000..4dda1158 --- /dev/null +++ b/src/local_engine/localflop.h @@ -0,0 +1,71 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef LOCALFLOP_H +#define LOCALFLOP_H + +#include + +class LocalHand; + +class LocalFlop { + +public: + LocalFlop(LocalHand*, int, int, int, int); + + ~LocalFlop(); + + + void setPlayersTurn(const int& theValue) { playersTurn = theValue; } + int getPlayersTurn() const { return playersTurn; } + + void setHighestSet(const int& theValue) { highestSet = theValue; } + int getHighestSet() const { return highestSet;} + + void setFirstFlopRound(bool theValue) { firstFlopRound = theValue;} + bool getFirstFlopRound() const { return firstFlopRound;} + + void setSmallBlindPosition(const int& theValue) { smallBlindPosition = theValue;} + int getSmallBlindPosition() const { return smallBlindPosition; } + + void setSmallBlind(const int& theValue) { smallBlind = theValue; } + int getSmallBlind() const { return smallBlind; } + + void flopRun(); + void nextPlayer2(); + +private: + + LocalHand *myHand; + + int myID; + int actualQuantityPlayers; + int dealerPosition; + int smallBlindPosition; + + int smallBlind; + int highestSet; + + bool firstFlopRun; + bool firstFlopRound; + int playersTurn; + +}; + +#endif diff --git a/src/local_engine/localhand.cpp b/src/local_engine/localhand.cpp new file mode 100755 index 00000000..289e677b --- /dev/null +++ b/src/local_engine/localhand.cpp @@ -0,0 +1,281 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "localhand.h" + +using namespace std; + +LocalHand::LocalHand(mainWindowImpl *w, GuiInterface *g, LocalBoard *b, LocalPlayer **p, int id, int qP, int dP, int sB,int sC) : myW(w), myGui(g), myBoard(b), playerArray(p), myPreflop(0), myFlop(0), myTurn(0), myRiver(0), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), actualRound(0), smallBlind(sB), startCash(sC), allInCondition(FALSE) +{ + int i, j; + CardsValue myCardsValue; + + myW->setHand(this); + myBoard->setHand(this); + +// myEngine->setHand(this); + + for(i=0; isetHand(this); + + + // roundStartCashArray fllen + for(i=0; i<5; i++) { + playerArray[i]->setMyRoundStartCash(playerArray[i]->getMyCash()); + } + + + // Dealer, SB, BB bestimmen + assignButtons(); + + myW->refreshAll(); + + // Karten generieren und Board sowie Player zuweisen + Tools myTool; + int cardsArray[2*actualQuantityPlayers+5]; + myTool.getRandNumber(0, 51, 2*actualQuantityPlayers+5, cardsArray, 1); + int tempBoardArray[5]; + int tempPlayerArray[2]; + int tempPlayerAndBoardArray[7]; + for(i=0; i<5; i++) { + tempBoardArray[i] = cardsArray[i]; + tempPlayerAndBoardArray[i+2] = cardsArray[i]; + } + myBoard->setMyCards(tempBoardArray); + for(i=0; isetMyCards(tempPlayerArray); + playerArray[i]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray)); + } + + // Karten austeilen + myW->dealHoleCards(); + + + + // Preflop, Flop, Turn und River erstellen + myPreflop = new LocalPreflop(this, myID, actualQuantityPlayers, dealerPosition, smallBlind); + myFlop = new LocalFlop(this, myID, actualQuantityPlayers, dealerPosition, smallBlind); + myTurn = new LocalTurn(this, myID, actualQuantityPlayers, dealerPosition, smallBlind); + myRiver = new LocalRiver(this, myID, actualQuantityPlayers, dealerPosition, smallBlind); + + //Rundenwechsel | beim ersten Durchlauf --> Preflop starten + myGui->nextPlayerAnimation(); + +} + + + +LocalHand::~LocalHand() +{ + + delete myPreflop; + myPreflop = 0; + delete myFlop; + myFlop = 0; + delete myTurn; + myTurn = 0; + delete myRiver; + myRiver = 0; + +} + +void LocalHand::assignButtons() { + + int i; + + // alle Buttons loeschen + for (i=0; igetMaxQuantityPlayers(); i++) { playerArray[i]->setMyButton(0); } + + // DealerButton zuweisen + playerArray[dealerPosition]->setMyButton(1); + + // Small Blind zuweisen und setzen + i = dealerPosition; + do { + i = (i+1)%(myW->getMaxQuantityPlayers()); + if(playerArray[i]->getMyActiveStatus()) { + playerArray[i]->setMyButton(2); + // mit SmallBlind All In ? + if(playerArray[i]->getMyCash() <= smallBlind) { + + playerArray[i]->setMySet(playerArray[i]->getMyCash()); + playerArray[i]->setMyAction(6); + + } + // sonst + else { + playerArray[i]->setMySet(smallBlind); + } + } + + } while(!(playerArray[i]->getMyActiveStatus())); + + // Big Blind zuweisen + do { + i = (i+1)%(myW->getMaxQuantityPlayers()); + if(playerArray[i]->getMyActiveStatus()) { + playerArray[i]->setMyButton(3); + // mit BigBlind All In ? + if(playerArray[i]->getMyCash() <= 2*smallBlind) { + + playerArray[i]->setMySet(playerArray[i]->getMyCash()); + playerArray[i]->setMyAction(6); + + } + // sonst + else { + playerArray[i]->setMySet(2*smallBlind); + } + } + + } while(!(playerArray[i]->getMyActiveStatus())); +} + + +void LocalHand::switchRounds() { + + int i; + +// cout << "switchrounds" << endl; + + //Aktive Spieler z�len --> wenn nur noch einer nicht-folded dann gleich den Pot verteilen + int activePlayersCounter = 0; + for (i=0; igetMaxQuantityPlayers(); i++) { + if (playerArray[i]->getMyAction() != 1 && playerArray[i]->getMyActiveStatus() == 1) activePlayersCounter++; + } + + // Anzahl der Spieler ermitteln, welche All In sind + int allInPlayersCounter = 0; + for (i=0; igetMaxQuantityPlayers(); i++) { + if (playerArray[i]->getMyAction() == 6) allInPlayersCounter++; + } + + if(activePlayersCounter==1) { + myBoard->collectPot(); + myW->refreshPot(); + myGui->refreshSet(); + actualRound = 4; + } + + // prfen der All In Kondition + // fr All In Prozedur mssen mindestens zwei aktive Player vorhanden sein + else { + // 1) wenn alle All In + if(allInPlayersCounter == activePlayersCounter) { + allInCondition = TRUE; + } + + // 2) alle bis auf einen All In und der hat HighestSet + int tempHighestSet; + if(allInPlayersCounter+1 == activePlayersCounter) { + // Spieler ermitteln, der noch nicht All In ist + for (i=0; igetMaxQuantityPlayers(); i++) { + if(playerArray[i]->getMyAction() != 1 && playerArray[i]->getMyAction() != 6 && playerArray[i]->getMyActiveStatus() == 1) { + tempHighestSet = 0; + switch (actualRound) { + case 0: {tempHighestSet = myPreflop->getHighestSet();} + break; + case 1: {tempHighestSet = myFlop->getHighestSet();} + break; + case 2: {tempHighestSet = myTurn->getHighestSet();} + break; + case 3: {tempHighestSet = myRiver->getHighestSet();} + break; + default: {} + } + if(playerArray[i]->getMySet() >= tempHighestSet) { + allInCondition = TRUE; + } + } + } + } + } + + // beim Vorliegen einer All In Kondition -> Ausfhrung einer Sonderprozedur + if(allInCondition) { + myBoard->collectPot(); + myW->refreshPot(); + myW->refreshSet(); + actualRound++; + } + + + myW->refreshGroupbox(); + highlightRoundLabel(); +// /*/*/*/*cout <<*/*/*/*/ "NextPlayerSpeed1 stop" << endl; +// +// cout << "NextPlayerSpeed2 start" << endl; + switch(actualRound) { + case 0: { + // Preflop starten + myGui->preflopAnimation1(); + } break; + case 1: { + // Flop starten + myGui->flopAnimation1(); + } break; + case 2: { + // Turn starten + myGui->turnAnimation1(); + + } break; + case 3: { + // River starten + myGui->riverAnimation1(); + + } break; + case 4: { + // PostRiver starten + myGui->postRiverAnimation1(); + + } break; + default: {} + + + + } + +} + +void LocalHand::highlightRoundLabel() { + switch(actualRound) { + case 0: { + myW->highlightRoundLabel("Preflop"); + } break; + case 1: { + myW->highlightRoundLabel("Flop"); + } break; + case 2: { + myW->highlightRoundLabel("Turn"); + } break; + case 3: { + myW->highlightRoundLabel("River"); + } break; + case 4: { + myW->highlightRoundLabel(""); + } break; + default: { + myW->highlightRoundLabel("!!! FEHLER !!!"); + } + } +} + diff --git a/src/local_engine/localhand.h b/src/local_engine/localhand.h new file mode 100755 index 00000000..cf369a13 --- /dev/null +++ b/src/local_engine/localhand.h @@ -0,0 +1,106 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef LOCALHAND_H +#define LOCALHAND_H + +#include "mainwindowimpl.h" +#include "guiinterface.h" +#include "localboard.h" +#include "localplayer.h" +#include "tools.h" +#include "localpreflop.h" +#include "localflop.h" +#include "localturn.h" +#include "localriver.h" + +class mainWindowImpl; +class GuiInterface; +class LocalBoard; +class LocalPlayer; +class LocalPreflop; +class LocalFlop; +class LocalTurn; +class LocalRiver; + + +class LocalHand { + +public: + LocalHand(mainWindowImpl*, GuiInterface*, LocalBoard*, LocalPlayer**, int, int, int, int, int); + + ~LocalHand(); + + LocalPlayer** getPlayerArray() const { return playerArray; } + LocalBoard* getBoard() const { return myBoard; } + LocalPreflop* getPreflop() const { return myPreflop; } + LocalFlop* getFlop() const { return myFlop; } + LocalTurn* getTurn() const { return myTurn; } + LocalRiver* getRiver() const { return myRiver; } + mainWindowImpl* getMainWindowImpl() const { return myW; } + GuiInterface* getGuiInterface() const { return myGui; } + + void setMyID(const int& theValue) { myID = theValue; } + int getMyID() const { return myID; } + + void setActualQuantityPlayers(const int& theValue) { actualQuantityPlayers = theValue; } + int getActualQuantityPlayers() const { return actualQuantityPlayers; } + + void setActualRound(const int& theValue) { actualRound = theValue; } + int getActualRound() const { return actualRound; } + + void setSmallBlind(const int& theValue) { smallBlind = theValue; } + int getSmallBlind() const { return smallBlind; } + + void setAllInCondition(bool theValue) { allInCondition = theValue; } + bool getAllInCondition() const { return allInCondition; } + + void setStartCash(const int& theValue) { startCash = theValue; } + int getStartCash() const { return startCash; } + + void assignButtons(); + + void highlightRoundLabel(); + void switchRounds(); + + + +private: + mainWindowImpl *myW; + GuiInterface *myGui; + LocalBoard *myBoard; + LocalPlayer **playerArray; + LocalPreflop *myPreflop; + LocalFlop *myFlop; + LocalTurn *myTurn; + LocalRiver *myRiver; + + int myID; + int actualQuantityPlayers; + int dealerPosition; // -1 -> neutral + int actualRound; //0 = preflop, 1 = flop, 2 = turn, 3 = river + int smallBlind; + int startCash; + + bool allInCondition; +}; + +#endif + + diff --git a/src/local_engine/localplayer.cpp b/src/local_engine/localplayer.cpp new file mode 100755 index 00000000..ee7dfe46 --- /dev/null +++ b/src/local_engine/localplayer.cpp @@ -0,0 +1,778 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "localplayer.h" + +#include "localhand.h" + +using namespace std; + +LocalPlayer::LocalPlayer(LocalBoard *b, int id, int sC, bool aS, int mB) : actualHand(0), actualBoard(b), myCardsValue(0), myID(id), myDude(0), myCardsValueInt(0), myCash(sC), mySet(0), myAction(0), myButton(mB), myActiveStatus(aS), myTurn(0), myRoundStartCash(0), myAverageSets(0) +{ + + Tools myTool; + // Dude zuweisen + myTool.getRandNumber(3 , 5, 1, &myDude, 0); +// cout << "Spieler: " << myID << " Dude: " << myDude << " Cash: " << myCash << " ActiveStatus: " << myActiveStatus << " Button: " << myButton << endl; + + myCardsValue = new CardsValue; + + ostringstream temp; + temp << "Player " << myID; + myName = temp.str(); + +} + + +LocalPlayer::~LocalPlayer() +{ +} + +void LocalPlayer::setHand(LocalHand* br) { actualHand = br; } + +void LocalPlayer::action() { + + switch(actualHand->getActualRound()) { + case 0: { + + preflopEngine(); + + actualBoard->collectSets(); + actualHand->getMainWindowImpl()->refreshPot(); + + } break; + case 1: { + + flopEngine(); + + actualBoard->collectSets(); + actualHand->getMainWindowImpl()->refreshPot(); + + } break; + case 2: { + + turnEngine(); + + actualBoard->collectSets(); + actualHand->getMainWindowImpl()->refreshPot(); + + } break; + case 3: { + + riverEngine(); + + actualBoard->collectSets(); + actualHand->getMainWindowImpl()->refreshPot(); + + } break; + default: {} + } + + + + myTurn = 0; +// cout << "jetzt" << endl; + + actualHand->getGuiInterface()->showPlayerActionLogMsg(myName, myAction, mySet); + actualHand->getGuiInterface()->nextPlayerAnimation(); + + +} + +void LocalPlayer::preflopEngine() { + +// cout << "nextID " << actualHand->getPlayerArray()[(myID+1)%5]->getMyID() << endl; + + Tools myTool; + int raise = 0; + +// Bauchgefhl (zufᅵlig) + int tempRand; + myTool.getRandNumber(1,10,1,&tempRand,0); + + // bluff, checkbluff + int bluff; + myTool.getRandNumber(1,100,1,&bluff,0); + +// cout << "preflop-bluff " << bluff << endl; + + // Potential + int potential = 10*(4*(myCardsValue->holeCardsClass(myCards[0], myCards[1]))+1*tempRand)/50-myDude; + + int setToHighest = actualHand->getPreflop()->getHighestSet() - mySet; + + // temp fr das Vielfache des Small Blind, sodass HighestSet zu hoch ist + int tempFold; +// tempFold = (actualHand->getPlayerArray()[0]->getMyAverageSets())/(8*actualHand->getSmallBlind()); + myTool.getRandNumber(2,3,1,&tempFold,0); + + // FOLD --> wenn Potential negativ oder HighestSet zu hoch + if( (potential*setToHighest<0 || (setToHighest > tempFold * actualHand->getSmallBlind() && potential<1) || (setToHighest > 2 * tempFold * actualHand->getSmallBlind() && potential<2) || (setToHighest > 4 * tempFold * actualHand->getSmallBlind() && potential<3) || (setToHighest > 10 * tempFold * actualHand->getSmallBlind() && potential<4)) && myCardsValue->holeCardsClass(myCards[0], myCards[1]) < 9 && bluff > 15) { + myAction=1; + } + else { + // RAISE --> wenn hohes Potential + if(potential >= 4 && 6 * actualHand->getSmallBlind() >= actualHand->getPreflop()->getHighestSet() || bluff <= 6) { + // extrem hohes Potential --> groᅵr Raise + if(potential>=6 || bluff <= 2) { + + // bluff - raise + if(bluff <=2 && 4 * actualHand->getSmallBlind() > actualHand->getPreflop()->getHighestSet()) { + raise = 3 * actualHand->getPreflop()->getHighestSet(); + } + else { + // bluff - call + if(bluff >= 98) { + // All In + if(actualHand->getPreflop()->getHighestSet() >= myCash) { + + mySet += myCash; + myCash = 0; + myAction = 6; + + } + // sonst + else { + myCash = myCash - actualHand->getPreflop()->getHighestSet() + mySet; + mySet = actualHand->getPreflop()->getHighestSet(); + myAction = 3; + } + } else { + // doch nich raisen, sondern nur checken, weil highestSets bereits sehr hoch !!! + if(! (4 * actualHand->getSmallBlind() > actualHand->getPreflop()->getHighestSet())) { + + // All In + if(actualHand->getPreflop()->getHighestSet() >= myCash) { + + mySet += myCash; + myCash = 0; + myAction = 6; + + } + // sonst + else { + myCash = myCash - actualHand->getPreflop()->getHighestSet() + mySet; + mySet = actualHand->getPreflop()->getHighestSet(); + myAction = 3; + } + + } + else raise = (potential - 4 ) * 2 * actualHand->getPreflop()->getHighestSet(); + } + } + } + // hohes Potential --> gemäßigter Raise + else { + // bluff - raise + if(bluff <= 6 && 4 * actualHand->getSmallBlind() > actualHand->getPreflop()->getHighestSet()) { + raise = 2*actualHand->getPreflop()->getHighestSet(); + } + else { + // bluff - call + if(bluff >= 93) { + + // All In + if(actualHand->getPreflop()->getHighestSet() >= myCash) { + + mySet += myCash; + myCash = 0; + myAction = 6; + + } + // sonst + else { + myCash = myCash - actualHand->getPreflop()->getHighestSet() + mySet; + mySet = actualHand->getPreflop()->getHighestSet(); + myAction = 3; + } + } + else { + // doch nich raisen, sondern nur checken, weil highestSets bereits sehr hoch !!! + if(! (4 * actualHand->getSmallBlind() > actualHand->getPreflop()->getHighestSet())) { + + // All In + if(actualHand->getPreflop()->getHighestSet() >= myCash) { + + mySet += myCash; + myCash = 0; + myAction = 6; + + } + // sonst + else { + myCash = myCash - actualHand->getPreflop()->getHighestSet() + mySet; + mySet = actualHand->getPreflop()->getHighestSet(); + myAction = 3; + } + } + else raise = (potential - 3 ) * actualHand->getPreflop()->getHighestSet(); + } + } + } + + if (raise > 0) { + // All In + if(actualHand->getPreflop()->getHighestSet() + raise >= myCash) { + + mySet += myCash; + myCash = 0; + myAction = 6; + if(mySet > actualHand->getPreflop()->getHighestSet()) actualHand->getPreflop()->setHighestSet(mySet); + + } + // sonst + else { + + myCash = myCash + mySet - actualHand->getPreflop()->getHighestSet() - raise; + mySet = actualHand->getPreflop()->getHighestSet() + raise; + actualHand->getPreflop()->setHighestSet(mySet); + myAction = 5; + } + } + } + //CHECK und CALL + else { + // CHECK --> wenn alle Sets glieich bei BigBlind und nich zu hohem Potential + if(mySet == actualHand->getPreflop()->getHighestSet()) { + myAction = 2; + } + // CALL --> bei normalen Potential + else { + // All In + if(actualHand->getPreflop()->getHighestSet() >= myCash) { + + mySet += myCash; + myCash = 0; + myAction = 6; + + } + // sonst + else { + myCash = myCash - actualHand->getPreflop()->getHighestSet() + mySet; + mySet = actualHand->getPreflop()->getHighestSet(); + myAction = 3; + } + } + } + } + +} + +void LocalPlayer::flopEngine() { + + // Prozent ausrechnen + + int i, j, k ,l; + int tempBoardCardsArray[5]; + int tempMyCardsArray[7]; + int tempOpponentCardsArray[7]; + actualBoard->getMyCards(tempBoardCardsArray); + + tempMyCardsArray[0] = myCards[0]; + tempMyCardsArray[1] = myCards[1]; + tempMyCardsArray[2] = tempBoardCardsArray[0]; + tempMyCardsArray[3] = tempBoardCardsArray[1]; + tempMyCardsArray[4] = tempBoardCardsArray[2]; + + tempOpponentCardsArray[2] = tempBoardCardsArray[0]; + tempOpponentCardsArray[3] = tempBoardCardsArray[1]; + tempOpponentCardsArray[4] = tempBoardCardsArray[2]; + + int tempMyCardsValue; + int tempOpponentCardsValue; + + int countAll = 0; + int countMy = 0; + + for(i=0; i<49; i++) { + if(i != myCards[0] && i != myCards[1] && i != tempBoardCardsArray[0] && i != tempBoardCardsArray[1] && i != tempBoardCardsArray[2]) { + for(j=i+1; j<50; j++) { + if(j != myCards[0] && j != myCards[1] && j != tempBoardCardsArray[0] && j != tempBoardCardsArray[1] && j != tempBoardCardsArray[2]) { + for(k=j+1; k<51; k++) { + if(k != myCards[0] && k != myCards[1] && k != tempBoardCardsArray[0] && k != tempBoardCardsArray[1] && k != tempBoardCardsArray[2]) { + for(l=k+1; l<52; l++) { + if(l != myCards[0] && l != myCards[1] && l != tempBoardCardsArray[0] && l != tempBoardCardsArray[1] && l != tempBoardCardsArray[2]) { + + countAll++; + + tempOpponentCardsArray[0] = i; + tempOpponentCardsArray[1] = j; + tempOpponentCardsArray[5] = k; + tempOpponentCardsArray[6] = l; + tempMyCardsArray[5] = k; + tempMyCardsArray[6] = l; + tempMyCardsValue = myCardsValue->cardsValue(tempMyCardsArray); + tempOpponentCardsValue = myCardsValue->cardsValue(tempOpponentCardsArray); + + if(tempMyCardsValue>=tempOpponentCardsValue) countMy++; + + } + } + } + } + } + } + } + } + + double percent = (countMy*1.0)/(countAll*1.0); +// cout << "Prozent: " << percent << endl; + + Tools myTool; + + int raise = 0; + +// Bauchgefhl (zufᅵlig) + int tempRand; + myTool.getRandNumber((int)(percent*10.)-2,(int)(percent*10.)+2,1,&tempRand,0); + + // bluff, checkbluff + int bluff; + myTool.getRandNumber(1,100,1,&bluff,0); + +// cout << "flop-bluff " << bluff << endl; + +// Potential + int potential = (10*(5*(int)(percent*100.)+10*tempRand*2))/700-myDude; + + int setToHighest = actualHand->getFlop()->getHighestSet() - mySet; + + // temp fr das Vielfache des Small Blind, sodass HighestSet zu hoch ist + int tempFold; +// tempFold = (actualHand->getPlayerArray()[0]->getMyAverageSets())/(8*actualHand->getSmallBlind()); + myTool.getRandNumber(2,3,1,&tempFold,0); + + // FOLD --> wenn potential negativ oder HighestSet zu hoch + if(( potential*setToHighest<0 || (setToHighest > tempFold * actualHand->getSmallBlind() && potential<1) || (setToHighest > 3 * tempFold * actualHand->getSmallBlind() && potential<2) || (setToHighest > 9 * tempFold * actualHand->getSmallBlind() && potential<3) || (setToHighest > 20*tempFold * actualHand->getSmallBlind() && potential<4) || (setToHighest > 40 *tempFold * actualHand->getSmallBlind() && potential<5)) && percent < 0.90 && bluff > 18) { + myAction=1; + } + else { + // CHECK und BET --> wenn noch keiner was gesetzt hat + if(actualHand->getFlop()->getHighestSet() == 0) { + // CHECK --> wenn Potential klein oder check-bluff sonst bet oder bet-bluff + if((potential<3 || bluff >= 80) && bluff > 15) { + // check + myAction = 2; + } + // BET --> wenn Potential hoch + else { + if(bluff <= 5) mySet = (bluff+1) * actualHand->getSmallBlind(); + else { + if(bluff <=15 ) mySet = 4 * actualHand->getSmallBlind(); + // je höher das Potential, desto höher der Einsatz (zur Basis SmallBlind) + else mySet = (potential-1) * 2 * actualHand->getSmallBlind(); + } + + // All In + if(mySet >= myCash) { + mySet = myCash; + myCash = 0; + myAction = 6; + + } + // sonst + else { + myCash -= mySet; + myAction = 4; + } + actualHand->getFlop()->setHighestSet(mySet); + } + + } + // CALL und RAISE --> wenn bereits gesetzt wurde + else { + // RAISE --> wenn Potential besonders gut + if((potential >=4 && 2 * tempFold * actualHand->getSmallBlind() >= actualHand->getFlop()->getHighestSet()) || (bluff <= 5 && 4 * tempFold * actualHand->getSmallBlind() >= actualHand->getFlop()->getHighestSet())) { + + // bluff - raise + if(bluff <=5) raise = ((bluff+1)/2) * actualHand->getFlop()->getHighestSet(); + // Betrag, der ber dem aktuell HighestSet gesetzt werden soll + else raise = ((potential - 2 ) / 2) * actualHand->getFlop()->getHighestSet(); + + // All In + if(actualHand->getFlop()->getHighestSet() + raise >= myCash) { + + mySet += myCash; + myCash = 0; + myAction = 6; + if(mySet > actualHand->getFlop()->getHighestSet()) actualHand->getFlop()->setHighestSet(mySet); + + } + // sonst + else { + + myCash = myCash + mySet - actualHand->getFlop()->getHighestSet() - raise; + mySet = actualHand->getFlop()->getHighestSet() + raise; + actualHand->getFlop()->setHighestSet(mySet); + myAction = 5; + } + } + // CALL --> bei normalen Potential + else { + + // All In + if(actualHand->getFlop()->getHighestSet() >= myCash) { + + mySet += myCash; + myCash = 0; + myAction = 6; + + } + // sonst + else { + myCash = myCash - actualHand->getFlop()->getHighestSet() + mySet; + mySet = actualHand->getFlop()->getHighestSet(); + myAction = 3; + } + } + } + } + +} + +void LocalPlayer::turnEngine() { + + // Prozent ausrechnen + + int i, j, k; + int tempBoardCardsArray[5]; + int tempMyCardsArray[7]; + int tempOpponentCardsArray[7]; + actualBoard->getMyCards(tempBoardCardsArray); + + tempMyCardsArray[0] = myCards[0]; + tempMyCardsArray[1] = myCards[1]; + tempMyCardsArray[2] = tempBoardCardsArray[0]; + tempMyCardsArray[3] = tempBoardCardsArray[1]; + tempMyCardsArray[4] = tempBoardCardsArray[2]; + tempMyCardsArray[5] = tempBoardCardsArray[3]; + + tempOpponentCardsArray[2] = tempBoardCardsArray[0]; + tempOpponentCardsArray[3] = tempBoardCardsArray[1]; + tempOpponentCardsArray[4] = tempBoardCardsArray[2]; + tempOpponentCardsArray[5] = tempBoardCardsArray[3]; + + int tempMyCardsValue; + int tempOpponentCardsValue; + + int countAll = 0; + int countMy = 0; + + for(i=0; i<49; i++) { + if(i != myCards[0] && i != myCards[1] && i != tempBoardCardsArray[0] && i != tempBoardCardsArray[1] && i != tempBoardCardsArray[2]) { + for(j=i+1; j<50; j++) { + if(j != myCards[0] && j != myCards[1] && j != tempBoardCardsArray[0] && j != tempBoardCardsArray[1] && j != tempBoardCardsArray[2]) { + for(k=j+1; k<51; k++) { + if(k != myCards[0] && k != myCards[1] && k != tempBoardCardsArray[0] && k != tempBoardCardsArray[1] && k != tempBoardCardsArray[2]) { + + countAll++; + + tempOpponentCardsArray[0] = i; + tempOpponentCardsArray[1] = j; + tempOpponentCardsArray[6] = k; + tempMyCardsArray[6] = k; + tempMyCardsValue = myCardsValue->cardsValue(tempMyCardsArray); + tempOpponentCardsValue = myCardsValue->cardsValue(tempOpponentCardsArray); + + if(tempMyCardsValue>=tempOpponentCardsValue) countMy++; + } + } + } + } + } + } + + double percent = (countMy*1.0)/(countAll*1.0); +// cout << "Prozent: " << percent << endl; + + Tools myTool; + int raise; + +// Bauchgefhl (zufᅵlig) + int tempRand; + myTool.getRandNumber((int)(percent*10.)-2,(int)(percent*10.)+2,1,&tempRand,0); + + // bluff, checkbluff + int bluff; + myTool.getRandNumber(1,100,1,&bluff,0); + +// cout << "turn-bluff " << bluff << endl; + +// Potential + int potential = (10*(5*(int)(percent*100.)+10*tempRand*2))/700-myDude; + + int setToHighest = actualHand->getTurn()->getHighestSet() - mySet; + + // temp fr das Vielfache des Small Blind, sodass HighestSet zu hoch ist + int tempFold; +// tempFold = (actualHand->getPlayerArray()[0]->getMyAverageSets())/(7*actualHand->getSmallBlind()); + myTool.getRandNumber(3,4,1,&tempFold,0); + + // FOLD + // --> wenn potential negativ oder HighestSet zu hoch + if( (potential*setToHighest<0 || (setToHighest > tempFold * actualHand->getSmallBlind() && potential<1) || (setToHighest > 3 * tempFold * actualHand->getSmallBlind() && potential<2) || (setToHighest > 9 * tempFold * actualHand->getSmallBlind() && potential<3) || (setToHighest > 20*tempFold * actualHand->getSmallBlind() && potential<4) || (setToHighest > 40 *tempFold * actualHand->getSmallBlind() && potential<5)) && percent < 0.90 && bluff > 15) { + myAction=1; + } + else { + // CHECK und BET --> wenn noch keiner was gesetzt hat + if(actualHand->getTurn()->getHighestSet() == 0) { + // CHECK --> wenn Potential klein + if((potential<2 || bluff >= 80) && bluff > 10) { + // check + myAction = 2; + } + // BET --> wenn Potential hoch + else { + + if(bluff <= 3) mySet = bluff * 2 * actualHand->getSmallBlind(); + else { + if(bluff <=10 ) mySet = ((bluff+2)/3) * actualHand->getSmallBlind(); + // je hᅵer das Potential, desto hᅵher der Einsatz (zur Basis SmallBlind) + else mySet = (potential-1) * 3 * actualHand->getSmallBlind(); + } + + // All In + if(mySet >= myCash) { + mySet = myCash; + myCash = 0; + myAction = 6; + + } + // sonst + else { + myCash -= mySet; + myAction = 4; + } + actualHand->getTurn()->setHighestSet(mySet); + } + + } + // CALL und RAISE --> wenn bereits gesetzt wurde + else { + // RAISE --> wenn Potential besonders gut + if(potential >=4 && 2 * tempFold * actualHand->getSmallBlind() >= actualHand->getTurn()->getHighestSet() || (bluff <= 4 && 3 * tempFold * actualHand->getSmallBlind() >= actualHand->getTurn()->getHighestSet())) { + + // bluff - raise + if(bluff <= 4) raise = ((bluff+1)/2) * actualHand->getTurn()->getHighestSet(); + // Betrag, der ber dem aktuell HighestSet gesetzt werden soll + else raise = ( potential - 3 ) * actualHand->getTurn()->getHighestSet(); + + // All In + if(actualHand->getTurn()->getHighestSet() + raise >= myCash) { + + mySet += myCash; + myCash = 0; + myAction = 6; + if(mySet > actualHand->getTurn()->getHighestSet()) actualHand->getTurn()->setHighestSet(mySet); + + } + // sonst + else { + + myCash = myCash + mySet - actualHand->getTurn()->getHighestSet() - raise; + mySet = actualHand->getTurn()->getHighestSet() + raise; + actualHand->getTurn()->setHighestSet(mySet); + myAction = 5; + } + } + // CALL --> bei normalen Potential + else { + // All In + if(actualHand->getTurn()->getHighestSet() >= myCash) { + + mySet += myCash; + myCash = 0; + myAction = 6; + + } + // sonst + else { + myCash = myCash - actualHand->getTurn()->getHighestSet() + mySet; + mySet = actualHand->getTurn()->getHighestSet(); + myAction = 3; + } + } + } + } + + +} + +void LocalPlayer::riverEngine() { + + // Prozent ausrechnen + + int i, j; + int tempBoardCardsArray[5]; + int tempMyCardsArray[7]; + int tempOpponentCardsArray[7]; + actualBoard->getMyCards(tempBoardCardsArray); + + tempMyCardsArray[0] = myCards[0]; + tempMyCardsArray[1] = myCards[1]; + tempMyCardsArray[2] = tempBoardCardsArray[0]; + tempMyCardsArray[3] = tempBoardCardsArray[1]; + tempMyCardsArray[4] = tempBoardCardsArray[2]; + tempMyCardsArray[5] = tempBoardCardsArray[3]; + tempMyCardsArray[6] = tempBoardCardsArray[4]; + + tempOpponentCardsArray[2] = tempBoardCardsArray[0]; + tempOpponentCardsArray[3] = tempBoardCardsArray[1]; + tempOpponentCardsArray[4] = tempBoardCardsArray[2]; + tempOpponentCardsArray[5] = tempBoardCardsArray[3]; + tempOpponentCardsArray[6] = tempBoardCardsArray[4]; + + int tempMyCardsValue; + int tempOpponentCardsValue; + + int countAll = 0; + int countMy = 0; + + for(i=0; i<49; i++) { + if(i != myCards[0] && i != myCards[1] && i != tempBoardCardsArray[0] && i != tempBoardCardsArray[1] && i != tempBoardCardsArray[2]) { + for(j=i+1; j<50; j++) { + if(j != myCards[0] && j != myCards[1] && j != tempBoardCardsArray[0] && j != tempBoardCardsArray[1] && j != tempBoardCardsArray[2]) { + + countAll++; + + tempOpponentCardsArray[0] = i; + tempOpponentCardsArray[1] = j; + tempMyCardsValue = myCardsValue->cardsValue(tempMyCardsArray); + tempOpponentCardsValue = myCardsValue->cardsValue(tempOpponentCardsArray); + + if(tempMyCardsValue>=tempOpponentCardsValue) countMy++; + } + } + } + } + + double percent = (countMy*1.0)/(countAll*1.0); +// cout << "Prozent: " << percent << endl; + + Tools myTool; + int raise; + +// Bauchgefhl (zufᅵlig) + int tempRand; + myTool.getRandNumber((int)(percent*10.)-2,(int)(percent*10.)+2,1,&tempRand,0); + + // bluff, checkbluff + int bluff; + myTool.getRandNumber(1,100,1,&bluff,0); + +// cout << "river-bluff " << bluff << endl; + +// Potential + int potential = (10*(5*(int)(percent*100.)+10*tempRand*1))/600-myDude; + + int setToHighest = actualHand->getRiver()->getHighestSet() - mySet; + + // temp fr das Vielfache des Small Blind, sodass HighestSet zu hoch ist + int tempFold; + tempFold = (actualHand->getPlayerArray()[0]->getMyAverageSets())/(6*actualHand->getSmallBlind()); + // myTool.getRandNumber(4,6,1,&tempFold,0); + + // FOLD + // --> wenn potential negativ oder HighestSet zu hoch + if( (potential*setToHighest<0 || (setToHighest > tempFold * actualHand->getSmallBlind() && potential<1) || (setToHighest > 3 * tempFold * actualHand->getSmallBlind() && potential<2) || (setToHighest > 9 * tempFold * actualHand->getSmallBlind() && potential<3) || (setToHighest > 20*tempFold * actualHand->getSmallBlind() && potential<4) || (setToHighest > 40 *tempFold * actualHand->getSmallBlind() && potential<5)) && percent < 0.90 && bluff > 15) { + myAction=1; + } + else { + // CHECK und BET --> wenn noch keiner was gesetzt hat + if(actualHand->getRiver()->getHighestSet() == 0) { + // CHECK --> wenn Potential klein + if((potential<2 || bluff >= 92) && bluff > 15) { + // check + myAction = 2; + } + // BET --> wenn Potential hoch + else { + + if(bluff <= 5) mySet = (bluff+3) * actualHand->getSmallBlind(); + else { + if(bluff <= 15 ) mySet = ((bluff-1)/5) * 2 * actualHand->getSmallBlind(); + // je hᅵer das Potential, desto hᅵher der Einsatz (zur Basis SmallBlind) + else mySet = (potential-1) * 4 * actualHand->getSmallBlind(); + } + + // All In + if(mySet >= myCash) { + mySet = myCash; + myCash = 0; + myAction = 6; + + } + // sonst + else { + myCash -= mySet; + myAction = 4; + } + actualHand->getRiver()->setHighestSet(mySet); + } + + } + // CALL und RAISE --> wenn bereits gesetzt wurde + else { + // RAISE --> wenn Potential besonders gut + if(potential >=4 && 2 * tempFold * actualHand->getSmallBlind() >= actualHand->getRiver()->getHighestSet() || (bluff <= 2 && 4 * tempFold * actualHand->getSmallBlind() >= actualHand->getRiver()->getHighestSet())) { + + // bluff - raise + if(bluff <= 2 ) raise = bluff * actualHand->getRiver()->getHighestSet(); + // Betrag, der ber dem aktuell HighestSet gesetzt werden soll + else raise = ( potential - 3 ) * actualHand->getRiver()->getHighestSet(); + + // All In + if(actualHand->getRiver()->getHighestSet() + raise >= myCash) { + + mySet += myCash; + myCash = 0; + myAction = 6; + if(mySet > actualHand->getRiver()->getHighestSet()) actualHand->getRiver()->setHighestSet(mySet); + + } + // sonst + else { + + myCash = myCash + mySet - actualHand->getRiver()->getHighestSet() - raise; + mySet = actualHand->getRiver()->getHighestSet() + raise; + actualHand->getRiver()->setHighestSet(mySet); + myAction = 5; + } + } + // CALL --> bei normalen Potential + else { + // All In + if(actualHand->getRiver()->getHighestSet() >= myCash) { + + mySet += myCash; + myCash = 0; + myAction = 6; + + } + // sonst + else { + myCash = myCash - actualHand->getRiver()->getHighestSet() + mySet; + mySet = actualHand->getRiver()->getHighestSet(); + myAction = 3; + } + } + } + } + +} diff --git a/src/local_engine/localplayer.h b/src/local_engine/localplayer.h new file mode 100755 index 00000000..e5368878 --- /dev/null +++ b/src/local_engine/localplayer.h @@ -0,0 +1,118 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef LOCALPLAYER_H +#define LOCALPLAYER_H + +#include "cardsvalue.h" + +#include +#include + + +class CardsValue; +class LocalHand; +class LocalBoard; + +class LocalPlayer{ +public: + LocalPlayer(LocalBoard*, int, int, bool, int); + + ~LocalPlayer(); + + void setHand(LocalHand*); + + void setMyID(const int& theValue) { myID = theValue; } + int getMyID() const { return myID; } + + void setMyDude(const int& theValue) { myDude = theValue; } + int getMyDude() const { return myDude; } + + void setMyName(const std::string& theValue) { myName = theValue; } + std::string getMyName() const { return myName; } + + void setMyCash(const int& theValue) { myCash = theValue; } + int getMyCash() const { return myCash; } + + void setMySet(const int& theValue) { mySet += theValue; myCash -= theValue; } + void setMySetNull() { mySet = 0; } + int getMySet() const { return mySet;} + + void setMyAction(const int& theValue) { myAction = theValue; } + int getMyAction() const { return myAction; } + + void setMyButton(const int& theValue) { myButton = theValue; } + int getMyButton() const { return myButton; } + + void setMyActiveStatus(bool theValue) { myActiveStatus = theValue; } + bool getMyActiveStatus() const { return myActiveStatus; } + + void setMyCards(int* theValue) { int i; for(i=0; i<2; i++) myCards[i] = theValue[i]; } + void getMyCards(int* theValue) { int i; for(i=0; i<2; i++) theValue[i] = myCards[i]; } + + void setMyTurn(bool theValue){ myTurn = theValue;} + bool getMyTurn() const{ return myTurn;} + + void setMyCardsValueInt(const int& theValue) { myCardsValueInt = theValue;} + int getMyCardsValueInt() const { return myCardsValueInt; } + + void setMyRoundStartCash(const int& theValue) { myRoundStartCash = theValue;} + int getMyRoundStartCash() const { return myRoundStartCash; } + + void setMyAverageSets(const int& theValue) { myAverageSets = theValue; } + int getMyAverageSets() const { return myAverageSets; } + + void action(); + + void preflopEngine(); + void flopEngine(); + void turnEngine(); + void riverEngine(); + + + + + +private: + LocalHand *actualHand; + LocalBoard *actualBoard; + + CardsValue *myCardsValue; + + // Konstanten + int myID; + int myDude; + std::string myName; + + // Laufvariablen + int myCards[2]; + int myCardsValueInt; + int myCash; + int mySet; + int myAction; // 0 = none, 1 = fold, 2 = check, 3 = call, 4 = bet, 5 = raise, 6 = allin + int myButton; // 0 = none, 1 = dealer, 2 =small, 3 = big + bool myActiveStatus; // 0 = inactive, 1 = active + bool myTurn; // 0 = no, 1 = yes + int myRoundStartCash; + + int myAverageSets; + +}; + +#endif diff --git a/src/local_engine/localpreflop.cpp b/src/local_engine/localpreflop.cpp new file mode 100755 index 00000000..71b07212 --- /dev/null +++ b/src/local_engine/localpreflop.cpp @@ -0,0 +1,121 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de *Irische Segenswnsche, + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "localpreflop.h" +#include "localhand.h" + +using namespace std; + +LocalPreflop::LocalPreflop(LocalHand* bR, int id, int qP, int dP, int sB) : myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), bigBlindPosition(0), smallBlind(sB), highestSet(2*sB), preflopFirstRound(TRUE), playersTurn(0) + +{ + + myHand->getBoard()->collectSets(); + myHand->getMainWindowImpl()->refreshPot(); + +// // BigBlind ermitteln + bigBlindPosition = dealerPosition; + while (myHand->getPlayerArray()[bigBlindPosition]->getMyButton() != 3) { + bigBlindPosition = (bigBlindPosition+1)%(myHand->getMainWindowImpl()->getMaxQuantityPlayers()); + } + +// // erste Spielernummer fr preflopRun() setzen + playersTurn = bigBlindPosition; +} + + + +LocalPreflop::~LocalPreflop() +{ + + + +} + +void LocalPreflop::preflopRun() { + +// cout << "NextPlayerSpeed2 stop" << endl; + int i; + bool allHighestSet = 1; + + // prfe, ob alle Sets gleich sind ( falls nicht, dann allHighestSet = 0 ) + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + if(myHand->getPlayerArray()[i]->getMyActiveStatus() && myHand->getPlayerArray()[i]->getMyAction() != 1 && myHand->getPlayerArray()[i]->getMyAction() != 6) { + if(highestSet != myHand->getPlayerArray()[i]->getMySet()) { allHighestSet=0; } + } + } + + // BigBlind ermitteln + bigBlindPosition = dealerPosition; + while (myHand->getPlayerArray()[bigBlindPosition]->getMyButton() != 3) { + bigBlindPosition = (bigBlindPosition+1)%(myHand->getMainWindowImpl()->getMaxQuantityPlayers()); + } + + // prfen, ob Preflop wirklich dran ist + if(!preflopFirstRound && allHighestSet) { + + // Preflop nicht dran, weil wir nicht mehr in erster PreflopRunde und alle Sets gleich sind + //also gehe in Flop + myHand->setActualRound(1); + + //Action l�chen und ActionButtons refresh + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + if(myHand->getPlayerArray()[i]->getMyAction() != 1 && myHand->getPlayerArray()[i]->getMyAction() != 6) myHand->getPlayerArray()[i]->setMyAction(0); + } + //Sets in den Pot verschieben und Sets = 0 und Pot-refresh + myHand->getBoard()->collectSets(); + myHand->getBoard()->collectPot(); + myHand->getMainWindowImpl()->refreshPot(); + myHand->getMainWindowImpl()->refreshAll(); + + myHand->switchRounds(); + + } + else { + // Preflop ist wirklich dran + + // n�hsten Spieler ermitteln + do { + + playersTurn = (playersTurn+1)%(myHand->getMainWindowImpl()->getMaxQuantityPlayers()); + // falls BigBlind, dann PreflopFirstRound zuende + if(myHand->getPlayerArray()[playersTurn]->getMyButton() == 3) preflopFirstRound = FALSE; + + } while(!(myHand->getPlayerArray()[playersTurn]->getMyActiveStatus()) || myHand->getPlayerArray()[playersTurn]->getMyAction() == 1 || myHand->getPlayerArray()[playersTurn]->getMyAction() == 6); + + myHand->getPlayerArray()[playersTurn]->setMyTurn(TRUE); + myHand->getMainWindowImpl()->refreshGroupbox(); + + if(playersTurn == 0) { + // Wir sind dran + myHand->getMainWindowImpl()->meInAction(); + } + else { + //Gegner sind dran +// cout << "NextPlayerSpeed3 start" << endl; + myHand->getGuiInterface()->preflopAnimation2(); + } + } +} + +void LocalPreflop::nextPlayer2() { +// cout << "NextPlayerSpeed3 stop" << endl; + myHand->getPlayerArray()[playersTurn]->action(); + +} diff --git a/src/local_engine/localpreflop.h b/src/local_engine/localpreflop.h new file mode 100755 index 00000000..88d502eb --- /dev/null +++ b/src/local_engine/localpreflop.h @@ -0,0 +1,65 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + *************************************************************************/ +#ifndef LOCALPREFLOP_H +#define LOCALPREFLOP_H + +#include + +class LocalHand; + +class LocalPreflop { + +public: + LocalPreflop(LocalHand*, int, int, int, int); + + ~LocalPreflop(); + + + void setPlayersTurn(const int& theValue) { playersTurn = theValue; } + int getPlayersTurn() const { return playersTurn; } + + void setHighestSet(const int& theValue) { highestSet = theValue; } + int getHighestSet() const { return highestSet;} + + void setLocalPreflopFirstRound(bool theValue) { preflopFirstRound = theValue; } + bool setLocalPreflopFirstRound() const { return preflopFirstRound; } + + void preflopRun(); + void nextPlayer2(); + + +private: + LocalHand *myHand; + + int myID; + int actualQuantityPlayers; + int dealerPosition; + int bigBlindPosition; + + int smallBlind; + int highestSet; + + bool preflopFirstRound; + int playersTurn; + + +}; + +#endif diff --git a/src/local_engine/localriver.cpp b/src/local_engine/localriver.cpp new file mode 100755 index 00000000..95e954b1 --- /dev/null +++ b/src/local_engine/localriver.cpp @@ -0,0 +1,426 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "localriver.h" + +#include "localhand.h" + +using namespace std; + +LocalRiver::LocalRiver(LocalHand* bR, int id, int qP, int dP, int sB) : myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstRiverRun(TRUE), firstRiverRound(TRUE), playersTurn(dP), highestCardsValue(0) + +{ int i; + + //SmallBlind-Position ermitteln + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + if (myHand->getPlayerArray()[i]->getMyButton() == 2) smallBlindPosition = i; + } + +} + +LocalRiver::~LocalRiver() +{ +} + + +void LocalRiver::riverRun() { + + int i; + + if (firstRiverRun) { + myHand->getGuiInterface()->dealRiverCard(); + firstRiverRun = FALSE; + + } + + else { + bool allHighestSet = 1; + + // prfe, ob alle Sets gleich sind ( falls nicht, dann allHighestSet = 0 ) + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + if(myHand->getPlayerArray()[i]->getMyActiveStatus() && myHand->getPlayerArray()[i]->getMyAction() != 1 && myHand->getPlayerArray()[i]->getMyAction() != 6) { +// cout << "Spieler " << i << " Set " << myHand->getPlayerArray()[i]->getMySet() << endl; + if(highestSet != myHand->getPlayerArray()[i]->getMySet()) { allHighestSet=0; } + } + } +// cout << "allHighestSet " << allHighestSet << endl; + +// cout << "firstflopround " << firstRiverRound << endl; + + // prfen, ob River wirklich dran ist + if(!firstRiverRound && allHighestSet) { + + // River nicht dran, weil alle Sets gleich sind + //also gehe in Turn + myHand->setActualRound(4); + + //Action lᅵchen und ActionButtons refresh + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + if(myHand->getPlayerArray()[i]->getMyAction() != 1 && myHand->getPlayerArray()[i]->getMyAction() != 6) myHand->getPlayerArray()[i]->setMyAction(0); + } + //Sets in den Pot verschieben und Sets = 0 und Pot-refresh + myHand->getBoard()->collectSets(); + myHand->getBoard()->collectPot(); + myHand->getMainWindowImpl()->refreshPot(); + myHand->getMainWindowImpl()->refreshAll(); + + myHand->switchRounds(); + + } + else { + // River ist wirklich dran + + // nᅵhsten Spieler ermitteln + do { playersTurn = (playersTurn+1)%(myHand->getMainWindowImpl()->getMaxQuantityPlayers()); + } while(!(myHand->getPlayerArray()[playersTurn]->getMyActiveStatus()) || (myHand->getPlayerArray()[playersTurn]->getMyAction())==1 || (myHand->getPlayerArray()[playersTurn]->getMyAction())==6); + + //Spieler-Position vor SmallBlind-Position ermitteln + int activePlayerBeforeSmallBlind = smallBlindPosition; + do { activePlayerBeforeSmallBlind = (activePlayerBeforeSmallBlind + myHand->getMainWindowImpl()->getMaxQuantityPlayers() - 1 ) % (myHand->getMainWindowImpl()->getMaxQuantityPlayers()); + } while(!(myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyActiveStatus()) || (myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyAction())==1 || (myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyAction())==6); + + myHand->getPlayerArray()[playersTurn]->setMyTurn(TRUE); + myHand->getMainWindowImpl()->refreshGroupbox(); + +// cout << "activePlayerBeforeSmallBlind " << activePlayerBeforeSmallBlind << endl; +// cout << "playersTurn " << playersTurn << endl; + // wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende + if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstRiverRound = FALSE; } + + if(playersTurn == 0) { + // Wir sind dran +// cout << "actualRound " << myHand->getActualRound() << endl; +// cout << "highestSet vor meInAction " << highestSet << endl; + myHand->getMainWindowImpl()->meInAction(); + } + else { + //Gegner sind dran + myHand->getGuiInterface()->riverAnimation2(); + } + } + } +} + +void LocalRiver::postRiverRun() { + + int i; + + // für die Engine die durchschnittlichen Sets von Player 0 setzen + if(myID < 5) { + myHand->getPlayerArray()[0]->setMyAverageSets(((myHand->getPlayerArray()[0]->getMyAverageSets())*(myID-1))/myID + (myHand->getPlayerArray()[0]->getMyRoundStartCash()-myHand->getPlayerArray()[0]->getMyCash())/myID); + } else { + myHand->getPlayerArray()[0]->setMyAverageSets(((myHand->getPlayerArray()[0]->getMyAverageSets())*4)/5 + (myHand->getPlayerArray()[0]->getMyRoundStartCash()-myHand->getPlayerArray()[0]->getMyCash())/5); + } + +// cout << myHand->getPlayerArray()[0]->getMyAverageSets() << endl; + + //berechnen welcher Spieler gewonnen hat + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + +// cout << "Spieler: " << i << " hat: " << myHand->getPlayerArray()[i]->getMyCardsValueInt() << endl; + + if(myHand->getPlayerArray()[i]->getMyActiveStatus() && myHand->getPlayerArray()[i]->getMyAction() != 1 && myHand->getPlayerArray()[i]->getMyCardsValueInt() > highestCardsValue ) { + highestCardsValue = myHand->getPlayerArray()[i]->getMyCardsValueInt(); + } + } + + // Pot-Verteilung + distributePot(); + + //Pot auf 0 setzen + myHand->getBoard()->setPot(0); + + //starte die Animaionsreihe + myHand->getMainWindowImpl()->postRiverRunAnimation1(); +} + +void LocalRiver::nextPlayer2() { + + myHand->getPlayerArray()[playersTurn]->action(); + +} + +void LocalRiver::distributePot() { + +// int potCalcAllinArray[5][2]; // 0 -> ID , 1 -> AllInCash + + int i, j; + + //////////////////// + // (1) EINLEITUNG // + //////////////////// + + // die Potverteilung gliedert sich in mehrere Runden: + // in der ersten Runden sucht sich der Winner der BettingRound seinen zustehenden Anteil am Pot raus. das kann alles oder nur ein Teil sein (z.b. wenn er mit wenig allin gegangen ist und der Rest weitergespielt hat) + // in den darauffolgenden Verteilungsrunden suchen sich die jeweils nᅵhsten Winner aus dem noch brig gebliebenen Pot ihren zustehenden Anteil raus + // die gesamte Potverteilung ist zuende, wenn der Pot leer ist und nichts mehr zu holen ist + + + ///////////////////// + // (2) HILFSMITTEL // + ///////////////////// + + // winnersArray erstellen -> hier werden die winner der jeweiligen Potverteilungsrunden eingetragen + int *winnersArray = new int[myHand->getMainWindowImpl()->getMaxQuantityPlayers()]; + + // Anzahl der winner in einer Potverteilungsrunde + int winnersCounter = 0; + + // dieses Array ermittelt wieviel jeder Spieler wᅵrend der gesamten BettingRound gesetzt hat + int roundSetArray[myHand->getMainWindowImpl()->getMaxQuantityPlayers()]; + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + // Standardwert fr nicht mehr aktive + roundSetArray[i] = 0; + // nur fr die Spieler ermitteln, die noch aktiv sind (inkl. der gefoldeten) + if(myHand->getPlayerArray()[i]->getMyActiveStatus()) { + roundSetArray[i] = myHand->getPlayerArray()[i]->getMyRoundStartCash()-myHand->getPlayerArray()[i]->getMyCash(); + } + } + + // hier steht der CardsValue der Spieler drin die an der Potverteilung teilnehmen (d.h. aktiv und nicht gefoldet), bei allen anderen steht ne 0 + int cardsValueArray[myHand->getMainWindowImpl()->getMaxQuantityPlayers()]; + int playerWantsPotCounter = 0; + + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + // Standardwert + cardsValueArray[i] = 0; + if(myHand->getPlayerArray()[i]->getMyActiveStatus() && myHand->getPlayerArray()[i]->getMyAction() != 1) { + // nur bei den Spielen den Kartenwert eintragen, die an der Potverteilung teilnehmen + cardsValueArray[i] = myHand->getPlayerArray()[i]->getMyCardsValueInt(); + playerWantsPotCounter++; + } + } + + int winner; + int highestCardsValueTemp; + + // fr SplitPotBerechnung; + int winnersSets; + int winnersMaxSet; + int winnersPot; + bool playerIsWinner; + + + + ////////////////////// + // (3) DIE SCHLEIFE // + ////////////////////// + + + // Potverteilungsrunden -> solange noch was aus dem pot zu vergeben ist + while(playerWantsPotCounter != 0 ) { + + // highestCardsValueTemp zu Beginn der aktuellen Potverteilungsrunde auf Null setzen + highestCardsValueTemp = 0; + + // aktuellen highestCardsValueTemp berechnen, von denen die noch an der Potverteilung teilnehmen + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + if(cardsValueArray[i] > highestCardsValueTemp ) { + highestCardsValueTemp = myHand->getPlayerArray()[i]->getMyCardsValueInt(); + } + } + + // zu Beginn der Potverteilungsrunde die Anzahl der winner auf 0 setzen + winnersCounter = 0; + // Siegerposition und -anzahl von denen ermitteln, die noch an der Potverteilung teilnehmen + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + if(cardsValueArray[i] == highestCardsValueTemp ) { + winnersArray[winnersCounter] = i; + winnersCounter++; + } + } + + // -------------------------------------------------------------- + // A) nur einer hat aktulle Potverteilungsrunde gewonnen gewonnen + // -------------------------------------------------------------- + if(winnersCounter == 1) { + + // winnerID ist an der ersten Stelle im winnersArray + winner = winnersArray[0]; + + // Winner ist nicht All In gegangen -> bekommt den gesamten Pot +// if(myHand->getPlayerArray()[winner]->getMyAction() != 6) { +// +// myHand->getPlayerArray()[winner]->setMyCash(myHand->getPlayerArray()[winner]->getMyCash()+myHand->getBoard()->getPot()); +// myHand->getBoard()->setPot(0); +// playerWantsPotCounter = 1; +// +// } + // Winner ist All In gegangen -> von denen die weniger gesetzt oder gefoldet hatten alles nehmen und von denen die mehr gesetzt hatten nur die eigenen Sets nehmen +// else { + + // alle Spieler nacheinander durchgehen und prfen von wem man wieviel Geld aus dem Pot bekommt + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + + // zuerst prfen ob ein gefoldeter Spieler was gesetzt hatte + if(i != winner && myHand->getPlayerArray()[i]->getMyAction() == 1) { + + // diesen Teil aus dem Pot holen + myHand->getPlayerArray()[winner]->setMyCash(myHand->getPlayerArray()[winner]->getMyCash()+roundSetArray[i]); + // Pot dementsprechend verkleinern + myHand->getBoard()->setPot(myHand->getBoard()->getPot() - roundSetArray[i]); + // deren Sets auf Null seztzen -> in den nᅵhsten Potverteilungsrunden nimmt der Winner dann von diesen Spielern 0 Dollar aus dem Pot + roundSetArray[i] = 0; + + } + + // nun nur von den Spielern holen, die noch an der Potverteilung teilnehmen und natrlich nicht von einem selber + if(i != winner && cardsValueArray[i] != 0) { + + // zuerst alle rauspicken, die weniger oder das gleiche gesetzt hatten + if(roundSetArray[winner] >= roundSetArray[i]) { + + // von denen alles holen + myHand->getPlayerArray()[winner]->setMyCash(myHand->getPlayerArray()[winner]->getMyCash()+roundSetArray[i]); + // Pot dementsprechend verkleinern + myHand->getBoard()->setPot(myHand->getBoard()->getPot() - roundSetArray[i]); + // diese Spieler dann von der weiteren Potverteilung ausschlieᅵn + cardsValueArray[i] = 0; + playerWantsPotCounter--; + // deren Sets auf Null seztzen, da sie schon alles abgegeben haben + roundSetArray[i] = 0; + + } + // nun alle Spieler die mehr gesetzt hatten + else { + + // den eigenen Setanteil aus dem Pot holen + myHand->getPlayerArray()[winner]->setMyCash(myHand->getPlayerArray()[winner]->getMyCash()+roundSetArray[winner]); + myHand->getBoard()->setPot(myHand->getBoard()->getPot() - roundSetArray[winner]); + // den Set des Gegners um den bereits abgenommenen Setanteil verkleinern + roundSetArray[i] = roundSetArray[i] - roundSetArray[winner]; + // diese Spieler nehmen an der weiteren Potverteilung teil + + } + } + } +// // } + + // zum Scluss noch eingenen Set wieder holen + myHand->getPlayerArray()[winner]->setMyCash(myHand->getPlayerArray()[winner]->getMyCash()+roundSetArray[winner]); + myHand->getBoard()->setPot(myHand->getBoard()->getPot() - roundSetArray[winner]); + // nicht mehr an der weiteren Potverteilung teilnehmen, da man sich alles geholt hat was einem zusteht + cardsValueArray[winner] = 0; + playerWantsPotCounter--; + // eigene Sets auf Null seztzen, da sie eben eingesammelt wurden + roundSetArray[winner] = 0; + + } + + + // ---------------------------------------------------------------------- + // B) mehrere haben die aktuelle Potverteilungsrunde gewonnen -> SplitPot + // ---------------------------------------------------------------------- + else { + + // hierfr wird ein temporᅵer WinnersPot erstellt; dort flieᅵn erstmal alle zustehenden Anteile aus dem Pot rauf; am Ende wird dies auf die Winners verteilt + winnersPot = 0; + // hᅵhster Set aller Winner + winnersMaxSet = 0; + + // den hᅵhsten Set aller Winner ermitteln + for(i=0; i winnersMaxSet) winnersMaxSet = roundSetArray[i]; + } + + // gesamtSet aller Winner + winnersSets = 0; + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + + // prfen ob Spieler i zu den Winnern gehᅵt + playerIsWinner = FALSE; + for(j=0; j Spieler i gehᅵt zu den Winnern + } + + // zuerst prfen ob ein gefoldeter Spieler was gesetzt hatte + if(!playerIsWinner && myHand->getPlayerArray()[i]->getMyAction() == 1) { + + // diesen Teil aus dem Pot holen und dem winnersPot geben + winnersPot += roundSetArray[i]; + // Pot dementsprechend verkleinern + myHand->getBoard()->setPot(myHand->getBoard()->getPot() - roundSetArray[i]); + // deren Sets auf Null seztzen -> in den nᅵhsten Potverteilungsrunden nehmen die Winner dann von diesen Spielern 0 Dollar aus dem Pot + roundSetArray[i] = 0; + + } + + // nun nur von den Spielern holen, die noch an der Potverteilung teilnehmen und natrlich nicht zu den Winnern gehᅵen + if(!playerIsWinner && cardsValueArray[i] != 0) { + + // zuerst alle rauspicken, die weniger oder das gleiche gesetzt hatten + if(winnersMaxSet >= roundSetArray[i]) { + + // von denen alles holen + winnersPot += roundSetArray[i]; + // Pot dementsprechend verkleinern + myHand->getBoard()->setPot(myHand->getBoard()->getPot() - roundSetArray[i]); + // diese Spieler dann von der weiteren Potverteilung ausschlieᅵn + cardsValueArray[i] = 0; + playerWantsPotCounter--; + // deren Sets auf Null seztzen, da sie schon alles abgegeben haben + roundSetArray[i] = 0; + + } + // nun alle Spieler die mehr gesetzt hatten + else { + + // den eigenen Setanteil aus dem Pot holen + winnersPot += winnersMaxSet; + myHand->getBoard()->setPot(myHand->getBoard()->getPot() - winnersMaxSet); + // den Set des Gegners um den bereits abgenommenen Setanteil verkleinern + roundSetArray[i] = roundSetArray[i] - winnersMaxSet; + // diese Spieler nehmen an der weiteren Potverteilung teil + + } + } + } + + // zum Schluss noch die eingenen Set aus dem Pot holen + winnersPot += winnersSets; + myHand->getBoard()->setPot(myHand->getBoard()->getPot() - winnersSets); + + // winnersPot verteilen (anteilmᅵig) + for(i=0; igetPlayerArray()[winnersArray[i]]->setMyCash(myHand->getPlayerArray()[winnersArray[i]]->getMyCash()+((roundSetArray[winnersArray[i]]*winnersPot)/winnersSets)); + } + + + for(i=0; igetBoard()->getPot() != 0) cout << "!!! Pot: " << myHand->getBoard()->getPot() << endl; + + delete[] winnersArray; + +} diff --git a/src/local_engine/localriver.h b/src/local_engine/localriver.h new file mode 100755 index 00000000..344fceba --- /dev/null +++ b/src/local_engine/localriver.h @@ -0,0 +1,77 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef LOCALRIVER_H +#define LOCALRIVER_H + +#include + +class LocalHand; + +class LocalRiver { + +public: + LocalRiver(LocalHand*, int, int, int, int); + + ~LocalRiver(); + + void setPlayersTurn(const int& theValue) { playersTurn = theValue; } + int getPlayersTurn() const { return playersTurn; } + + void setHighestSet(const int& theValue) { highestSet = theValue; } + int getHighestSet() const { return highestSet;} + + void setFirstRiverRound(bool theValue) { firstRiverRound = theValue;} + bool getFirstRiverRound() const { return firstRiverRound;} + + void setSmallBlindPosition(const int& theValue) { smallBlindPosition = theValue;} + int getSmallBlindPosition() const { return smallBlindPosition; } + + void setSmallBlind(const int& theValue) { smallBlind = theValue; } + int getSmallBlind() const { return smallBlind; } + + void setHighestCardsValue(const int& theValue) { highestCardsValue = theValue;} + int getHighestCardsValue() const { return highestCardsValue;} + + void riverRun(); + void postRiverRun(); + void nextPlayer2(); + void distributePot(); + +private: + + LocalHand *myHand; + + int myID; + int actualQuantityPlayers; + int dealerPosition; + int smallBlindPosition; + + int smallBlind; + int highestSet; + + bool firstRiverRun; + bool firstRiverRound; + int playersTurn; + + int highestCardsValue; + +}; + +#endif diff --git a/src/local_engine/localturn.cpp b/src/local_engine/localturn.cpp new file mode 100755 index 00000000..b1b8188f --- /dev/null +++ b/src/local_engine/localturn.cpp @@ -0,0 +1,127 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "localturn.h" +#include "localhand.h" + +using namespace std; + +LocalTurn::LocalTurn(LocalHand* bR, int id, int qP, int dP, int sB) : myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstTurnRun(TRUE), firstTurnRound(TRUE), playersTurn(dP) + +{ int i; + + //SmallBlind-Position ermitteln + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + if (myHand->getPlayerArray()[i]->getMyButton() == 2) smallBlindPosition = i; + } + +} + +LocalTurn::~LocalTurn() +{ +} + + +void LocalTurn::turnRun() { + +// cout << "NextPlayerSpeed2 stop" << endl; + int i; + + if (firstTurnRun) { + myHand->getGuiInterface()->dealTurnCard(); + firstTurnRun = FALSE; + + } + + else { + bool allHighestSet = 1; + + // prfe, ob alle Sets gleich sind ( falls nicht, dann allHighestSet = 0 ) + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + if(myHand->getPlayerArray()[i]->getMyActiveStatus() && myHand->getPlayerArray()[i]->getMyAction() != 1 && myHand->getPlayerArray()[i]->getMyAction() != 6) { +// cout << "Spieler " << i << " Set " << myHand->getPlayerArray()[i]->getMySet() << endl; + if(highestSet != myHand->getPlayerArray()[i]->getMySet()) { allHighestSet=0; } + } + } +// cout << "allHighestSet " << allHighestSet << endl; + +// cout << "firstflopround " << firstTurnRound << endl; + + // prfen, ob Turn wirklich dran ist + if(!firstTurnRound && allHighestSet) { + + // Turn nicht dran, weil alle Sets gleich sind + //also gehe in Turn + myHand->setActualRound(3); + + //Action l�chen und ActionButtons refresh + for(i=0; igetMainWindowImpl()->getMaxQuantityPlayers(); i++) { + if(myHand->getPlayerArray()[i]->getMyAction() != 1 && myHand->getPlayerArray()[i]->getMyAction() != 6) myHand->getPlayerArray()[i]->setMyAction(0); + } + //Sets in den Pot verschieben und Sets = 0 und Pot-refresh + myHand->getBoard()->collectSets(); + myHand->getBoard()->collectPot(); + myHand->getMainWindowImpl()->refreshPot(); + myHand->getMainWindowImpl()->refreshAll(); + + myHand->switchRounds(); + + } + else { + // Turn ist wirklich dran + + // n�hsten Spieler ermitteln + do { playersTurn = (playersTurn+1)%(myHand->getMainWindowImpl()->getMaxQuantityPlayers()); + } while(!(myHand->getPlayerArray()[playersTurn]->getMyActiveStatus()) || (myHand->getPlayerArray()[playersTurn]->getMyAction())==1 || (myHand->getPlayerArray()[playersTurn]->getMyAction())==6); + + //Spieler-Position vor SmallBlind-Position ermitteln + int activePlayerBeforeSmallBlind = smallBlindPosition; + do { activePlayerBeforeSmallBlind = (activePlayerBeforeSmallBlind + myHand->getMainWindowImpl()->getMaxQuantityPlayers() - 1 ) % (myHand->getMainWindowImpl()->getMaxQuantityPlayers()); + } while(!(myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyActiveStatus()) || (myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyAction())==1 || (myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyAction())==6); + + myHand->getPlayerArray()[playersTurn]->setMyTurn(TRUE); + myHand->getMainWindowImpl()->refreshGroupbox(); + +// cout << "activePlayerBeforeSmallBlind " << activePlayerBeforeSmallBlind << endl; +// cout << "playersTurn " << playersTurn << endl; + // wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende + if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstTurnRound = FALSE; } + + if(playersTurn == 0) { + // Wir sind dran +// cout << "actualRound " << myHand->getActualRound() << endl; +// cout << "highestSet vor meInAction " << highestSet << endl; + myHand->getMainWindowImpl()->meInAction(); + } + else { + //Gegner sind dran +// cout << "NextPlayerSpeed3 start" << endl; + myHand->getGuiInterface()->turnAnimation2(); + } + } + } +} + +void LocalTurn::nextPlayer2() { +// cout << "NextPlayerSpeed3 stop" << endl; + myHand->getPlayerArray()[playersTurn]->action(); + +} + + diff --git a/src/local_engine/localturn.h b/src/local_engine/localturn.h new file mode 100755 index 00000000..7d202846 --- /dev/null +++ b/src/local_engine/localturn.h @@ -0,0 +1,70 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef LOCALTURN_H +#define LOCALTURN_H + +#include + +class LocalHand; + +class LocalTurn { + +public: + LocalTurn(LocalHand*, int, int, int, int); + + ~LocalTurn(); + + void setPlayersTurn(const int& theValue) { playersTurn = theValue; } + int getPlayersTurn() const { return playersTurn; } + + void setHighestSet(const int& theValue) { highestSet = theValue; } + int getHighestSet() const { return highestSet;} + + void setFirstTurnRound(bool theValue) { firstTurnRound = theValue;} + bool getFirstTurnRound() const { return firstTurnRound;} + + void setSmallBlindPosition(const int& theValue) { smallBlindPosition = theValue;} + int getSmallBlindPosition() const { return smallBlindPosition; } + + void setSmallBlind(const int& theValue) { smallBlind = theValue; } + int getSmallBlind() const { return smallBlind; } + + void turnRun(); + void nextPlayer2(); + +private: + + LocalHand *myHand; + + int myID; + int actualQuantityPlayers; + int dealerPosition; + int smallBlindPosition; + + int smallBlind; + int highestSet; + + bool firstTurnRun; + bool firstTurnRound; + int playersTurn; + +}; + +#endif diff --git a/src/local_engine/tools.cpp b/src/local_engine/tools.cpp new file mode 100755 index 00000000..a26ab1e0 --- /dev/null +++ b/src/local_engine/tools.cpp @@ -0,0 +1,72 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "tools.h" + +using namespace std; + +Tools::Tools() +{ +} + + +Tools::~Tools() +{ +} + + +void Tools::getRandNumber(int start, int end, int howMany, int* randArray, bool different) { + + double r = end-start+1; + + if (!different) { + + int i; + for (i=0; i + + +class Tools{ +public: + Tools(); + + ~Tools(); + + void getRandNumber(int, int, int, int*, bool); + +}; + +#endif diff --git a/src/pokerth.cpp b/src/pokerth.cpp new file mode 100755 index 00000000..6f955b47 --- /dev/null +++ b/src/pokerth.cpp @@ -0,0 +1,52 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + + +#include + +//wenn die Interfaces fertig sind werden die folgenden beiden includes nicht mehr gebraucht +#include "session.h" +#include "mainwindowimpl.h" + +#include "guiwrapper.h" + +class GuiWrapper; + +int main( int argc, char **argv ) +{ + + srand( time(0) ); + + QApplication a( argc, argv ); + Q_INIT_RESOURCE(deck); + + //wenn die Interfaces fertig sind werden die folgenden beiden Objekte nicht mehr gebraucht da sie von GuiWrapper und EngineWrapper erstellt werden. + + mainWindowImpl *myW = new mainWindowImpl; + myW->show(); + + GuiInterface *myGuiInterface = new GuiWrapper(myW); + + + Session theFirst(myW, myGuiInterface); + + + return a.exec(); +} diff --git a/src/session.cpp b/src/session.cpp new file mode 100755 index 00000000..8510c3fd --- /dev/null +++ b/src/session.cpp @@ -0,0 +1,58 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "session.h" +#include "mainwindowimpl.h" +#include "game.h" +#include "guiinterface.h" + +using namespace std; + +Session::Session(mainWindowImpl* w, GuiInterface* g) : actualGame(0), myW(w), myGui(g) +{ + + + +// myW = new mainWindowImpl(); +// a.setMainWidget( w ); +// myW->show(); + // Session an mainwindowimpl bergeben + myW->setSession(this); + + +} + + +Session::~Session() +{ +} + + +void Session::startGame(int qP, int sC, int sB) { + + actualGame = new Game(myW, myGui, qP, sC, sB); + +} + +void Session::deleteGame() { + + delete actualGame; + actualGame = 0; + +} diff --git a/src/session.h b/src/session.h new file mode 100755 index 00000000..76fec9a7 --- /dev/null +++ b/src/session.h @@ -0,0 +1,50 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef STDSESSION_H +#define STDSESSION_H +#include +#include +#include + +class mainWindowImpl; +class GuiInterface; +class Game; + + +class Session{ +public: + + Session(mainWindowImpl*, GuiInterface*); + + ~Session(); + + void startGame(int, int, int); + void deleteGame(); + +private: + Game *actualGame; + mainWindowImpl *myW; + GuiInterface *myGui; + +}; + + + +#endif diff --git a/templates/cpp b/templates/cpp new file mode 100755 index 00000000..f709d5f0 --- /dev/null +++ b/templates/cpp @@ -0,0 +1,19 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ diff --git a/templates/h b/templates/h new file mode 100755 index 00000000..f709d5f0 --- /dev/null +++ b/templates/h @@ -0,0 +1,19 @@ +/*************************************************************************** + * Copyright (C) 2006 by FThauer FHammer * + * f.thauer@web.de * + * * + * 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 2 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, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/