├── README.PACKAGERS ├── logo.png ├── doc ├── mainscreen.png └── CMakeLists.txt ├── icons ├── 16-apps-bovo.png ├── 22-apps-bovo.png ├── 32-apps-bovo.png ├── 48-apps-bovo.png ├── 64-apps-bovo.png ├── 128-apps-bovo.png ├── hisc-app-bovo.svgz └── CMakeLists.txt ├── .flatpak-manifest.json.license ├── po ├── ca │ └── docs │ │ └── bovo │ │ └── mainscreen.png ├── uk │ └── docs │ │ └── bovo │ │ └── mainscreen.png ├── se │ └── bovo.po ├── ast │ └── bovo.po ├── ml │ └── bovo.po ├── zh_CN │ └── bovo.po ├── is │ └── bovo.po ├── oc │ └── bovo.po ├── mai │ └── bovo.po ├── ko │ └── bovo.po ├── sq │ └── bovo.po ├── nn │ └── bovo.po ├── zh_TW │ └── bovo.po ├── ia │ └── bovo.po ├── ka │ └── bovo.po ├── he │ └── bovo.po ├── cs │ └── bovo.po ├── hr │ └── bovo.po ├── pt │ └── bovo.po └── nb │ └── bovo.po ├── CMakePresets.json.license ├── src ├── bovo.qrc ├── Messages.sh ├── gui │ ├── settings.kcfgc │ ├── bovoui.rc │ ├── bovo.kcfg │ ├── view.h │ ├── theme.h │ ├── view.cc │ ├── hintitem.h │ ├── mark.h │ ├── main.cc │ ├── mainwindow.h │ ├── theme.cc │ ├── scene.h │ ├── hintitem.cc │ └── mark.cc ├── game │ ├── test │ │ └── CMakeLists.txt │ ├── square.cc │ ├── dimension.cc │ ├── coord.cc │ ├── move.cc │ ├── board.cc │ ├── square.h │ ├── common.h │ ├── move.h │ ├── dimension.h │ └── coord.h ├── ai │ ├── ai.cc │ ├── aron │ │ ├── aisquare.cc │ │ ├── aiaron.h │ │ ├── aiaron.cc │ │ └── aisquare.h │ ├── ai.h │ ├── aifactory.cc │ ├── gabor │ │ ├── aigabor.h │ │ ├── ai_impl.h │ │ ├── ai_interface.h │ │ ├── ai_interface.cpp │ │ ├── node.h │ │ ├── aigabor.cc │ │ └── node.cpp │ └── aifactory.h ├── CMakeLists.txt └── org.kde.bovo.desktop ├── AUTHORS ├── ExtraDesktop.sh ├── .craft.ini ├── .gitignore ├── INSTALL ├── HISTORY ├── .kde-ci.yml ├── .gitlab-ci.yml ├── .flatpak-manifest.json ├── themes ├── CMakeLists.txt ├── spacy │ └── themerc ├── scribble │ └── themerc ├── gomoku │ └── themerc └── highcontrast │ └── theme.svg ├── LICENSES └── BSD-3-Clause.txt ├── CMakeLists.txt ├── cmake └── InternalMacros.cmake ├── snapcraft.yaml └── CMakePresets.json /README.PACKAGERS: -------------------------------------------------------------------------------- 1 | EXTENDED -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/bovo/HEAD/logo.png -------------------------------------------------------------------------------- /doc/mainscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/bovo/HEAD/doc/mainscreen.png -------------------------------------------------------------------------------- /icons/16-apps-bovo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/bovo/HEAD/icons/16-apps-bovo.png -------------------------------------------------------------------------------- /icons/22-apps-bovo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/bovo/HEAD/icons/22-apps-bovo.png -------------------------------------------------------------------------------- /icons/32-apps-bovo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/bovo/HEAD/icons/32-apps-bovo.png -------------------------------------------------------------------------------- /icons/48-apps-bovo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/bovo/HEAD/icons/48-apps-bovo.png -------------------------------------------------------------------------------- /icons/64-apps-bovo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/bovo/HEAD/icons/64-apps-bovo.png -------------------------------------------------------------------------------- /icons/128-apps-bovo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/bovo/HEAD/icons/128-apps-bovo.png -------------------------------------------------------------------------------- /icons/hisc-app-bovo.svgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/bovo/HEAD/icons/hisc-app-bovo.svgz -------------------------------------------------------------------------------- /.flatpak-manifest.json.license: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: None 2 | # SPDX-License-Identifier: CC0-1.0 3 | -------------------------------------------------------------------------------- /po/ca/docs/bovo/mainscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/bovo/HEAD/po/ca/docs/bovo/mainscreen.png -------------------------------------------------------------------------------- /po/uk/docs/bovo/mainscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/bovo/HEAD/po/uk/docs/bovo/mainscreen.png -------------------------------------------------------------------------------- /doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR bovo) 2 | 3 | -------------------------------------------------------------------------------- /CMakePresets.json.license: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Laurent Montel 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | -------------------------------------------------------------------------------- /src/bovo.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | gui/bovoui.rc 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Messages.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | $EXTRACTRC `find . -name "*.kcfg"` >> rc.cpp 3 | $XGETTEXT rc.cpp `find . -name '*.cc'` -o $podir/bovo.pot 4 | rm -f rc.cpp 5 | 6 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Orignal Author: 2 | Aron Boström (irc: hrafnahnef @ freenode) 3 | 4 | Maintainer: 5 | Pelladi Gabor 6 | 7 | -------------------------------------------------------------------------------- /src/gui/settings.kcfgc: -------------------------------------------------------------------------------- 1 | # Code generation options for kconfig_compiler 2 | File=bovo.kcfg 3 | ClassName=Settings 4 | NameSpace=gui 5 | Singleton=true 6 | Mutators=true 7 | -------------------------------------------------------------------------------- /src/game/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable (testbovo test.cpp) 2 | target_link_library (testbovo game) 3 | install (TARGETS testbovo ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) 4 | -------------------------------------------------------------------------------- /ExtraDesktop.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | #This file outputs in a separate line each file with a .desktop syntax 3 | #that needs to be translated but has a non .desktop extension 4 | find themes -name themerc -print 5 | -------------------------------------------------------------------------------- /.craft.ini: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Laurent Montel 2 | # SPDX-License-Identifier: CC0-1.0 3 | 4 | [BlueprintSettings] 5 | kde/kdegames/klines/klines.packageAppx=True 6 | kde/kdegames.version=master 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: CC0-1.0 2 | # SPDX-FileCopyrightText: none 3 | .kdev4/ 4 | /build*/ 5 | *.kdev4 6 | CMakeLists.txt.user* 7 | .cmake/ 8 | /.clang-format 9 | /compile_commands.json 10 | .clangd 11 | .cache 12 | .idea 13 | /cmake-build* 14 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | Standard CMake build system 2 | =========================== 3 | 4 | $ tar xjf bovo-X.Y-tar.bz2 5 | $ mkdir -p /somewhere/a/build/dir 6 | $ cd /somewhere/a/build/dir 7 | $ cmake /path/to/source/code -DCMAKE_INSTALL_PREFIX=/somewhere/to/install/such/as/opt/kde4 8 | $ make install 9 | -------------------------------------------------------------------------------- /icons/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ecm_install_icons( 2 | ICONS 3 | 16-apps-bovo.png 4 | 22-apps-bovo.png 5 | 32-apps-bovo.png 6 | 48-apps-bovo.png 7 | 64-apps-bovo.png 8 | 128-apps-bovo.png 9 | DESTINATION ${KDE_INSTALL_ICONDIR} 10 | THEME hicolor 11 | ) 12 | -------------------------------------------------------------------------------- /HISTORY: -------------------------------------------------------------------------------- 1 | HISTORY: 2 | ======= 3 | 2002: v0.0, Java source code as Swedish "gymnasium" (upper high school?) examination project 4 | 2007-02: v0.1, ai port to C++ 5 | 2007-02-28: v0.2, command line interface 6 | 2007-03-02: v0.3, gui running, playable 7 | 2007-03-03: import into KDE SVN playground module 8 | 2009-03-23: added a new AI 9 | -------------------------------------------------------------------------------- /.kde-ci.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: None 2 | # SPDX-License-Identifier: CC0-1.0 3 | 4 | Dependencies: 5 | - 'on': ['Linux', 'FreeBSD', 'Windows', 'Android'] 6 | 'require': 7 | 'frameworks/extra-cmake-modules': '@latest-kf6' 8 | 'frameworks/kcoreaddons': '@latest-kf6' 9 | 'frameworks/kcrash': '@latest-kf6' 10 | 'frameworks/kdbusaddons': '@latest-kf6' 11 | 'frameworks/kdoctools': '@latest-kf6' 12 | 'frameworks/ki18n': '@latest-kf6' 13 | 'frameworks/kwidgetsaddons': '@latest-kf6' 14 | 'frameworks/kxmlgui': '@latest-kf6' 15 | 'games/libkdegames': '@same' 16 | 'frameworks/kiconthemes': '@latest-kf6' 17 | 18 | Options: 19 | require-passing-tests-on: ['Linux', 'FreeBSD', 'Windows'] 20 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: None 2 | # SPDX-License-Identifier: CC0-1.0 3 | 4 | include: 5 | - project: sysadmin/ci-utilities 6 | file: 7 | - /gitlab-templates/linux-qt6.yml 8 | - /gitlab-templates/linux-qt6-next.yml 9 | - /gitlab-templates/freebsd-qt6.yml 10 | - /gitlab-templates/windows-qt6.yml 11 | - /gitlab-templates/flatpak.yml 12 | - /gitlab-templates/craft-windows-x86-64-qt6.yml 13 | - /gitlab-templates/craft-windows-appx-qt6.yml 14 | - /gitlab-templates/craft-macos-x86-64-qt6.yml 15 | - /gitlab-templates/craft-macos-arm64-qt6.yml 16 | - /gitlab-templates/xml-lint.yml 17 | - /gitlab-templates/yaml-lint.yml 18 | - /gitlab-templates/documentation.yml 19 | -------------------------------------------------------------------------------- /src/gui/bovoui.rc: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /.flatpak-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "org.kde.bovo", 3 | "branch": "master", 4 | "runtime": "org.kde.Platform", 5 | "runtime-version": "6.10", 6 | "sdk": "org.kde.Sdk", 7 | "command": "bovo", 8 | "tags": [ 9 | "nightly" 10 | ], 11 | "desktop-file-name-suffix": " (Nightly)", 12 | "finish-args": [ 13 | "--share=ipc", 14 | "--socket=fallback-x11", 15 | "--socket=wayland" 16 | ], 17 | "modules": [ 18 | { 19 | "name": "libkdegames", 20 | "buildsystem": "cmake-ninja", 21 | "sources": [ 22 | { 23 | "type": "git", 24 | "url": "https://invent.kde.org/games/libkdegames", 25 | "branch": "master" 26 | } 27 | ] 28 | }, 29 | { 30 | "name": "bovo", 31 | "buildsystem": "cmake-ninja", 32 | "sources": [ 33 | { 34 | "type": "dir", 35 | "path": "." 36 | } 37 | ] 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /src/gui/bovo.kcfg: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | scribble 11 | 12 | 13 | 14 | 150 15 | 2000 16 | 400 17 | 18 | 19 | 20 | true 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | Gabor 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/ai/ai.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | 23 | /** 24 | * @file ai.cc implementing the Ai class 25 | */ 26 | 27 | #include "ai.h" 28 | #include "aron/aiaron.h" 29 | #include "gabor/aigabor.h" 30 | 31 | 32 | /** namespace for AI stuff */ 33 | namespace ai { 34 | 35 | Ai::~Ai() = default; 36 | 37 | } /* namespace ai */ 38 | 39 | #include "moc_ai.cpp" 40 | -------------------------------------------------------------------------------- /themes/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 Friedrich W. H. Kossebau 2 | # 3 | # SPDX-License-Identifier: BSD-3-Clause 4 | 5 | set(BOVO_INSTALL_THEMESDIR "${KDE_INSTALL_DATADIR}/bovo/themes") 6 | 7 | function(install_theme id) 8 | cmake_parse_arguments(ARG "" "" "FILES" ${ARGN}) 9 | foreach(_file ${ARG_FILES}) 10 | get_filename_component(_dir "${_file}" DIRECTORY) 11 | get_filename_component(_extension "${_file}" EXT) 12 | 13 | if (_extension STREQUAL ".svg") 14 | set(svgz "${CMAKE_CURRENT_BINARY_DIR}/${_file}z") 15 | generate_svgz("${_file}" "${svgz}" "theme-${_dir}-") 16 | set(_file "${svgz}") 17 | endif() 18 | install( FILES ${_file} DESTINATION ${BOVO_INSTALL_THEMESDIR}/${_dir} ) 19 | endforeach() 20 | endfunction() 21 | 22 | install_theme(scribble 23 | FILES 24 | scribble/theme.svg 25 | scribble/themerc 26 | ) 27 | 28 | install_theme(highcontrast 29 | FILES 30 | highcontrast/theme.svg 31 | highcontrast/themerc 32 | ) 33 | 34 | # Spacy and Gomoku doesn't have white background color 35 | # causing trouble on theme switching. Disable them for 4.0 36 | # and solve POST-4.0 37 | install_theme(spacy 38 | FILES 39 | spacy/theme.svg 40 | spacy/themerc 41 | ) 42 | 43 | install_theme(gomoku 44 | FILES 45 | gomoku/theme.svg 46 | gomoku/themerc 47 | ) 48 | -------------------------------------------------------------------------------- /src/game/square.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #include "square.h" 23 | 24 | /** @file file implementing the Square class */ 25 | 26 | /** namespace for game engine */ 27 | namespace bovo { 28 | 29 | Square::Square() : m_player(No) { 30 | } 31 | 32 | Player Square::player() const { 33 | return m_player; 34 | } 35 | 36 | bool Square::empty() const { 37 | return m_player == No; 38 | } 39 | 40 | void Square::setPlayer(Player player) { 41 | m_player = player; 42 | } 43 | 44 | } /* namespace bovo */ 45 | -------------------------------------------------------------------------------- /src/gui/view.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * This file is part of the KDE project "Bovo" 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #ifndef BOVO_VIEW_H 23 | #define BOVO_VIEW_H 24 | 25 | #include 26 | 27 | namespace gui 28 | { 29 | 30 | class Scene; 31 | class bgColor; 32 | 33 | class View : public QGraphicsView 34 | { 35 | public: 36 | View(Scene *scene, const QColor &bgColor, QWidget *parent); 37 | 38 | private: 39 | void resizeEvent(QResizeEvent *) override; 40 | QSize sizeHint() const override; 41 | 42 | Scene *m_scene; 43 | }; 44 | 45 | } /* namespace gui */ 46 | 47 | #endif // BOVO_VIEW_H 48 | -------------------------------------------------------------------------------- /src/ai/aron/aisquare.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * This file is part of the KDE project "Bovo" 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #include "aisquare.h" 23 | 24 | using namespace bovo; 25 | 26 | namespace ai { 27 | 28 | AiSquare::AiSquare() : Square(), m_points(0), m_status(true) { 29 | } 30 | 31 | uli AiSquare::points() const { 32 | return m_points; 33 | } 34 | 35 | void AiSquare::setPoints(uli points) { 36 | m_points = points; 37 | } 38 | 39 | bool AiSquare::status() const { 40 | return m_status; 41 | } 42 | 43 | void AiSquare::setStatus(bool status) { 44 | m_status = status; 45 | } 46 | 47 | } /* namespace ai */ 48 | 49 | -------------------------------------------------------------------------------- /LICENSES/BSD-3-Clause.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) . All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without modification, 4 | are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | 3. Neither the name of the copyright holder nor the names of its contributors 14 | may be used to endorse or promote products derived from this software without 15 | specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 23 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 24 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 26 | USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /src/game/dimension.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #include "dimension.h" 23 | #include "coord.h" 24 | 25 | namespace bovo { 26 | 27 | Dimension::Dimension(usi width, usi height) 28 | : m_height(height), m_width(width) { 29 | } 30 | 31 | Dimension::Dimension(const Dimension& dimension) 32 | = default; 33 | 34 | usi Dimension::height() const { 35 | return m_height; 36 | } 37 | 38 | usi Dimension::width() const { 39 | return m_width; 40 | } 41 | 42 | bool Dimension::ok(const Coord* c) const { 43 | return c->x() < m_width && c->y() < m_height; 44 | } 45 | 46 | bool Dimension::ok(const Coord& c) const { 47 | return c.x() < m_width && c.y() < m_height; 48 | } 49 | 50 | } /* namespace bovo */ 51 | -------------------------------------------------------------------------------- /src/game/coord.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #include "coord.h" 23 | 24 | /** @file file implementing class Coord */ 25 | 26 | /** namespace for game engine */ 27 | namespace bovo { 28 | 29 | Coord::Coord(usi x, usi y): m_x(x), m_y(y) { 30 | } 31 | 32 | Coord Coord::down() const { 33 | return Coord(m_x, m_y+1); 34 | } 35 | 36 | Coord Coord::left() const { 37 | return Coord(m_x-1, m_y); 38 | } 39 | 40 | bool Coord::null() const { 41 | return m_x == static_cast(-1) && m_y == static_cast(-1); 42 | } 43 | 44 | Coord Coord::right() const { 45 | return Coord(m_x+1, m_y); 46 | } 47 | 48 | Coord Coord::up() const { 49 | return Coord(m_x, m_y-1); 50 | } 51 | 52 | usi Coord::x() const { 53 | return m_x; 54 | } 55 | 56 | usi Coord::y() const { 57 | return m_y; 58 | } 59 | 60 | } /* namespace bovo */ 61 | -------------------------------------------------------------------------------- /src/game/move.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | /** @file move.cc implements Move */ 23 | 24 | #include "move.h" 25 | 26 | 27 | #include "common.h" 28 | 29 | /** namespace for game engine */ 30 | namespace bovo { 31 | 32 | Move::Move(Player player, int col, int row) 33 | : m_coord(col, row), m_player(player) { 34 | } 35 | 36 | Move::Move(Player player, const Coord& coord) 37 | : m_coord(coord), m_player(player) { 38 | } 39 | 40 | Move::Move(const Move &m) 41 | = default; 42 | 43 | Move::~Move() = default; 44 | 45 | Coord Move::coord() const { 46 | return m_coord; 47 | } 48 | 49 | Player Move::player() const { 50 | return m_player; 51 | } 52 | 53 | bool Move::valid() const { 54 | return m_player != No && m_coord.x() < NUMCOLS && m_coord.y() < NUMCOLS; 55 | } 56 | 57 | usi Move::x() const { 58 | return m_coord.x(); 59 | } 60 | 61 | usi Move::y() const { 62 | return m_coord.y(); 63 | } 64 | 65 | } /* namespace bovo */ 66 | -------------------------------------------------------------------------------- /src/gui/theme.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * This file is part of the KDE project "Bovo" 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #ifndef BOVO_THEME_H 23 | #define BOVO_THEME_H 24 | 25 | // Qt includes 26 | #include 27 | #include 28 | 29 | namespace gui 30 | { 31 | 32 | enum GridType { SvgGrid, GomokuGrid, SquaresGrid }; 33 | 34 | class Theme 35 | { 36 | public: 37 | Theme(); 38 | Theme(const QString &path, const int id); 39 | 40 | QColor backgroundColor() const; 41 | QString comment() const; 42 | qreal fill() const; 43 | QColor gridColor() const; 44 | GridType gridType() const; 45 | int id() const; 46 | QString name() const; 47 | QString path() const; 48 | QString svg() const; 49 | 50 | private: 51 | QColor m_backgroundColor; 52 | QString m_comment; 53 | qreal m_fill; 54 | QColor m_gridColor; 55 | GridType m_gridType; 56 | int m_id; 57 | QString m_name; 58 | QString m_path; 59 | QString m_svg; 60 | }; 61 | 62 | } /* namespace gui */ 63 | 64 | #endif // BOVO_THEME_H 65 | -------------------------------------------------------------------------------- /src/ai/aron/aiaron.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | /** 23 | * @file aiaron.h declaring the AiAron class 24 | */ 25 | 26 | #ifndef BOVO_AIARON_H 27 | #define BOVO_AIARON_H 28 | 29 | #include "../ai.h" 30 | 31 | /** namespace for AI stuff */ 32 | namespace ai 33 | { 34 | 35 | class AiBoard; 36 | 37 | /** 38 | * Aron's implementation of the AI player 39 | */ 40 | class AiAron : public Ai 41 | { 42 | Q_OBJECT 43 | public: 44 | explicit AiAron(const Dimension &dimension, KGameDifficultyLevel::StandardLevel skill, Player player); 45 | ~AiAron() override; 46 | void cancelAndWait() override; 47 | 48 | public Q_SLOTS: 49 | void changeBoard(const Move &move) override; 50 | void gameOver() override; 51 | void setSkill(KGameDifficultyLevel::StandardLevel skill) override; 52 | void slotMove() override; 53 | 54 | Q_SIGNALS: 55 | void move(const Move &move); 56 | 57 | private: 58 | /* Playing board */ 59 | AiBoard *m_board; 60 | 61 | /* AI Player id */ 62 | Player m_player; 63 | }; 64 | 65 | } /* namespace ai */ 66 | 67 | #endif // BOVO_AIARON_H 68 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.16 FATAL_ERROR) 2 | 3 | # KDE Application Version, managed by release script 4 | set(RELEASE_SERVICE_VERSION_MAJOR "26") 5 | set(RELEASE_SERVICE_VERSION_MINOR "03") 6 | set(RELEASE_SERVICE_VERSION_MICRO "70") 7 | set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") 8 | 9 | project(bovo VERSION ${RELEASE_SERVICE_VERSION}) 10 | 11 | set(QT_MIN_VERSION "6.5.0") 12 | set(KF_MIN_VERSION "6.0.0") 13 | 14 | find_package(ECM ${KF_MIN_VERSION} REQUIRED CONFIG) 15 | set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH}) 16 | 17 | include(KDEInstallDirs) 18 | include(KDECMakeSettings) 19 | include(KDECompilerSettings NO_POLICY_SCOPE) 20 | 21 | include(FeatureSummary) 22 | include(ECMInstallIcons) 23 | include(ECMSetupVersion) 24 | include(ECMAddAppIcon) 25 | include(KDEGitCommitHooks) 26 | include(KDEClangFormat) 27 | include(ECMDeprecationSettings) 28 | 29 | include(InternalMacros) 30 | 31 | find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS 32 | Concurrent 33 | Svg 34 | SvgWidgets 35 | Widgets 36 | ) 37 | 38 | find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS 39 | CoreAddons 40 | Crash 41 | DBusAddons 42 | DocTools 43 | I18n 44 | WidgetsAddons 45 | XmlGui 46 | IconThemes 47 | ) 48 | 49 | find_package(KDEGames6 6.0.0 REQUIRED) 50 | 51 | file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.c) 52 | kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) 53 | 54 | # re-enabling exceptions (turned off in KDE) 55 | kde_enable_exceptions() 56 | 57 | ecm_set_disabled_deprecation_versions( 58 | QT 6.10.0 59 | KF 6.19.0 60 | KDEGAMES 6.0 61 | ) 62 | 63 | add_subdirectory (src) 64 | add_subdirectory (themes) 65 | add_subdirectory (icons) 66 | add_subdirectory (doc) 67 | 68 | ki18n_install(po) 69 | kdoctools_install(po) 70 | 71 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 72 | kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT) 73 | -------------------------------------------------------------------------------- /src/gui/view.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | // Declaration include 23 | #include "view.h" 24 | 25 | // Qt Includes 26 | #include 27 | #include 28 | #include 29 | 30 | // Bovo includes 31 | #include "scene.h" 32 | 33 | namespace gui { 34 | 35 | View::View(Scene* scene, const QColor& bgColor, QWidget *parent) : QGraphicsView(scene, parent), 36 | m_scene(scene) { 37 | Q_UNUSED(bgColor); 38 | setFrameStyle(QFrame::NoFrame); 39 | // setCacheMode(QGraphicsView::CacheBackground); 40 | setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 41 | setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 42 | setMinimumSize(sizeHint()); 43 | resize(sizeHint()); 44 | setAlignment(Qt::AlignLeft | Qt::AlignTop); 45 | } 46 | 47 | void View::resizeEvent( QResizeEvent* ev ) { 48 | fitInView(sceneRect(), Qt::KeepAspectRatio); 49 | QGraphicsView::resizeEvent(ev); 50 | } 51 | 52 | QSize View::sizeHint() const { 53 | return {static_cast(m_scene->width()), 54 | static_cast(m_scene->height())}; 55 | } 56 | 57 | } /* namespace gui */ 58 | -------------------------------------------------------------------------------- /src/ai/aron/aiaron.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | 23 | /** 24 | * @file aiaron.cc implementing the AiAron class 25 | */ 26 | 27 | #include "aiaron.h" 28 | 29 | 30 | #include "aiboard.h" 31 | #include "coord.h" 32 | #include "dimension.h" 33 | #include "move.h" 34 | 35 | using namespace bovo; 36 | 37 | /** namespace for AI stuff */ 38 | namespace ai { 39 | 40 | AiAron::AiAron(const Dimension& dimension, KGameDifficultyLevel::StandardLevel skill, 41 | Player player) { 42 | m_board = new AiBoard(dimension, skill, player); 43 | m_player = player; 44 | } 45 | 46 | AiAron::~AiAron() { 47 | delete m_board; 48 | } 49 | 50 | void AiAron::cancelAndWait() { 51 | } 52 | 53 | /* public slots */ 54 | 55 | void AiAron::changeBoard(const Move& move) { 56 | m_board->setPlayer(move); 57 | } 58 | 59 | void AiAron::gameOver() { 60 | } 61 | 62 | void AiAron::setSkill(KGameDifficultyLevel::StandardLevel skill) { 63 | m_board->setSkill(skill); 64 | } 65 | 66 | void AiAron::slotMove() { 67 | Q_EMIT move(Move(m_player, m_board->move())); 68 | } 69 | 70 | } /* namespace ai */ 71 | 72 | #include "moc_aiaron.cpp" 73 | -------------------------------------------------------------------------------- /src/gui/hintitem.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * This file is part of the KDE project "Bovo" 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #ifndef BOVO_HINTITEM_H 23 | #define BOVO_HINTITEM_H 24 | 25 | #include 26 | 27 | class QTimer; 28 | 29 | namespace bovo 30 | { 31 | class Move; 32 | } 33 | 34 | using namespace bovo; 35 | 36 | namespace gui 37 | { 38 | 39 | class Scene; 40 | 41 | class HintItem : public QGraphicsSvgItem 42 | { 43 | Q_OBJECT 44 | public: 45 | HintItem(Scene *scene, const Move &move, bool animate = true, qreal fill = 0.75); 46 | ~HintItem() override; 47 | void killAnimation(); 48 | void kill(); 49 | void setFill(qreal fill); 50 | QRectF boundingRect() const override; 51 | 52 | public Q_SLOTS: 53 | void tick(); 54 | void killTick(); 55 | 56 | Q_SIGNALS: 57 | void killed(); 58 | 59 | protected: 60 | void paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *widget = nullptr) override; 61 | 62 | private: 63 | Scene *m_scene; 64 | int m_row; 65 | int m_col; 66 | int m_tick; 67 | bool m_animate; 68 | qreal m_opacity; 69 | bool m_tickUp; 70 | qreal m_fill; 71 | QTimer *m_ticker; 72 | }; 73 | 74 | } /* namespace gui */ 75 | 76 | #endif // BOVO_HINTITEM_H 77 | -------------------------------------------------------------------------------- /src/gui/mark.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * This file is part of the KDE project "Bovo" 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #ifndef BOVO_MARK_H 23 | #define BOVO_MARK_H 24 | 25 | #include 26 | 27 | #include "common.h" 28 | 29 | namespace bovo 30 | { 31 | class Move; 32 | } 33 | 34 | using namespace bovo; 35 | 36 | class QTimer; 37 | 38 | namespace gui 39 | { 40 | 41 | class Scene; 42 | 43 | class Mark : public QGraphicsSvgItem 44 | { 45 | Q_OBJECT 46 | public: 47 | Mark(Scene *scene, const Move &move, bool animate = true, qreal fill = 0.75); 48 | ~Mark() override; 49 | void killAnimation(); 50 | void kill(); 51 | usi row() const; 52 | usi col() const; 53 | void setFill(qreal fill); 54 | QRectF boundingRect() const override; 55 | 56 | public Q_SLOTS: 57 | void tick(); 58 | void killTick(); 59 | 60 | Q_SIGNALS: 61 | void killed(Mark *thisMark); 62 | 63 | protected: 64 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *widget = nullptr) override; 65 | 66 | private: 67 | Scene *m_scene; 68 | int m_row; 69 | int m_col; 70 | qreal m_fill; 71 | int m_tick; 72 | bool m_animate; 73 | qreal m_opacity; 74 | QTimer *m_ticker; 75 | }; 76 | 77 | } /* namespace gui */ 78 | 79 | #endif // BOVO_MARH_H 80 | -------------------------------------------------------------------------------- /src/ai/ai.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | /** 23 | * @file ai.h declaring the Ai class 24 | */ 25 | 26 | #ifndef BOVO_AI_H 27 | #define BOVO_AI_H 28 | 29 | #include 30 | 31 | #include 32 | 33 | #include "common.h" 34 | 35 | using namespace bovo; 36 | 37 | /** namespace for game engine */ 38 | namespace bovo 39 | { 40 | class Move; 41 | class Coord; 42 | class Dimension; 43 | } /* namespace bovo */ 44 | 45 | /** namespace for AI stuff */ 46 | namespace ai 47 | { 48 | 49 | /** 50 | * An AI player 51 | * 52 | * @code 53 | * Dimension dimension(width, height); 54 | * Ai* ai = aiFactory->createAi(dimension, easy, X, NotDemo); 55 | * Coord move = getMoveFromPlayerEitherByNetworkOrGui(); 56 | * Coord aiMove = ai->move(move); 57 | * doSomethingWithAiMoveLikeDisplayingItInTheGui(aiMove); 58 | * @endcode 59 | */ 60 | class Ai : public QObject 61 | { 62 | Q_OBJECT 63 | public: 64 | /** 65 | * @brief destructs this Ai 66 | * @description destructs this Ai object 67 | */ 68 | ~Ai() override; 69 | virtual void cancelAndWait() = 0; 70 | 71 | public Q_SLOTS: 72 | virtual void changeBoard(const Move &move) = 0; 73 | virtual void gameOver() = 0; 74 | virtual void setSkill(KGameDifficultyLevel::StandardLevel skill) = 0; 75 | virtual void slotMove() = 0; 76 | }; 77 | 78 | } /* namespace ai */ 79 | 80 | #endif // BOVO_AI_H 81 | -------------------------------------------------------------------------------- /src/ai/aifactory.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2009 Pelladi Gabor 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | 23 | /** 24 | * @file aifactory.cc implementing the AiFactory class 25 | */ 26 | 27 | #include "aifactory.h" 28 | #include "ai.h" 29 | #include "aron/aiaron.h" 30 | #include "gabor/aigabor.h" 31 | 32 | 33 | /** namespace for AI stuff */ 34 | namespace ai { 35 | 36 | AiFactory::AiFactory() { 37 | m_aiList.append(QStringLiteral("Gabor")); 38 | m_aiList.append(QStringLiteral("Aron")); 39 | m_ai = 0; 40 | } 41 | 42 | AiFactory::~AiFactory() = default; 43 | 44 | Ai* AiFactory::createAi(const Dimension& dimension, KGameDifficultyLevel::StandardLevel skill, 45 | Player player, DemoMode demoMode) const { 46 | if (demoMode == Demo) { 47 | return new AiAron(dimension, skill, player); 48 | } else { 49 | if (m_ai == 0) { 50 | return new AiGabor(dimension, skill, player); 51 | } else if (m_ai == 1) { 52 | return new AiAron(dimension, skill, player); 53 | } else { 54 | qFatal("Invalid AI!"); 55 | return nullptr; 56 | } 57 | } 58 | } 59 | 60 | const QStringList& AiFactory::aiList() const { 61 | return m_aiList; 62 | } 63 | 64 | int AiFactory::ai() const { 65 | return m_ai; 66 | } 67 | 68 | void AiFactory::changeAi(int ai) { 69 | if (0 <= ai && ai < m_aiList.size()) { 70 | m_ai = ai; 71 | } 72 | } 73 | 74 | } /* namespace ai */ 75 | 76 | #include "moc_aifactory.cpp" 77 | -------------------------------------------------------------------------------- /cmake/InternalMacros.cmake: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021-2023 Friedrich W. H. Kossebau 2 | # 3 | # SPDX-License-Identifier: BSD-3-Clause 4 | 5 | find_package(7Zip) 6 | set_package_properties(7Zip PROPERTIES 7 | PURPOSE "For installing SVG files as SVGZ" 8 | ) 9 | 10 | if(WIN32) 11 | set_package_properties(7Zip PROPERTIES 12 | TYPE REQUIRED 13 | ) 14 | else() 15 | set_package_properties(7Zip PROPERTIES 16 | TYPE OPTIONAL 17 | ) 18 | if(NOT TARGET 7Zip::7Zip) 19 | find_package(gzip) 20 | set_package_properties(gzip PROPERTIES 21 | TYPE REQUIRED 22 | PURPOSE "For installing SVG files as SVGZ (less efficient fallback for 7Zip)" 23 | ) 24 | endif() 25 | endif() 26 | 27 | function(generate_svgz svg_file svgz_file target_prefix) 28 | if (NOT IS_ABSOLUTE ${svg_file}) 29 | set(svg_file "${CMAKE_CURRENT_SOURCE_DIR}/${svg_file}") 30 | endif() 31 | if (NOT EXISTS ${svg_file}) 32 | message(FATAL_ERROR "No such file found: ${svg_file}") 33 | endif() 34 | get_filename_component(_fileName "${svg_file}" NAME) 35 | get_filename_component(_svgzdir "${svgz_file}" DIRECTORY) 36 | 37 | if(TARGET 7Zip::7Zip) 38 | add_custom_command( 39 | OUTPUT ${svgz_file} 40 | COMMAND ${CMAKE_COMMAND} -E make_directory ${_svgzdir} # ensure output dir exists 41 | COMMAND 7Zip::7Zip 42 | ARGS 43 | a 44 | -bd # silence logging 45 | -mx9 # compress best 46 | -tgzip 47 | ${svgz_file} ${svg_file} 48 | DEPENDS ${svg_file} 49 | COMMENT "Gzipping ${_fileName}" 50 | ) 51 | else() 52 | add_custom_command( 53 | OUTPUT ${svgz_file} 54 | COMMAND ${CMAKE_COMMAND} -E make_directory ${_svgzdir} # ensure output dir exists 55 | COMMAND gzip::gzip 56 | ARGS 57 | -9 # compress best 58 | -n # no original name and timestamp stored, for reproducibility 59 | -c # write to stdout 60 | ${svg_file} > ${svgz_file} 61 | DEPENDS ${svg_file} 62 | COMMENT "Gzipping ${_fileName}" 63 | ) 64 | endif() 65 | 66 | add_custom_target("${target_prefix}${_fileName}z" ALL DEPENDS ${svgz_file}) 67 | endfunction() 68 | -------------------------------------------------------------------------------- /src/ai/gabor/aigabor.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2009 Pelladi Gabor 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | /** 23 | * @file aigabor.h declaring the AiGabor class 24 | */ 25 | 26 | #ifndef BOVO_AIGABOR_H 27 | #define BOVO_AIGABOR_H 28 | 29 | #include 30 | 31 | #include "../ai.h" 32 | #include "ai_interface.h" 33 | 34 | /** namespace for AI stuff */ 35 | namespace ai 36 | { 37 | 38 | /** 39 | * Gabor's implementation of the AI player 40 | */ 41 | class AiGabor : public Ai, public AiTimeOver 42 | { 43 | Q_OBJECT 44 | public: 45 | explicit AiGabor(const Dimension &dimension, KGameDifficultyLevel::StandardLevel skill, Player player); 46 | ~AiGabor() override; 47 | void cancelAndWait() override; 48 | bool isTimeOver() override; 49 | 50 | public Q_SLOTS: 51 | void changeBoard(const Move &move) override; 52 | void gameOver() override; 53 | void setSkill(KGameDifficultyLevel::StandardLevel skill) override; 54 | void slotMove() override; 55 | 56 | Q_SIGNALS: 57 | void move(const Move &move); 58 | 59 | private: 60 | /* AI brain */ 61 | AiInterface *m_ai; 62 | 63 | /* AI Player id */ 64 | const Player m_player; 65 | 66 | /* minimum thinking time in milliseconds */ 67 | const int m_minThink; 68 | 69 | /* for getting information about the thinking thread */ 70 | QFuture m_future; 71 | 72 | /* should the thinking thead try to cancel */ 73 | bool m_canceling; 74 | 75 | void slotMoveImpl(); 76 | }; 77 | 78 | } /* namespace ai */ 79 | 80 | #endif // BOVO_AIGABOR_H 81 | -------------------------------------------------------------------------------- /src/game/board.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #include "board.h" 23 | 24 | #include "coord.h" 25 | #include "dimension.h" 26 | #include "move.h" 27 | #include "square.h" 28 | 29 | /** 30 | * @file file implementing class Board, 31 | * which is really not a Board but an entire game. 32 | */ 33 | 34 | /** namespace for game engine */ 35 | namespace bovo { 36 | 37 | Board::Board(const Dimension& dimension) { 38 | m_dimension = new Dimension(dimension.width(), dimension.height()); 39 | m_board = new Square*[m_dimension->width()]; 40 | for (int x = 0; x < m_dimension->width(); ++x) { 41 | m_board[x] = new Square[m_dimension->height()]; 42 | } 43 | } 44 | 45 | Board::~Board() { 46 | for (int x = 0; x < m_dimension->width(); ++x) { 47 | delete[] m_board[x]; 48 | } 49 | delete[] m_board; 50 | delete m_dimension; 51 | } 52 | 53 | bool Board::empty(const Coord& coord) const { 54 | if (!ok(coord)) { 55 | return false; 56 | } 57 | return m_board[coord.x()][coord.y()].empty(); 58 | } 59 | 60 | bool Board::ok(const Coord& coord) const { 61 | return m_dimension->ok(coord); 62 | } 63 | 64 | Player Board::player(const Coord& c) const { 65 | if (!ok(c)) { 66 | return No; 67 | } 68 | return m_board[c.x()][c.y()].player(); 69 | } 70 | 71 | void Board::setPlayer(const Move& move) { 72 | if (!ok(move.coord())) { 73 | return; 74 | } 75 | m_board[move.x()][move.y()].setPlayer(move.player()); 76 | } 77 | 78 | } /* namespace bovo */ 79 | -------------------------------------------------------------------------------- /snapcraft.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024-2025 Scarlett Moore 2 | # 3 | # SPDX-License-Identifier: CC0-1.0 4 | --- 5 | name: bovo 6 | confinement: strict 7 | grade: stable 8 | base: core24 9 | adopt-info: bovo 10 | apps: 11 | bovo: 12 | extensions: 13 | - kde-neon-6 14 | common-id: org.kde.bovo.desktop 15 | desktop: usr/share/applications/org.kde.bovo.desktop 16 | command: usr/bin/bovo 17 | slots: 18 | session-dbus-interface: 19 | interface: dbus 20 | name: org.kde.bovo 21 | bus: session 22 | parts: 23 | bovo: 24 | parse-info: 25 | - usr/share/metainfo/org.kde.bovo.appdata.xml 26 | plugin: cmake 27 | source: . 28 | source-type: local 29 | cmake-parameters: 30 | - -DCMAKE_INSTALL_PREFIX=/usr 31 | - -DCMAKE_BUILD_TYPE=Release 32 | - -DQT_MAJOR_VERSION=6 33 | - -DBUILD_WITH_QT6=ON 34 | - -DBUILD_TESTING=OFF 35 | - -DCMAKE_INSTALL_SYSCONFDIR=/etc 36 | - -DCMAKE_INSTALL_LOCALSTATEDIR=/var 37 | - -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON 38 | - -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF 39 | - -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON 40 | - -DCMAKE_INSTALL_RUNSTATEDIR=/run 41 | - -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON 42 | - -DCMAKE_VERBOSE_MAKEFILE=ON 43 | - -DCMAKE_INSTALL_LIBDIR=lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR 44 | - --log-level=STATUS 45 | - -DCMAKE_LIBRARY_PATH=lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR 46 | build-environment: &build-environment 47 | - LD_LIBRARY_PATH: > 48 | "/snap/mesa-2404/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:/snap/kde-qt6-core24-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libproxy:$LD_LIBRARY_PATH" 49 | prime: 50 | - -usr/lib/*/cmake/* 51 | - -usr/include/* 52 | - -usr/share/ECM/* 53 | - -usr/share/man/* 54 | - -usr/bin/X11 55 | - -usr/lib/gcc/$CRAFT_ARCH_TRIPLET/6.0.0 56 | - -usr/lib/aspell/* 57 | - -usr/share/lintian 58 | gpu-2404: 59 | after: [bovo] 60 | source: https://github.com/canonical/gpu-snap.git 61 | plugin: dump 62 | override-prime: | 63 | craftctl default 64 | ${CRAFT_PART_SRC}/bin/gpu-2404-cleanup mesa-2404 65 | prime: 66 | - bin/gpu-2404-wrapper 67 | cleanup: 68 | after: 69 | - bovo 70 | plugin: nil 71 | build-snaps: 72 | - core24 73 | - kf6-core24 74 | override-prime: | 75 | set -eux 76 | for snap in "core24" "kf6-core24"; do 77 | cd "/snap/$snap/current" && find . -type f,l -exec rm -rf "${CRAFT_PRIME}/{}" \; 78 | done 79 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ecm_setup_version(${RELEASE_SERVICE_VERSION} 2 | VARIABLE_PREFIX BOVO 3 | VERSION_HEADER bovo_version.h 4 | ) 5 | 6 | add_executable(bovo) 7 | 8 | target_sources(bovo PRIVATE 9 | game/game.cc 10 | game/board.cc 11 | game/dimension.cc 12 | game/coord.cc 13 | game/square.cc 14 | game/move.cc 15 | 16 | ai/ai.cc 17 | ai/aifactory.cc 18 | ai/aron/aiaron.cc 19 | ai/aron/aiboard.cc 20 | ai/aron/aisquare.cc 21 | ai/gabor/aigabor.cc 22 | ai/gabor/standing.cpp 23 | ai/gabor/node.cpp 24 | ai/gabor/ai_interface.cpp 25 | ai/gabor/ai_impl.cpp 26 | 27 | gui/hintitem.cc 28 | gui/mark.cc 29 | gui/theme.cc 30 | gui/scene.cc 31 | gui/view.cc 32 | gui/mainwindow.cc 33 | gui/main.cc 34 | 35 | gui/mainwindow.h 36 | gui/mark.h 37 | gui/hintitem.h 38 | gui/view.h 39 | gui/theme.h 40 | gui/scene.h 41 | ai/gabor/ai_impl.h 42 | ai/gabor/ai_interface.h 43 | ai/gabor/aigabor.h 44 | ai/gabor/node.h 45 | ai/gabor/standing.h 46 | ai/ai.h 47 | ai/aifactory.h 48 | ai/aron/aiboard.h 49 | ai/aron/aiaron.h 50 | ai/aron/aisquare.h 51 | game/board.h 52 | game/coord.h 53 | game/game.h 54 | game/square.h 55 | game/dimension.h 56 | game/common.h 57 | game/move.h 58 | 59 | bovo.qrc 60 | ) 61 | 62 | target_include_directories(bovo PRIVATE 63 | game/ 64 | gui/ 65 | ai/ 66 | ) 67 | 68 | kconfig_add_kcfg_files(bovo gui/settings.kcfgc) 69 | 70 | file(GLOB ICONS_SRCS "${CMAKE_SOURCE_DIR}/icons/*-apps-bovo.png") 71 | ecm_add_app_icon(bovo ICONS ${ICONS_SRCS}) 72 | 73 | target_link_libraries(bovo 74 | KDEGames6 75 | KF6::CoreAddons 76 | KF6::XmlGui 77 | KF6::I18n 78 | KF6::DBusAddons 79 | KF6::Crash 80 | Qt6::Svg 81 | Qt6::Concurrent 82 | Qt6::SvgWidgets 83 | KF6::IconThemes 84 | ) 85 | 86 | 87 | if(APPLE) 88 | set_target_properties(bovo PROPERTIES 89 | MACOSX_BUNDLE_DISPLAY_NAME "Bovo" 90 | MACOSX_BUNDLE_BUNDLE_NAME "Bovo" 91 | MACOSX_BUNDLE_LONG_VERSION_STRING "Bovo ${RELEASE_SERVICE_VERSION}" 92 | MACOSX_BUNDLE_SHORT_VERSION_STRING "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}" 93 | MACOSX_BUNDLE_BUNDLE_VERSION "${RELEASE_SERVICE_VERSION}" 94 | MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.bovo" 95 | MACOSX_BUNDLE_COPYRIGHT "2024 The Bovo Developers") 96 | endif() 97 | 98 | install (TARGETS bovo ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) 99 | install (PROGRAMS org.kde.bovo.desktop DESTINATION ${KDE_INSTALL_APPDIR}) 100 | install (FILES org.kde.bovo.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) 101 | -------------------------------------------------------------------------------- /src/game/square.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #ifndef BOVO_SQUARE_H 23 | #define BOVO_SQUARE_H 24 | 25 | #include "common.h" 26 | 27 | /** @file file declaring the Square class */ 28 | 29 | /** namespace for game engine */ 30 | namespace bovo 31 | { 32 | 33 | /** 34 | * A class representing a square in a playing board 35 | * 36 | * This class represents a Square in a playing board. It knows 37 | * if it is empty or if it is marked by a player. 38 | * You can set it to a player, if it is empty, otherwise it will 39 | * throw an exception @c busy. 40 | * 41 | * @code 42 | * Square square; 43 | * if (square.empty()) { // this will be true 44 | * square.setPlayer(X); 45 | * } 46 | * Player player = square.player(); // X 47 | * @endcode 48 | */ 49 | class Square 50 | { 51 | public: 52 | /** 53 | * @brief Empty constructor 54 | * @description Thie constructs an empty square, 55 | * occupied by no player at all. 56 | */ 57 | Square(); 58 | 59 | /** 60 | * @brief Is this Square empty? 61 | * @description Tells whether this square is empty (@c true) 62 | * or occupied by a player (@c false) 63 | * @return @c true if square is empty, @c false otherwise 64 | */ 65 | bool empty() const; 66 | 67 | /** 68 | * @brief player of this square 69 | * @description tells whether this square is occupied by 70 | * player 1, player 2 och no player at all (empty). 71 | * @return player id (X or O) or (No) if empty 72 | */ 73 | Player player() const; 74 | 75 | /** 76 | * @brief sets player id of this square 77 | * @description sets the player id of this square to X or O 78 | */ 79 | void setPlayer(Player player); 80 | 81 | private: 82 | /* player property of this Square */ 83 | Player m_player; 84 | }; 85 | 86 | } /* namespace bovo */ 87 | 88 | #endif // BOVO_SQUARE_H 89 | -------------------------------------------------------------------------------- /src/ai/gabor/ai_impl.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * This file is part of the KDE project "Bovo" 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #ifndef BOVO_AI_IMPL_H 23 | #define BOVO_AI_IMPL_H 24 | 25 | #include "ai_interface.h" 26 | #include "standing.h" 27 | 28 | #include 29 | 30 | using previous_standings_T = std::list; 31 | 32 | class AiImpl 33 | { 34 | public: 35 | AiImpl(); 36 | virtual ~AiImpl(); 37 | 38 | // the width of the table 39 | pos_T table_size_x; 40 | // the height of the table 41 | pos_T table_size_y; 42 | // the starting depth for the search 43 | int start_depth; 44 | // the maximum depth for the search 45 | int max_depth; 46 | // the increment of the depth in every iteration 47 | int depth_increment; 48 | // if set, the AI will think in advance even when he has only one good move 49 | // prevents the AI from wasting thinking time in a competition environment 50 | bool force_thinking; 51 | // the amount of random seed added to the heuristic function in every standing 52 | heur_T heur_seed; 53 | // if set, the AI will print information on the standard output 54 | bool print_info; 55 | // limits the amount of following steps to be investigated from a standing 56 | unsigned int max_branch; 57 | 58 | // interrupt class, returns true if time is over 59 | AiTimeOver *timeOver; 60 | 61 | // current search depth limit 62 | int depth_limit; 63 | 64 | // a new game has started 65 | void newGame(); 66 | // the current player made a step 67 | void step(pos_T x, pos_T y); 68 | // the server made a step 69 | void stepServer(pos_T x, pos_T y); 70 | // undo last move 71 | void undo(); 72 | // suggest a move for the current player 73 | Field think(); 74 | 75 | private: 76 | // the standing persisted across steps 77 | Standing rememberedStanding; 78 | // the game history for undo 79 | previous_standings_T previousStandings; 80 | // suggest a move for the current player from the opening book 81 | Field openingBook(); 82 | }; 83 | 84 | #endif // BOVO_AI_IMPL_H 85 | -------------------------------------------------------------------------------- /src/gui/main.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include "mainwindow.h" 30 | #include "bovo_version.h" 31 | 32 | #define HAVE_KICONTHEME __has_include() 33 | #if HAVE_KICONTHEME 34 | #include 35 | #endif 36 | 37 | #define HAVE_STYLE_MANAGER __has_include() 38 | #if HAVE_STYLE_MANAGER 39 | #include 40 | #endif 41 | using namespace gui; 42 | 43 | int main(int argc, char **argv) { 44 | #if HAVE_KICONTHEME 45 | KIconTheme::initTheme(); 46 | #endif 47 | 48 | QApplication app(argc, argv); 49 | #if HAVE_STYLE_MANAGER 50 | KStyleManager::initStyle(); 51 | #else // !HAVE_STYLE_MANAGER 52 | #if defined(Q_OS_MACOS) || defined(Q_OS_WIN) 53 | QApplication::setStyle(QStringLiteral("breeze")); 54 | #endif // defined(Q_OS_MACOS) || defined(Q_OS_WIN) 55 | #endif // HAVE_STYLE_MANAGER 56 | KLocalizedString::setApplicationDomain(QByteArrayLiteral("bovo")); 57 | 58 | KAboutData aboutData(QStringLiteral("bovo"), i18n("Bovo"), 59 | QStringLiteral(BOVO_VERSION_STRING), i18n("KDE Five in a Row Board Game"), KAboutLicense::GPL, 60 | i18n("(c) 2002-2007, Aron Boström"), 61 | QString(), 62 | QStringLiteral("https://apps.kde.org/bovo")); 63 | aboutData.addAuthor(i18n("Aron Boström"),i18n("Author"), 64 | QStringLiteral("aron.bostrom@gmail.com")); 65 | 66 | app.setWindowIcon(QIcon::fromTheme(QStringLiteral("bovo"))); 67 | 68 | KAboutData::setApplicationData(aboutData); 69 | KCrash::initialize(); 70 | 71 | QCommandLineParser parser; 72 | aboutData.setupCommandLine(&parser); 73 | parser.process(app); 74 | aboutData.processCommandLine(&parser); 75 | KDBusService service; 76 | if( app.isSessionRestored() ) { 77 | kRestoreMainWindows(); 78 | } else { 79 | auto mainWin = new MainWindow(); 80 | mainWin->show(); 81 | } 82 | 83 | return app.exec(); 84 | } 85 | -------------------------------------------------------------------------------- /src/gui/mainwindow.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #ifndef BOVO_MAINWINDOW_H 23 | #define BOVO_MAINWINDOW_H 24 | 25 | #include 26 | #include 27 | 28 | #include 29 | 30 | #include "common.h" 31 | #include "theme.h" 32 | 33 | class QLabel; 34 | 35 | namespace ai 36 | { 37 | class Ai; 38 | class AiFactory; 39 | } 40 | 41 | namespace bovo 42 | { 43 | class Game; 44 | } 45 | 46 | using namespace bovo; 47 | using namespace ai; 48 | 49 | class KSelectAction; 50 | 51 | namespace gui 52 | { 53 | 54 | class Scene; 55 | class View; 56 | 57 | class MainWindow : public KXmlGuiWindow 58 | { 59 | Q_OBJECT 60 | public: 61 | explicit MainWindow(QWidget *parent = nullptr); 62 | ~MainWindow() override; 63 | 64 | public Q_SLOTS: 65 | void hint(); 66 | void slotNewGame(); 67 | void slotPlayerTurn(); 68 | void slotOposerTurn(); 69 | void slotGameOver(); 70 | void slotNewDemo(); 71 | void slotNewDemoWait(); 72 | void slotUndo(); 73 | void replay(); 74 | void changeSkill(); 75 | void changeTheme(int); 76 | void reEnableReplay(); 77 | void enableUndo(); 78 | void disableUndo(); 79 | void setupThemes(); 80 | void save() const; 81 | void setAnimation(bool enabled); 82 | 83 | private: 84 | Scene *m_scene; 85 | View *m_view; 86 | Game *m_game; 87 | Theme m_theme; 88 | QList m_themes; 89 | int m_wins, m_losses; 90 | void setupActions(); 91 | void increaseWins(); 92 | void decreaseWins(); 93 | void updateWins(const int wins); 94 | void increaseLosses(); 95 | void decreaseLosses(); 96 | void updateLosses(const int losses); 97 | QAction *m_hintAct; 98 | QAction *m_undoAct; 99 | KSelectAction *m_themeAct; 100 | bool m_computerStarts; 101 | Ai *m_demoAi; 102 | AiFactory *m_aiFactory; 103 | void readConfig(); 104 | void saveSettings(); 105 | int m_playbackSpeed; 106 | QStringList m_lastGame; 107 | bool m_animate; 108 | bool m_demoMode; 109 | QLabel *m_winsLabel; 110 | QLabel *m_lossesLabel; 111 | }; 112 | 113 | } /* namespace gui */ 114 | 115 | #endif // BOVO_MAINWINDOW_H 116 | -------------------------------------------------------------------------------- /src/gui/theme.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | 23 | #include "theme.h" 24 | 25 | #include "settings.h" 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #include 32 | 33 | namespace gui { 34 | 35 | Theme::Theme() = default; 36 | 37 | Theme::Theme(const QString& path, const int id) 38 | : m_id(id), m_path(path) { 39 | QString themePath = QStringLiteral("themes/%1/").arg(m_path); 40 | themePath = QStandardPaths::locate(QStandardPaths::AppDataLocation, themePath, QStandardPaths::LocateDirectory); 41 | QString themerc = themePath + QLatin1String("themerc"); 42 | KDesktopFile themeConfig(themerc); 43 | m_name = themeConfig.readName(); 44 | m_comment = themeConfig.readComment(); 45 | 46 | KConfig config(themerc); 47 | KConfigGroup configGroup(&config, QStringLiteral("Config")); 48 | m_backgroundColor = configGroup.readEntry("BackgroundColor", "white"); 49 | m_fill = configGroup.readEntry("Fill", 0.75); 50 | m_gridColor = configGroup.readEntry("GridColor", "black"); 51 | 52 | QString gridTypeStr = configGroup.readEntry("GridType", "svg"); 53 | if (gridTypeStr == QLatin1String("svg")) { 54 | m_gridType = SvgGrid; 55 | } else if (gridTypeStr == QLatin1String("gomoku")) { 56 | m_gridType = GomokuGrid; 57 | } else if (gridTypeStr == QLatin1String("squares")) { 58 | m_gridType = SquaresGrid; 59 | } 60 | 61 | m_svg = themePath + configGroup.readEntry("Svg", "theme.svg"); 62 | } 63 | 64 | QColor Theme::backgroundColor() const { 65 | return m_backgroundColor; 66 | } 67 | 68 | QString Theme::comment() const { 69 | return m_comment; 70 | } 71 | 72 | qreal Theme::fill() const { 73 | return m_fill; 74 | } 75 | 76 | QColor Theme::gridColor() const { 77 | return m_gridColor; 78 | } 79 | 80 | GridType Theme::gridType() const { 81 | return m_gridType; 82 | } 83 | 84 | int Theme::id() const { 85 | return m_id; 86 | } 87 | 88 | QString Theme::name() const { 89 | return m_name; 90 | } 91 | 92 | QString Theme::path() const { 93 | return m_path; 94 | } 95 | 96 | QString Theme::svg() const { 97 | return m_svg; 98 | } 99 | 100 | 101 | 102 | } /* namespace gui */ 103 | -------------------------------------------------------------------------------- /src/ai/aifactory.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2009 Pelladi Gabor 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | /** 23 | * @file aifactory.h declaring the AiFactory class 24 | */ 25 | 26 | #ifndef BOVO_AIFACTORY_H 27 | #define BOVO_AIFACTORY_H 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | #include 34 | 35 | #include "common.h" 36 | 37 | using namespace bovo; 38 | 39 | /** namespace for game engine */ 40 | namespace bovo 41 | { 42 | class Dimension; 43 | } /* namespace bovo */ 44 | 45 | /** namespace for AI stuff */ 46 | namespace ai 47 | { 48 | 49 | class Ai; 50 | 51 | /** 52 | * Provider of AI implementations 53 | */ 54 | class AiFactory : public QObject 55 | { 56 | Q_OBJECT 57 | public: 58 | /** 59 | * @brief constructs an AiFactory 60 | * @description constructs an AiFactory object 61 | */ 62 | AiFactory(); 63 | 64 | /** 65 | * @brief destructs this AiFactory 66 | * @description destructs this AiFactory object 67 | */ 68 | ~AiFactory() override; 69 | 70 | /** 71 | * @brief Constructs an Ai with width, height, player and Skill 72 | * @description Constructs an AI player with a specified width, height and 73 | * skill as well as player id using the currently chosen implementation 74 | * @param dimension the dimension controlling width and height 75 | * @param skill the skill (difficulty level) the AI player will be playing with 76 | * @param player player id of this AI 77 | * @param demoMode indicates the current game mode 78 | */ 79 | Ai *createAi(const Dimension &dimension, KGameDifficultyLevel::StandardLevel skill, Player player, DemoMode demoMode) const; 80 | 81 | /** 82 | * @brief returns the available AI-s 83 | * @description returns a list of the names of the available AI-s 84 | */ 85 | const QStringList &aiList() const; 86 | 87 | /** 88 | * @brief returns the current AI 89 | * @description returns the index of the current AI as present in the list 90 | */ 91 | int ai() const; 92 | 93 | /** 94 | * @brief change the AI 95 | * @description changes the current AI to the specified index in the AI list 96 | */ 97 | void changeAi(int ai); 98 | 99 | private: 100 | QStringList m_aiList; 101 | int m_ai; 102 | }; 103 | 104 | } /* namespace ai */ 105 | 106 | #endif // BOVO_AIFACTORY_H 107 | -------------------------------------------------------------------------------- /CMakePresets.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "configurePresets": [ 4 | { 5 | "name": "dev", 6 | "displayName": "Build as debug", 7 | "generator": "Ninja", 8 | "binaryDir": "${sourceDir}/build", 9 | "cacheVariables": { 10 | "CMAKE_BUILD_TYPE": "Debug", 11 | "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" 12 | } 13 | }, 14 | { 15 | "name": "asan", 16 | "displayName": "Build with Asan support.", 17 | "generator": "Ninja", 18 | "binaryDir": "${sourceDir}/build-asan", 19 | "cacheVariables": { 20 | "CMAKE_BUILD_TYPE": "Debug", 21 | "ECM_ENABLE_SANITIZERS" : "'address;undefined'", 22 | "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" 23 | } 24 | }, 25 | { 26 | "name": "unity", 27 | "displayName": "Build with CMake unity support.", 28 | "generator": "Ninja", 29 | "binaryDir": "${sourceDir}/build-unity", 30 | "cacheVariables": { 31 | "CMAKE_BUILD_TYPE": "Debug", 32 | "CMAKE_UNITY_BUILD": "ON", 33 | "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" 34 | } 35 | }, 36 | { 37 | "name": "release", 38 | "displayName": "Build as release mode.", 39 | "generator": "Ninja", 40 | "binaryDir": "${sourceDir}/build-release", 41 | "cacheVariables": { 42 | "CMAKE_BUILD_TYPE": "Release" 43 | } 44 | }, 45 | { 46 | "name": "profile", 47 | "displayName": "profile", 48 | "generator": "Ninja", 49 | "binaryDir": "${sourceDir}/build-profile", 50 | "cacheVariables": { 51 | "CMAKE_BUILD_TYPE": "RelWithDebInfo", 52 | "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" 53 | } 54 | }, 55 | { 56 | "name": "clazy", 57 | "displayName": "clazy", 58 | "generator": "Ninja", 59 | "binaryDir": "${sourceDir}/build-clazy", 60 | "cacheVariables": { 61 | "CMAKE_BUILD_TYPE": "Debug" 62 | }, 63 | "environment": { 64 | "CXX": "clazy", 65 | "CCACHE_DISABLE": "ON" 66 | } 67 | } 68 | ], 69 | "buildPresets": [ 70 | { 71 | "name": "dev", 72 | "configurePreset": "dev" 73 | }, 74 | { 75 | "name": "clazy", 76 | "configurePreset": "clazy", 77 | "environment": { 78 | "CLAZY_CHECKS" : "level0,level1,detaching-member,ifndef-define-typo,isempty-vs-count,qrequiredresult-candidates,reserve-candidates,signal-with-return-value,unneeded-cast,function-args-by-ref,function-args-by-value,returning-void-expression,no-ctor-missing-parent-argument,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function,qproperty-type-mismatch,old-style-connect,qstring-allocations,container-inside-loop,heap-allocated-small-trivial-type,inefficient-qlist,qstring-varargs,level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-typeinfo", 79 | "CCACHE_DISABLE" : "ON" 80 | } 81 | } 82 | ] 83 | } 84 | -------------------------------------------------------------------------------- /src/game/common.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #ifndef BOVO_COMMON_H 23 | #define BOVO_COMMON_H 24 | 25 | /** @file file containing common system wide typedefs, enums and exceptions */ 26 | 27 | /* Number of columns and rows (the same) */ 28 | #define NUMCOLS 22 29 | 30 | /** namespace for game engine */ 31 | namespace bovo 32 | { 33 | 34 | /* a very short positive natural number, such as a X or Y coordinate */ 35 | using usi = unsigned short; 36 | 37 | /* a very long positive natural number, such as score for a certain square */ 38 | using uli = unsigned long; 39 | 40 | /** 41 | * @brief Exception for a busy square 42 | * @description Exception thrown when you tries to set a player of a square 43 | * that is already occupied by a player ("X" or "O"). 44 | * 45 | * @code 46 | * try { 47 | * throw busy(); 48 | * } catch (busy) { 49 | * // error handling code 50 | * } 51 | * @endcode 52 | */ 53 | struct busy { 54 | }; 55 | 56 | /** 57 | * @brief Exception for a coordinate outside board 58 | * @description Exception thrown when a trying to refer to a coordinate 59 | * outside of playing board. 60 | * 61 | * @code 62 | * try { 63 | * throw outOfBounds(); 64 | * } catch (outOfBounds) { 65 | * // error handling code 66 | * } 67 | * @endcode 68 | */ 69 | struct outOfBounds { 70 | }; 71 | 72 | /** 73 | * @brief Exception for Game Over 74 | * @description Exception thrown when a Game is already over. 75 | * 76 | * @code 77 | * try { 78 | * throw gameover(); 79 | * } catch (gameover) { 80 | * // error handling code 81 | * } 82 | * @endcode 83 | */ 84 | struct gameover { 85 | }; 86 | 87 | /** 88 | * Exception thrown when a player isn't valid (neither "X", "O" nor "No") 89 | * 90 | * @code 91 | * try { 92 | * throw notValidPlayer(); 93 | * } catch (notValidPlayer) { 94 | * // error handling code 95 | * } 96 | * @endcode 97 | */ 98 | struct notValidPlayer { 99 | }; 100 | 101 | /** 102 | * Enum for the player id 103 | */ 104 | enum Player { 105 | X = 1, /**< Player 1 */ 106 | O = 2, /**< Player 2 */ 107 | No = 0 /**< No player (empty) */ 108 | }; 109 | 110 | /** 111 | * Enum for whether a game is in demo mode or playing mode 112 | */ 113 | enum DemoMode { 114 | Demo = true, /**< Game is a demo */ 115 | NotDemo = false /**< Game is not a demo */ 116 | }; 117 | 118 | } /* namespace bovo */ 119 | 120 | #endif // BOVO_COMMON_H 121 | -------------------------------------------------------------------------------- /src/ai/gabor/ai_interface.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * This file is part of the KDE project "Bovo" 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #ifndef BOVO_AI_INTERFACE_H 23 | #define BOVO_AI_INTERFACE_H 24 | 25 | // a coordinate of the table 26 | using pos_T = unsigned char; 27 | // memory allocated for a standing 28 | const pos_T max_table_size = 22; 29 | 30 | // a pair of coordinates 31 | struct Field { 32 | pos_T x, y; 33 | Field() 34 | : x(0) 35 | , y(0) 36 | { 37 | } 38 | Field(pos_T x0, pos_T y0) 39 | : x(x0) 40 | , y(y0) 41 | { 42 | } 43 | bool operator==(const Field &field) 44 | { 45 | return x == field.x && y == field.y; 46 | } 47 | }; 48 | 49 | class AiInterface; 50 | class AiImpl; 51 | 52 | class AiTimeOver 53 | { 54 | public: 55 | virtual ~AiTimeOver() = default; 56 | virtual bool isTimeOver() = 0; 57 | }; 58 | 59 | class AiInterface 60 | { 61 | public: 62 | AiInterface(); 63 | virtual ~AiInterface(); 64 | 65 | // set a square table with the specified size 66 | void setTableSize(pos_T tableSize); 67 | // set the width of the table 68 | void setTableSizeX(pos_T tableSizeX); 69 | // set the height of the table 70 | void setTableSizeY(pos_T tableSizeY); 71 | 72 | // set a fixed depth for the search 73 | void setDepth(int depth); 74 | // set the starting depth for the search 75 | void setStartDepth(int startDepth); 76 | // set the maximum depth for the search 77 | void setMaxDepth(int startDepth); 78 | // set the increment of the depth in every iteration 79 | void setDepthIncrement(int startDepth); 80 | // if set, the AI will think in advance even when he has only one good move 81 | // prevents the AI from wasting thinking time in a competition environment 82 | void setForceThinking(bool forceThinking); 83 | // the amount of random seed added to the heuristic function in every standing 84 | void setRandomAmount(int randomAmount); 85 | // if set, the AI will print information on the standard output 86 | void setPrintInfo(bool printInfo); 87 | // interrupt function, returns true if time is over 88 | void setTimeOver(AiTimeOver *timeOver); 89 | 90 | // a new game has started 91 | void newGame(); 92 | // the current player made a step 93 | void step(pos_T x, pos_T y); 94 | // the server made a step 95 | void stepServer(pos_T x, pos_T y); 96 | // undo last move 97 | void undo(); 98 | // suggest a move for the current player 99 | Field think(); 100 | 101 | private: 102 | // implementation class 103 | AiImpl *aiImpl; 104 | }; 105 | 106 | #endif // BOVO_AI_INTERFACE_H 107 | -------------------------------------------------------------------------------- /src/game/move.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | /** @file move.h declares Move */ 23 | 24 | #ifndef BOVO_MOVE_H 25 | #define BOVO_MOVE_H 26 | 27 | #include "common.h" 28 | #include "coord.h" 29 | 30 | /** namespace for game engine */ 31 | namespace bovo 32 | { 33 | 34 | /** 35 | * @brief class representing a move (a Coord and a Player id) 36 | * @description this class represents a game move, that is a player id (Player) 37 | * and a coordinate (Coord). 38 | * 39 | * @code 40 | * Move illegalMove(); // represents the move "-1", i.e. the move before the 41 | * // first move in the game 42 | * Move myMove(X, Coord(x, y)); 43 | * Move identicalMove(myMove.player(), myMove.x(), myMove.y()); 44 | * illegalMove.valid() == false; 45 | * myMove.valid == true; // if Coord(x, y) is in range 46 | * @endcode 47 | */ 48 | class Move 49 | { 50 | public: 51 | /** 52 | * @brief constructs Move 53 | * @description creates a Move with a Player and a coordinate 54 | * @param player player 55 | * @param col x-coordinate 56 | * @param row y-coordinate 57 | */ 58 | explicit Move(Player player = No, int col = -1, int row = -1); 59 | 60 | /** 61 | * @brief constructs Move 62 | * @description creates a Move with a Player and a coordinate 63 | * @param player player 64 | * @param coord coordinate 65 | */ 66 | Move(Player player, const Coord &coord); 67 | 68 | /** 69 | * @brief constructs Move 70 | * @description copy constructor for Move 71 | */ 72 | Move(const Move &m); 73 | 74 | ~Move(); 75 | 76 | /** 77 | * @brief returns the Coord 78 | * @return the coordinate 79 | */ 80 | Coord coord() const; 81 | 82 | /** 83 | * @brief returns the Player 84 | * @return the player 85 | */ 86 | Player player() const; 87 | 88 | /** 89 | * @brief returns whether this is a valid move 90 | * @description tells if the player of this move is X or O and the coord 91 | * is within the playing board limits. 92 | * @return \c true if move is valid, \c false otherwise 93 | */ 94 | bool valid() const; 95 | 96 | /** 97 | * @brief x-coordinate 98 | * @return the x-coordinate 99 | */ 100 | usi x() const; 101 | 102 | /** 103 | * @brief y-coordinate 104 | * @return the y-coordinate 105 | */ 106 | usi y() const; 107 | 108 | private: 109 | /* the coordinate */ 110 | Coord m_coord; 111 | 112 | /* the player */ 113 | Player m_player; 114 | }; 115 | 116 | } /* namespace gui */ 117 | 118 | #endif // BOVO_MOVE_H 119 | -------------------------------------------------------------------------------- /src/ai/gabor/ai_interface.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * This file is part of the KDE project "Bovo" 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #include "ai_interface.h" 23 | #include "ai_impl.h" 24 | 25 | #include 26 | 27 | AiInterface::AiInterface() 28 | { 29 | aiImpl = new AiImpl(); 30 | } 31 | 32 | AiInterface::~AiInterface() 33 | { 34 | delete aiImpl; 35 | } 36 | 37 | void AiInterface::setTableSize(pos_T tableSize) 38 | { 39 | assert(5 <= tableSize && tableSize <= max_table_size); 40 | aiImpl->table_size_x = aiImpl->table_size_y = tableSize; 41 | } 42 | 43 | void AiInterface::setTableSizeX(pos_T tableSizeX) 44 | { 45 | assert(5 <= tableSizeX && tableSizeX <= max_table_size); 46 | aiImpl->table_size_x = tableSizeX; 47 | } 48 | 49 | void AiInterface::setTableSizeY(pos_T tableSizeY) 50 | { 51 | assert(5 <= tableSizeY && tableSizeY <= max_table_size); 52 | aiImpl->table_size_y = tableSizeY; 53 | } 54 | 55 | void AiInterface::setDepth(int depth) 56 | { 57 | assert(depth > 0); 58 | aiImpl->start_depth = aiImpl->max_depth = depth; 59 | aiImpl->depth_increment = 2; 60 | } 61 | 62 | void AiInterface::setStartDepth(int startDepth) 63 | { 64 | assert(startDepth > 0); 65 | aiImpl->start_depth = startDepth; 66 | if (aiImpl->max_depth < aiImpl->start_depth) 67 | aiImpl->max_depth = aiImpl->start_depth; 68 | } 69 | 70 | void AiInterface::setMaxDepth(int maxDepth) 71 | { 72 | assert(maxDepth > 0); 73 | aiImpl->max_depth = maxDepth; 74 | if (aiImpl->start_depth > aiImpl->max_depth) 75 | aiImpl->start_depth = aiImpl->max_depth; 76 | } 77 | 78 | void AiInterface::setDepthIncrement(int depthIncrement) 79 | { 80 | assert(depthIncrement > 0); 81 | aiImpl->depth_increment = depthIncrement; 82 | } 83 | 84 | void AiInterface::setForceThinking(bool forceThinking) 85 | { 86 | aiImpl->force_thinking = forceThinking; 87 | } 88 | 89 | void AiInterface::setRandomAmount(int randomAmount) 90 | { 91 | aiImpl->heur_seed = randomAmount; 92 | } 93 | 94 | void AiInterface::setPrintInfo(bool printInfo) 95 | { 96 | aiImpl->print_info = printInfo; 97 | } 98 | 99 | void AiInterface::setTimeOver(AiTimeOver *timeOver) 100 | { 101 | assert(timeOver); 102 | aiImpl->timeOver = timeOver; 103 | } 104 | 105 | void AiInterface::newGame() 106 | { 107 | aiImpl->newGame(); 108 | } 109 | 110 | void AiInterface::step(pos_T x, pos_T y) 111 | { 112 | aiImpl->step(x, y); 113 | } 114 | 115 | void AiInterface::stepServer(pos_T x, pos_T y) 116 | { 117 | aiImpl->stepServer(x, y); 118 | } 119 | 120 | void AiInterface::undo() 121 | { 122 | aiImpl->undo(); 123 | } 124 | 125 | Field AiInterface::think() 126 | { 127 | return aiImpl->think(); 128 | } 129 | -------------------------------------------------------------------------------- /src/gui/scene.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * This file is part of the KDE project "Bovo" 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #ifndef BOVO_SCENE_H 23 | #define BOVO_SCENE_H 24 | 25 | #include 26 | #include 27 | 28 | #include "common.h" 29 | 30 | class QSvgRenderer; 31 | class QPainter; 32 | class QTimer; 33 | 34 | namespace bovo 35 | { 36 | class Move; 37 | class Game; 38 | } 39 | 40 | using namespace bovo; 41 | 42 | namespace gui 43 | { 44 | class HintItem; 45 | class Mark; 46 | class Theme; 47 | 48 | class Scene : public QGraphicsScene 49 | { 50 | Q_OBJECT 51 | 52 | public: 53 | explicit Scene(const Theme &theme, bool animation = true); 54 | ~Scene() override; 55 | void activate(bool activate); 56 | void setGame(Game *game); 57 | bool isBusy() const; 58 | void setTheme(const Theme &theme); 59 | qreal squareSize() const; 60 | QPointF cellCenter(int x, int y) const; 61 | QPointF cellTopLeft(int x, int y) const; 62 | 63 | public Q_SLOTS: 64 | void updateBoard(const Move &move); 65 | void slotPlayerTurn(); 66 | void slotOposerTurn(); 67 | void slotGameOver(const QList &winningMoves); 68 | void hint(const Move &hint); 69 | void hintTimeout(); 70 | void destroyHint(); 71 | void enableAnimation(bool enabled); 72 | void setWin(); 73 | void replay(); 74 | void killMark(Mark *); 75 | 76 | protected: 77 | bool event(QEvent *event) override; 78 | 79 | Q_SIGNALS: 80 | void move(const Move &); 81 | 82 | private: 83 | void drawBackground(QPainter *p, const QRectF &rect) override; 84 | void drawForeground(QPainter *p, const QRectF &rect) override; 85 | void mousePressEvent(QGraphicsSceneMouseEvent *) override; 86 | void mouseMoveEvent(QGraphicsSceneMouseEvent *) override; 87 | void killAnimations(); 88 | bool m_activate; 89 | Game *m_game; 90 | QSvgRenderer *m_bkgndRenderer; 91 | QSvgRenderer *m_renderer; 92 | qreal m_curCellSize; 93 | QList::const_iterator m_replayEnd; 94 | QList::const_iterator m_replayIterator; 95 | QTimer *m_replayTimer; 96 | QTimer *m_hintTimer; 97 | // int m_hintCounter; 98 | HintItem *m_hintItem; 99 | Player m_player; 100 | bool m_animation; 101 | QList m_winningMoves; 102 | uint m_row; 103 | uint m_col; 104 | bool m_paintMarker; 105 | uint m_lastRow; 106 | uint m_lastCol; 107 | bool m_showLast; 108 | void removePaintMarker(); 109 | void setPaintMarker(uint col, uint row); 110 | void removeShowLast(); 111 | void setShowLast(uint col, uint row); 112 | qreal m_fill; 113 | void loadTheme(const Theme &theme); 114 | }; 115 | 116 | } /* namespace gui */ 117 | 118 | #endif // BOVO_SCENE_H 119 | -------------------------------------------------------------------------------- /themes/spacy/themerc: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Spacy 3 | Name[ar]=فضائيّة 4 | Name[bg]=Звезден 5 | Name[bs]=Svemirsko 6 | Name[ca]=Espai 7 | Name[ca@valencia]=Espai 8 | Name[cs]=Vesmír 9 | Name[da]=Spacy 10 | Name[de]=Spacy 11 | Name[el]=Spacy 12 | Name[en_GB]=Spacy 13 | Name[eo]=Spacy 14 | Name[es]=Espacioso 15 | Name[et]=Kosmik 16 | Name[eu]=Espaziokoa 17 | Name[fa]=فضایی 18 | Name[fi]=Avara 19 | Name[fr]=Spatial 20 | Name[ga]=Spacy 21 | Name[gl]=Espacial 22 | Name[he]=חללי 23 | Name[hne]=स्पेसी 24 | Name[hr]=Spacy 25 | Name[hu]=Űrutazás 26 | Name[ia]=Spacy (spatial) 27 | Name[id]=Spacy 28 | Name[it]=Spaziale 29 | Name[ja]=宇宙 30 | Name[ka]=Spacy 31 | Name[kk]=Ғарыш 32 | Name[km]=Spacy 33 | Name[ko]=우주 34 | Name[lv]=Kosmiska 35 | Name[mr]=स्पासी 36 | Name[nb]=Spacy 37 | Name[nds]=Ruumsch 38 | Name[nl]=Spacy 39 | Name[nn]=Verdsrommet 40 | Name[pl]=Przestrzenny 41 | Name[pt]=Espacial 42 | Name[pt_BR]=Espacial 43 | Name[ro]=Spacy 44 | Name[ru]=Космос 45 | Name[sa]=स्पेसी 46 | Name[sk]=Vesmír 47 | Name[sl]=Vesoljska 48 | Name[sq]=Spacy 49 | Name[sr]=Свемирко 50 | Name[sr@ijekavian]=Свемирко 51 | Name[sr@ijekavianlatin]=Svemirko 52 | Name[sr@latin]=Svemirko 53 | Name[sv]=Rymd 54 | Name[te]=స్పేసి 55 | Name[tr]=Spacy 56 | Name[uk]=Космічна 57 | Name[zh_CN]=空间 58 | Name[zh_TW]=Spacy 59 | Comment=A theme from outer space 60 | Comment[ar]=سمة من الفضاء الخارجيّ 61 | Comment[bg]=Космическа тема 62 | Comment[bs]=Tema iz svemira 63 | Comment[ca]=Un tema de l'espai exterior 64 | Comment[ca@valencia]=Un tema de l'espai exterior 65 | Comment[cs]=Motiv z vesmíru 66 | Comment[da]=Et tema fra det ydre rum 67 | Comment[de]=Ein Design aus den Tiefen des Weltraums. 68 | Comment[el]=Ένα διαστημικό θέμα 69 | Comment[en_GB]=A theme from outer space 70 | Comment[eo]=Etoso el la eksterspaco 71 | Comment[es]=Un tema del espacio exterior 72 | Comment[et]=Kosmoseteema 73 | Comment[eu]=Espazio sakonari buruzko gai bat 74 | Comment[fa]=چهره از دنیایی در فضا 75 | Comment[fi]=Teema ulkoavaruudesta 76 | Comment[fr]=Un thème venu de l'espace 77 | Comment[ga]=Téama ó imspás 78 | Comment[gl]=Un tema visual do espazo exterior. 79 | Comment[he]=ערכת עיצוב מהחלל החיצון 80 | Comment[hi]=अंतरिक्ष का प्रसंग 81 | Comment[hne]=बाहरी जगह पर एक प्रसंग 82 | Comment[hu]=Világűrös téma 83 | Comment[ia]=Un thema ex le spatio externe 84 | Comment[id]=Sebuah tema dari ruang angkasa 85 | Comment[it]=Un tema dallo spazio profondo 86 | Comment[ja]=宇宙のテーマ 87 | Comment[ka]=თემა გარე კოსმოსიდან 88 | Comment[kk]=Ғарыш нақышы 89 | Comment[km]=ស្បែក​ពី​លំហ​ខាងក្រៅ 90 | Comment[ko]=외계에서의 테마 91 | Comment[lt]=Apipavidalinimas iš kosmoso 92 | Comment[lv]=Kosmosā iedvesmots motīvs 93 | Comment[mr]=बाहेरच्या जगातील शैली 94 | Comment[nb]=Et tema fra det ytre rommet 95 | Comment[nds]=En Muster ut den Weltruum sien Wieden 96 | Comment[nl]=Een thema uit de ruimte 97 | Comment[nn]=Tema frå det ytre rommet 98 | Comment[pl]=Wystrój z kosmosu 99 | Comment[pt]=Um tema do espaço exterior 100 | Comment[pt_BR]=Um tema do outro mundo 101 | Comment[ro]=O tematică din spațiul extern 102 | Comment[ru]=Оформления из глубин космоса 103 | Comment[sa]=अन्तरिक्षतः एकः विषयः 104 | Comment[sk]=Téma z vesmíru 105 | Comment[sl]=Nezemeljska tema 106 | Comment[sq]=Një temë nga hapësira 107 | Comment[sr]=Тема из далеког свемира 108 | Comment[sr@ijekavian]=Тема из далеког свемира 109 | Comment[sr@ijekavianlatin]=Tema iz dalekog svemira 110 | Comment[sr@latin]=Tema iz dalekog svemira 111 | Comment[sv]=Ett tema från yttre rymden 112 | Comment[tr]=Uzayın derinliklerinden bir tema 113 | Comment[uk]=Космічна тема 114 | Comment[zh_CN]=外太空主题 115 | Comment[zh_TW]=外太空式的主題 116 | 117 | [Config] 118 | Path=spacy 119 | Fill=1.2 120 | BackgroundColor=black 121 | Svg=theme.svgz 122 | -------------------------------------------------------------------------------- /src/ai/gabor/node.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2009 Pelladi Gabor 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #ifndef BOVO_NODE_H 23 | #define BOVO_NODE_H 24 | 25 | #include "ai_interface.h" 26 | #include "standing.h" 27 | 28 | #include 29 | 30 | // list of following steps 31 | using steps_T = std::list; 32 | // type of hash value 33 | using hash_T = unsigned long long; 34 | 35 | // hash table entry type 36 | using entry_type_T = index_T; 37 | enum { exact = 1, lower_bound = 2, upper_bound = 3 }; 38 | 39 | // pragmas are not in the C++ standard and Sun Studio does not support the pack(x, y) one 40 | #if defined(__SUNPRO_CC) || defined(__SUNPRO_C) 41 | #pragma pack() 42 | #else 43 | #pragma pack(push, 1) 44 | #endif 45 | // a hash table entry 46 | struct NodeHashData { 47 | // is this data for the current position? 48 | hash_T checksum; 49 | // the result we are storing in the hash table 50 | heur_T value; 51 | // how deep we searched when we stored this result 52 | index_T remaining_depth; 53 | // type of the entry 54 | entry_type_T entry_type; 55 | }; 56 | #if defined(__SUNPRO_CC) || defined(__SUNPRO_C) 57 | #pragma(pack) 58 | #else 59 | #pragma pack(pop) 60 | #endif 61 | 62 | // hash table maximum memory 63 | const hash_T nodeHashMem = 16 * 1024 * 1024; 64 | // how many entries we can store in the memory limit 65 | const hash_T nodeHashSize = nodeHashMem / sizeof(NodeHashData); 66 | 67 | // a node of the alphabeta tree 68 | class Node 69 | { 70 | public: 71 | // the standing this ndoe refers to 72 | Standing *standing; 73 | 74 | // parent node in the tree 75 | Node *parent; 76 | // child node in the tree 77 | Node *child; 78 | // depth of the current node 79 | index_T depth; 80 | 81 | // 1 for starting player, -1 for the other 82 | heur_T signum; 83 | // alpha value 84 | heur_T alpha; 85 | // beta value 86 | heur_T beta; 87 | // is this alpha/beta value exact, or coming from an upper level? 88 | bool is_exact; 89 | 90 | // true if this node has been fully evaluated 91 | bool evaluated; 92 | 93 | // the good steps that can be done from here 94 | steps_T steps; 95 | 96 | // how deep we can go in the tree 97 | int depth_limit; 98 | // limits the amount of following steps to be investigated 99 | unsigned int max_branch; 100 | 101 | // construct the root node 102 | Node(Standing *_standing, AiImpl *ai); 103 | // construct a child node 104 | Node(Standing *_standing, Node *_parent); 105 | 106 | // destructor 107 | ~Node(); 108 | 109 | // generate following steps 110 | void generateSteps(); 111 | // calculate hash data 112 | void calcHash(hash_T *hash, NodeHashData *data); 113 | }; 114 | 115 | #endif // BOVO_NODE_H 116 | -------------------------------------------------------------------------------- /po/se/bovo.po: -------------------------------------------------------------------------------- 1 | # Translation of bovo to Northern Sami 2 | # 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: bovo\n" 6 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 7 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 8 | "PO-Revision-Date: 2007-09-11 22:44+0200\n" 9 | "Last-Translator: Northern Sami translation team \n" 11 | "Language-Team: Northern Sami \n" 12 | "Language: se\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: 8bit\n" 16 | "X-Generator: KBabel 1.11.4\n" 17 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 18 | "X-Environment: kde\n" 19 | "X-Accelerator-Marker: &\n" 20 | "X-Text-Markup: kde4\n" 21 | 22 | #, kde-format 23 | msgctxt "NAME OF TRANSLATORS" 24 | msgid "Your names" 25 | msgstr "" 26 | 27 | #, kde-format 28 | msgctxt "EMAIL OF TRANSLATORS" 29 | msgid "Your emails" 30 | msgstr "" 31 | 32 | #. i18n: ectx: label, entry (theme), group (bovo) 33 | #: gui/bovo.kcfg:9 34 | #, kde-format 35 | msgid "Theme" 36 | msgstr "" 37 | 38 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 39 | #: gui/bovo.kcfg:13 40 | #, kde-format 41 | msgid "Speed of demo and replay playback." 42 | msgstr "" 43 | 44 | #. i18n: ectx: label, entry (animation), group (bovo) 45 | #: gui/bovo.kcfg:19 46 | #, kde-format 47 | msgid "Whether moves should be animated or not." 48 | msgstr "" 49 | 50 | #. i18n: ectx: label, entry (ai), group (bovo) 51 | #: gui/bovo.kcfg:23 52 | #, kde-format 53 | msgid "AI engine to use." 54 | msgstr "" 55 | 56 | #: gui/main.cc:58 57 | #, kde-format 58 | msgid "Bovo" 59 | msgstr "" 60 | 61 | #: gui/main.cc:59 62 | #, kde-format 63 | msgid "KDE Five in a Row Board Game" 64 | msgstr "" 65 | 66 | #: gui/main.cc:60 67 | #, kde-format 68 | msgid "(c) 2002-2007, Aron Boström" 69 | msgstr "" 70 | 71 | #: gui/main.cc:63 72 | #, kde-format 73 | msgid "Aron Boström" 74 | msgstr "" 75 | 76 | #: gui/main.cc:63 77 | #, kde-format 78 | msgid "Author" 79 | msgstr "" 80 | 81 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 82 | #, kde-format 83 | msgid "Wins: %1" 84 | msgstr "" 85 | 86 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 87 | #, kde-format 88 | msgid "Losses: %1" 89 | msgstr "" 90 | 91 | #: gui/mainwindow.cc:190 92 | #, kde-format 93 | msgctxt "@action" 94 | msgid "&Replay" 95 | msgstr "" 96 | 97 | #: gui/mainwindow.cc:192 98 | #, kde-format 99 | msgctxt "@info:tooltip" 100 | msgid "Replay game" 101 | msgstr "" 102 | 103 | #: gui/mainwindow.cc:193 104 | #, kde-format 105 | msgctxt "@info:whatsthis" 106 | msgid "Replays your last game for you to watch." 107 | msgstr "" 108 | 109 | #: gui/mainwindow.cc:199 110 | #, kde-format 111 | msgctxt "@option:check" 112 | msgid "&Animation" 113 | msgstr "" 114 | 115 | #: gui/mainwindow.cc:204 116 | #, kde-format 117 | msgctxt "@title:menu" 118 | msgid "Theme" 119 | msgstr "" 120 | 121 | #: gui/mainwindow.cc:344 122 | #, kde-format 123 | msgid "Start a new game to play." 124 | msgstr "" 125 | 126 | #: gui/mainwindow.cc:382 127 | #, kde-format 128 | msgid "GAME OVER. Tie!" 129 | msgstr "" 130 | 131 | #: gui/mainwindow.cc:385 132 | #, kde-format 133 | msgid "GAME OVER. You won!" 134 | msgstr "" 135 | 136 | #: gui/mainwindow.cc:388 137 | #, kde-format 138 | msgid "GAME OVER. You lost!" 139 | msgstr "" 140 | 141 | #: gui/mainwindow.cc:400 142 | #, kde-format 143 | msgid "It is your turn." 144 | msgstr "" 145 | 146 | #: gui/mainwindow.cc:404 147 | #, kde-format 148 | msgid "Waiting for computer." 149 | msgstr "" 150 | 151 | #: gui/mainwindow.cc:432 152 | #, kde-format 153 | msgid "Replaying game" 154 | msgstr "" 155 | 156 | #: gui/mainwindow.cc:448 157 | #, kde-format 158 | msgid "Game replayed." 159 | msgstr "" 160 | -------------------------------------------------------------------------------- /src/game/dimension.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #ifndef BOVO_DIMENSION_H 23 | #define BOVO_DIMENSION_H 24 | 25 | #include "common.h" 26 | 27 | /** @file file declaring the Dimension class */ 28 | 29 | /** namespace for game engine */ 30 | namespace bovo 31 | { 32 | 33 | class Coord; 34 | 35 | /** 36 | * Dimension is logic container of the width and height of a playing board 37 | * 38 | * Dimension keeps the size data of a playing board, that is how wide and how 39 | * high the board is. It can also be used to verify a given Coord is inside 40 | * the limits of the Dimension (i.e. the Coord is a valid Coord on the playing 41 | * board). 42 | * 43 | * @code 44 | * Dimension dim1(15, 15); 45 | * Dimension dim2(dim1); 46 | * Coord coord(18, 7); 47 | * dim1.ok(coord); // returns false 48 | * for (int i = 0; i < dim2.width(); ++i) { 49 | * } 50 | * @endcode 51 | */ 52 | class Dimension 53 | { 54 | public: 55 | /** 56 | * @brief standard constructor 57 | * @description constructs a Dimension with a certain width and height 58 | * @param width the number of columns of this Dimension 59 | * @param height the number of rows of this Dimension 60 | */ 61 | Dimension(usi width, usi height); 62 | 63 | /** 64 | * @brief copy constructor 65 | * @description constructs a Dimension that is a copy of a given 66 | * dimension 67 | * @param dimension the dimension to copy 68 | */ 69 | Dimension(const Dimension &dimension); 70 | 71 | /** 72 | * @brief height of Dimension 73 | * @description the height (number of rows) of this Dimension 74 | * @return the height of this Dimension 75 | */ 76 | usi height() const; 77 | 78 | /** 79 | * @brief width of Dimension 80 | * @description the width (number of columns) of this Dimension 81 | * @return the width of this Dimension 82 | */ 83 | usi width() const; 84 | 85 | /** 86 | * @brief decides if a Coord is legal 87 | * @description decides if a given Coord is legal 88 | * (i.e. inside the bounds of this Dimension) 89 | * @param coord the coord to test 90 | * @return @c true if coord is inside bounds, $c false otherwise 91 | */ 92 | bool ok(const Coord *c) const; 93 | 94 | /** 95 | * @brief decides if a Coord is legal 96 | * @description decides if a given Coord is legal 97 | * (i.e. inside the bounds of this Dimension) 98 | * @param coord the coord to test 99 | * @return @c true if coord is inside bounds, $c false otherwise 100 | */ 101 | bool ok(const Coord &coord) const; 102 | 103 | private: 104 | /* height property */ 105 | usi m_height; 106 | 107 | /* width property */ 108 | usi m_width; 109 | }; 110 | 111 | } /* namespace bovo */ 112 | 113 | #endif // BOVO_DIMENSION_H 114 | -------------------------------------------------------------------------------- /po/ast/bovo.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2023 This file is copyright: 2 | # This file is distributed under the same license as the bovo package. 3 | # 4 | # SPDX-FileCopyrightText: 2023 Enol P. 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: bovo\n" 8 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 9 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 10 | "PO-Revision-Date: 2023-11-07 01:07+0100\n" 11 | "Last-Translator: Enol P. \n" 12 | "Language-Team: \n" 13 | "Language: ast\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 18 | "X-Generator: Lokalize 23.08.2\n" 19 | 20 | #, kde-format 21 | msgctxt "NAME OF TRANSLATORS" 22 | msgid "Your names" 23 | msgstr "Softastur" 24 | 25 | #, kde-format 26 | msgctxt "EMAIL OF TRANSLATORS" 27 | msgid "Your emails" 28 | msgstr "alministradores@softastur.org" 29 | 30 | #. i18n: ectx: label, entry (theme), group (bovo) 31 | #: gui/bovo.kcfg:9 32 | #, kde-format 33 | msgid "Theme" 34 | msgstr "Estilu" 35 | 36 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 37 | #: gui/bovo.kcfg:13 38 | #, kde-format 39 | msgid "Speed of demo and replay playback." 40 | msgstr "" 41 | 42 | #. i18n: ectx: label, entry (animation), group (bovo) 43 | #: gui/bovo.kcfg:19 44 | #, kde-format 45 | msgid "Whether moves should be animated or not." 46 | msgstr "" 47 | 48 | #. i18n: ectx: label, entry (ai), group (bovo) 49 | #: gui/bovo.kcfg:23 50 | #, kde-format 51 | msgid "AI engine to use." 52 | msgstr "" 53 | 54 | #: gui/main.cc:58 55 | #, kde-format 56 | msgid "Bovo" 57 | msgstr "" 58 | 59 | #: gui/main.cc:59 60 | #, kde-format 61 | msgid "KDE Five in a Row Board Game" 62 | msgstr "" 63 | 64 | #: gui/main.cc:60 65 | #, kde-format 66 | msgid "(c) 2002-2007, Aron Boström" 67 | msgstr "" 68 | 69 | #: gui/main.cc:63 70 | #, kde-format 71 | msgid "Aron Boström" 72 | msgstr "" 73 | 74 | #: gui/main.cc:63 75 | #, kde-format 76 | msgid "Author" 77 | msgstr "" 78 | 79 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 80 | #, kde-format 81 | msgid "Wins: %1" 82 | msgstr "" 83 | 84 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 85 | #, kde-format 86 | msgid "Losses: %1" 87 | msgstr "" 88 | 89 | #: gui/mainwindow.cc:190 90 | #, kde-format 91 | msgctxt "@action" 92 | msgid "&Replay" 93 | msgstr "" 94 | 95 | #: gui/mainwindow.cc:192 96 | #, kde-format 97 | msgctxt "@info:tooltip" 98 | msgid "Replay game" 99 | msgstr "" 100 | 101 | #: gui/mainwindow.cc:193 102 | #, kde-format 103 | msgctxt "@info:whatsthis" 104 | msgid "Replays your last game for you to watch." 105 | msgstr "" 106 | 107 | #: gui/mainwindow.cc:199 108 | #, kde-format 109 | msgctxt "@option:check" 110 | msgid "&Animation" 111 | msgstr "" 112 | 113 | #: gui/mainwindow.cc:204 114 | #, fuzzy, kde-format 115 | #| msgid "Theme" 116 | msgctxt "@title:menu" 117 | msgid "Theme" 118 | msgstr "Estilu" 119 | 120 | #: gui/mainwindow.cc:344 121 | #, kde-format 122 | msgid "Start a new game to play." 123 | msgstr "" 124 | 125 | #: gui/mainwindow.cc:382 126 | #, kde-format 127 | msgid "GAME OVER. Tie!" 128 | msgstr "" 129 | 130 | #: gui/mainwindow.cc:385 131 | #, kde-format 132 | msgid "GAME OVER. You won!" 133 | msgstr "" 134 | 135 | #: gui/mainwindow.cc:388 136 | #, kde-format 137 | msgid "GAME OVER. You lost!" 138 | msgstr "" 139 | 140 | #: gui/mainwindow.cc:400 141 | #, kde-format 142 | msgid "It is your turn." 143 | msgstr "" 144 | 145 | #: gui/mainwindow.cc:404 146 | #, kde-format 147 | msgid "Waiting for computer." 148 | msgstr "" 149 | 150 | #: gui/mainwindow.cc:432 151 | #, kde-format 152 | msgid "Replaying game" 153 | msgstr "" 154 | 155 | #: gui/mainwindow.cc:448 156 | #, kde-format 157 | msgid "Game replayed." 158 | msgstr "" 159 | -------------------------------------------------------------------------------- /po/ml/bovo.po: -------------------------------------------------------------------------------- 1 | # Malayalam translations for bovo package. 2 | # Copyright (C) 2019 This file is copyright: 3 | # This file is distributed under the same license as the bovo package. 4 | # Automatically generated, 2019. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: bovo\n" 9 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 10 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 11 | "PO-Revision-Date: 2019-12-12 21:46+0000\n" 12 | "Last-Translator: Vivek KJ Pazhedath \n" 13 | "Language-Team: SMC \n" 14 | "Language: ml\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | 20 | #, kde-format 21 | msgctxt "NAME OF TRANSLATORS" 22 | msgid "Your names" 23 | msgstr "" 24 | 25 | #, kde-format 26 | msgctxt "EMAIL OF TRANSLATORS" 27 | msgid "Your emails" 28 | msgstr "shijualexonline@gmail.com,snalledam@dataone.in,vivekkj2004@gmail.com" 29 | 30 | #. i18n: ectx: label, entry (theme), group (bovo) 31 | #: gui/bovo.kcfg:9 32 | #, kde-format 33 | msgid "Theme" 34 | msgstr "" 35 | 36 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 37 | #: gui/bovo.kcfg:13 38 | #, kde-format 39 | msgid "Speed of demo and replay playback." 40 | msgstr "" 41 | 42 | #. i18n: ectx: label, entry (animation), group (bovo) 43 | #: gui/bovo.kcfg:19 44 | #, kde-format 45 | msgid "Whether moves should be animated or not." 46 | msgstr "" 47 | 48 | #. i18n: ectx: label, entry (ai), group (bovo) 49 | #: gui/bovo.kcfg:23 50 | #, kde-format 51 | msgid "AI engine to use." 52 | msgstr "" 53 | 54 | #: gui/main.cc:58 55 | #, kde-format 56 | msgid "Bovo" 57 | msgstr "" 58 | 59 | #: gui/main.cc:59 60 | #, kde-format 61 | msgid "KDE Five in a Row Board Game" 62 | msgstr "" 63 | 64 | #: gui/main.cc:60 65 | #, kde-format 66 | msgid "(c) 2002-2007, Aron Boström" 67 | msgstr "" 68 | 69 | #: gui/main.cc:63 70 | #, kde-format 71 | msgid "Aron Boström" 72 | msgstr "" 73 | 74 | #: gui/main.cc:63 75 | #, kde-format 76 | msgid "Author" 77 | msgstr "" 78 | 79 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 80 | #, kde-format 81 | msgid "Wins: %1" 82 | msgstr "" 83 | 84 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 85 | #, kde-format 86 | msgid "Losses: %1" 87 | msgstr "" 88 | 89 | #: gui/mainwindow.cc:190 90 | #, kde-format 91 | msgctxt "@action" 92 | msgid "&Replay" 93 | msgstr "" 94 | 95 | #: gui/mainwindow.cc:192 96 | #, kde-format 97 | msgctxt "@info:tooltip" 98 | msgid "Replay game" 99 | msgstr "" 100 | 101 | #: gui/mainwindow.cc:193 102 | #, kde-format 103 | msgctxt "@info:whatsthis" 104 | msgid "Replays your last game for you to watch." 105 | msgstr "" 106 | 107 | #: gui/mainwindow.cc:199 108 | #, kde-format 109 | msgctxt "@option:check" 110 | msgid "&Animation" 111 | msgstr "" 112 | 113 | #: gui/mainwindow.cc:204 114 | #, kde-format 115 | msgctxt "@title:menu" 116 | msgid "Theme" 117 | msgstr "" 118 | 119 | #: gui/mainwindow.cc:344 120 | #, kde-format 121 | msgid "Start a new game to play." 122 | msgstr "" 123 | 124 | #: gui/mainwindow.cc:382 125 | #, kde-format 126 | msgid "GAME OVER. Tie!" 127 | msgstr "" 128 | 129 | #: gui/mainwindow.cc:385 130 | #, kde-format 131 | msgid "GAME OVER. You won!" 132 | msgstr "" 133 | 134 | #: gui/mainwindow.cc:388 135 | #, kde-format 136 | msgid "GAME OVER. You lost!" 137 | msgstr "" 138 | 139 | #: gui/mainwindow.cc:400 140 | #, kde-format 141 | msgid "It is your turn." 142 | msgstr "" 143 | 144 | #: gui/mainwindow.cc:404 145 | #, kde-format 146 | msgid "Waiting for computer." 147 | msgstr "" 148 | 149 | #: gui/mainwindow.cc:432 150 | #, kde-format 151 | msgid "Replaying game" 152 | msgstr "" 153 | 154 | #: gui/mainwindow.cc:448 155 | #, kde-format 156 | msgid "Game replayed." 157 | msgstr "" 158 | -------------------------------------------------------------------------------- /themes/scribble/themerc: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Scribble 3 | Name[ar]=خربشة 4 | Name[bg]=Scribble 5 | Name[bs]=Piskaranje 6 | Name[ca]=Scribble 7 | Name[ca@valencia]=Scribble 8 | Name[cs]=Scribble 9 | Name[da]=Scribble 10 | Name[de]=Scribble 11 | Name[el]=Scribble 12 | Name[en_GB]=Scribble 13 | Name[eo]=Scribble 14 | Name[es]=Garabatos 15 | Name[et]=Scribble 16 | Name[eu]=Zirriborroa 17 | Name[fa]=بد خط 18 | Name[fi]=Scribble 19 | Name[fr]=Crayonné 20 | Name[ga]=Scribble 21 | Name[gl]=Manuscrito 22 | Name[he]=קשקוש 23 | Name[hi]=गोदना 24 | Name[hne]=स्क्रिबल 25 | Name[hr]=Scribble 26 | Name[hu]=Scribble 27 | Name[ia]=Scribble (Scriptura illegibile) 28 | Name[id]=Scribble 29 | Name[it]=Scarabocchio 30 | Name[ja]=落書き 31 | Name[ka]=სკრიბლი 32 | Name[kk]=Шимай 33 | Name[km]=គូរ​វាស 34 | Name[ko]=낙서 35 | Name[lv]=Kricelējums 36 | Name[mr]=स्क्रिबल 37 | Name[nb]=Scribble 38 | Name[nds]=Kritteln 39 | Name[nl]=Scribble 40 | Name[nn]=Rabling 41 | Name[pl]=Scribble 42 | Name[pt]=Scribble 43 | Name[pt_BR]=Rabisco 44 | Name[ro]=Scribble 45 | Name[ru]=Мазня 46 | Name[sa]=स्क्रिबल 47 | Name[sk]=Scribble 48 | Name[sl]=Čačke 49 | Name[sq]=Scribble 50 | Name[sr]=Пискарало 51 | Name[sr@ijekavian]=Пискарало 52 | Name[sr@ijekavianlatin]=Piskaralo 53 | Name[sr@latin]=Piskaralo 54 | Name[sv]=Kladd 55 | Name[te]=స్క్రిబ్బిల్ 56 | Name[tr]=Scribble 57 | Name[uk]=Шкрябанина 58 | Name[wa]=Scribble 59 | Name[zh_CN]=涂鸦 60 | Name[zh_TW]=Scribble 61 | Comment=A pen and paper theme 62 | Comment[ar]=سمة ورقة وقلم 63 | Comment[bg]=Тема с хартия и химикалка 64 | Comment[bs]=Tema olovke i papira 65 | Comment[ca]=Un tema de paper i llapis 66 | Comment[ca@valencia]=Un tema de paper i llapis 67 | Comment[cs]=Motiv s papírem a perem 68 | Comment[da]=Et papir og blyant-tema 69 | Comment[de]=Ein Stift-und-Papier-Design. 70 | Comment[el]=Ένα θέμα χαρτιού μολυβιού 71 | Comment[en_GB]=A pen and paper theme 72 | Comment[eo]=Krajonpapera etoso 73 | Comment[es]=Un tema de lápiz y papel 74 | Comment[et]=Pliiatsi ja paberi teema 75 | Comment[eu]=Arkatz bat eta papera duen gai bat 76 | Comment[fa]=یک چهره مداد و کاغذ 77 | Comment[fi]=Kynä ja paperia -teema 78 | Comment[fr]=Un thème avec papier et crayon 79 | Comment[ga]=Téama: peann agus pár 80 | Comment[gl]=Un tema visual feito á man. 81 | Comment[he]=ערכת עיצוב עם עט ונייר 82 | Comment[hi]=कागज कलम प्रसंग 83 | Comment[hne]=पेन अउ पेपर प्रसंग 84 | Comment[hu]=Téma tollal és papírral 85 | Comment[ia]=Un thema de pluma e papiro 86 | Comment[id]=Sebuah tema pena dan kertas 87 | Comment[it]=Un tema che simula carta e penna 88 | Comment[ja]=ペンと紙のテーマ 89 | Comment[ka]=ფანქრისა და ფურცლის თემა 90 | Comment[kk]=Қалам мен қағаз нақышы 91 | Comment[km]=ស្បែក​ប៊ិក និង​ក្រដាស 92 | Comment[ko]=펜과 종이 테마 93 | Comment[lv]=Pildspalvas un papīra motīvs 94 | Comment[mr]=पेन व कागद शैली 95 | Comment[nb]=Et penn-og-papir-tema 96 | Comment[nds]=En Muster mit Papeer un Stift 97 | Comment[nl]=Een pen-en-papier-thema 98 | Comment[nn]=Tema med penn og papir 99 | Comment[pl]=Wystrój "ołówek i papier" 100 | Comment[pt]=Um tema de papel e caneta 101 | Comment[pt_BR]=Um tema baseado em papel e caneta 102 | Comment[ro]=Tematică cu creion și hârtie 103 | Comment[ru]=Оформление «Ручка и бумага» 104 | Comment[sa]=एकः लेखनी-कागज-विषयः 105 | Comment[sk]=Téma s papierom a perom 106 | Comment[sl]=Tema s papirjem ter svinčnikom 107 | Comment[sq]=Një temë me penë dhe letër 108 | Comment[sr]=Тема оловке и папира 109 | Comment[sr@ijekavian]=Тема оловке и папира 110 | Comment[sr@ijekavianlatin]=Tema olovke i papira 111 | Comment[sr@latin]=Tema olovke i papira 112 | Comment[sv]=Ett penna och papper-tema 113 | Comment[tr]=Bir kâğıt kalem oyunu 114 | Comment[uk]=Тема паперу і ручки 115 | Comment[wa]=On tinme creyon et papî 116 | Comment[zh_CN]=一张纸一支笔的主题 117 | Comment[zh_TW]=紙筆式的主題 118 | 119 | [Config] 120 | Path=scribble 121 | Svg=theme.svgz 122 | -------------------------------------------------------------------------------- /po/zh_CN/bovo.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: kdeorg\n" 4 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 5 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 6 | "PO-Revision-Date: 2024-04-22 15:58\n" 7 | "Last-Translator: \n" 8 | "Language-Team: Chinese Simplified\n" 9 | "Language: zh_CN\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=1; plural=0;\n" 14 | "X-Crowdin-Project: kdeorg\n" 15 | "X-Crowdin-Project-ID: 269464\n" 16 | "X-Crowdin-Language: zh-CN\n" 17 | "X-Crowdin-File: /kf6-trunk/messages/bovo/bovo.pot\n" 18 | "X-Crowdin-File-ID: 46079\n" 19 | 20 | #, kde-format 21 | msgctxt "NAME OF TRANSLATORS" 22 | msgid "Your names" 23 | msgstr "KDE 中国" 24 | 25 | #, kde-format 26 | msgctxt "EMAIL OF TRANSLATORS" 27 | msgid "Your emails" 28 | msgstr "kde-china@kde.org" 29 | 30 | #. i18n: ectx: label, entry (theme), group (bovo) 31 | #: gui/bovo.kcfg:9 32 | #, kde-format 33 | msgid "Theme" 34 | msgstr "主题" 35 | 36 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 37 | #: gui/bovo.kcfg:13 38 | #, kde-format 39 | msgid "Speed of demo and replay playback." 40 | msgstr "演示和重放的速度。" 41 | 42 | #. i18n: ectx: label, entry (animation), group (bovo) 43 | #: gui/bovo.kcfg:19 44 | #, kde-format 45 | msgid "Whether moves should be animated or not." 46 | msgstr "是否用动画表示落子。" 47 | 48 | #. i18n: ectx: label, entry (ai), group (bovo) 49 | #: gui/bovo.kcfg:23 50 | #, kde-format 51 | msgid "AI engine to use." 52 | msgstr "使用的人工智能引擎。" 53 | 54 | #: gui/main.cc:58 55 | #, kde-format 56 | msgid "Bovo" 57 | msgstr "Bovo" 58 | 59 | #: gui/main.cc:59 60 | #, kde-format 61 | msgid "KDE Five in a Row Board Game" 62 | msgstr "KDE 五子棋游戏" 63 | 64 | #: gui/main.cc:60 65 | #, kde-format 66 | msgid "(c) 2002-2007, Aron Boström" 67 | msgstr "(c) 2002-2007, Aron Boström" 68 | 69 | #: gui/main.cc:63 70 | #, kde-format 71 | msgid "Aron Boström" 72 | msgstr "Aron Boström" 73 | 74 | #: gui/main.cc:63 75 | #, kde-format 76 | msgid "Author" 77 | msgstr "作者" 78 | 79 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 80 | #, kde-format 81 | msgid "Wins: %1" 82 | msgstr "胜利次数: %1" 83 | 84 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 85 | #, kde-format 86 | msgid "Losses: %1" 87 | msgstr "失败次数: %1" 88 | 89 | #: gui/mainwindow.cc:190 90 | #, kde-format 91 | msgctxt "@action" 92 | msgid "&Replay" 93 | msgstr "重玩(&R)" 94 | 95 | #: gui/mainwindow.cc:192 96 | #, kde-format 97 | msgctxt "@info:tooltip" 98 | msgid "Replay game" 99 | msgstr "重玩游戏" 100 | 101 | #: gui/mainwindow.cc:193 102 | #, kde-format 103 | msgctxt "@info:whatsthis" 104 | msgid "Replays your last game for you to watch." 105 | msgstr "播放您的上一次游戏供观看。" 106 | 107 | #: gui/mainwindow.cc:199 108 | #, kde-format 109 | msgctxt "@option:check" 110 | msgid "&Animation" 111 | msgstr "动画(&A)" 112 | 113 | #: gui/mainwindow.cc:204 114 | #, kde-format 115 | msgctxt "@title:menu" 116 | msgid "Theme" 117 | msgstr "主题" 118 | 119 | #: gui/mainwindow.cc:344 120 | #, kde-format 121 | msgid "Start a new game to play." 122 | msgstr "开始一个新游戏。" 123 | 124 | #: gui/mainwindow.cc:382 125 | #, kde-format 126 | msgid "GAME OVER. Tie!" 127 | msgstr "游戏结束。平手!" 128 | 129 | #: gui/mainwindow.cc:385 130 | #, kde-format 131 | msgid "GAME OVER. You won!" 132 | msgstr "游戏结束。您赢了!" 133 | 134 | #: gui/mainwindow.cc:388 135 | #, kde-format 136 | msgid "GAME OVER. You lost!" 137 | msgstr "游戏结束。您输了!" 138 | 139 | #: gui/mainwindow.cc:400 140 | #, kde-format 141 | msgid "It is your turn." 142 | msgstr "轮到您了。" 143 | 144 | #: gui/mainwindow.cc:404 145 | #, kde-format 146 | msgid "Waiting for computer." 147 | msgstr "正在等待电脑。" 148 | 149 | #: gui/mainwindow.cc:432 150 | #, kde-format 151 | msgid "Replaying game" 152 | msgstr "正在回放游戏" 153 | 154 | #: gui/mainwindow.cc:448 155 | #, kde-format 156 | msgid "Game replayed." 157 | msgstr "游戏已回放。" 158 | -------------------------------------------------------------------------------- /themes/gomoku/themerc: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Gomoku 3 | Name[ar]=جوموكو 4 | Name[bg]=Gomoku 5 | Name[bs]=Gomoku 6 | Name[ca]=Gomoku 7 | Name[ca@valencia]=Gomoku 8 | Name[cs]=Gomoku 9 | Name[da]=Gomoku 10 | Name[de]=Gomoku 11 | Name[el]=Gomoku 12 | Name[en_GB]=Gomoku 13 | Name[eo]=Gomoku 14 | Name[es]=Gomoku 15 | Name[et]=Gomoku 16 | Name[eu]=Gomoku 17 | Name[fi]=Gomoku 18 | Name[fr]=Gomoku 19 | Name[ga]=Gomoku 20 | Name[gl]=Gomoku 21 | Name[he]=גומוקו 22 | Name[hi]=गोमोकु 23 | Name[hne]=गोमोकु 24 | Name[hr]=Gomoku 25 | Name[hu]=Gomoku 26 | Name[ia]=Gomoku 27 | Name[id]=Gomoku 28 | Name[it]=Gomoku 29 | Name[ja]=Gomoku 30 | Name[ka]=Gomoku 31 | Name[kk]=Гомоку 32 | Name[km]=Gomoku 33 | Name[ko]=고모쿠 34 | Name[lt]=Gomoku 35 | Name[lv]=Gomoku 36 | Name[mr]=गोमोकु 37 | Name[nb]=Gomoku 38 | Name[nds]=Gomoku 39 | Name[nl]=Gomoku 40 | Name[nn]=Gomoku 41 | Name[pl]=Gomoku 42 | Name[pt]=Gomoku 43 | Name[pt_BR]=Gomoku 44 | Name[ro]=Gomoku 45 | Name[ru]=Рэндзю 46 | Name[sa]=गोमोकु 47 | Name[sk]=Gomoku 48 | Name[sl]=Gomoku 49 | Name[sq]=Gomoku 50 | Name[sr]=Гомоку 51 | Name[sr@ijekavian]=Гомоку 52 | Name[sr@ijekavianlatin]=Gomoku 53 | Name[sr@latin]=Gomoku 54 | Name[sv]=Gomoku 55 | Name[te]=గొమొకు 56 | Name[tr]=Gomoku 57 | Name[uk]=Гомоку 58 | Name[wa]=Gomoku 59 | Name[zh_CN]=五目连珠 60 | Name[zh_TW]=Gomoku 61 | Comment=A classic Japanese theme 62 | Comment[ar]=سمة يابانيّة تقليديّة 63 | Comment[bg]=Класическа японска тема 64 | Comment[bs]=Klasična Japanska tema 65 | Comment[ca]=Un tema japonès clàssic 66 | Comment[ca@valencia]=Un tema japonés clàssic 67 | Comment[cs]=Klasický japonský motiv 68 | Comment[da]=Et klassisk japansk tema 69 | Comment[de]=Ein klassisches japanisches Design. 70 | Comment[el]=Ένα κλασικό ιαπωνικό παιχνίδι 71 | Comment[en_GB]=A classic Japanese theme 72 | Comment[eo]=Klasika Japana etoso 73 | Comment[es]=Un tema japonés clásico 74 | Comment[et]=Klassikaline jaapani teema 75 | Comment[eu]=Japoniar gai klasiko bat 76 | Comment[fi]=Perinteinen japanilainen teema 77 | Comment[fr]=Un thème classique japonais 78 | Comment[ga]=Téama clasaiceach Seapánach 79 | Comment[gl]=Un tema visual xaponés clásico. 80 | Comment[he]=ערכת עיצוב יפנית מסורתית 81 | Comment[hi]=जापानी क्लासिक प्रसंग 82 | Comment[hu]=Klasszikus japán téma 83 | Comment[ia]=Un thema classic japonese 84 | Comment[id]=Sebuah tema klasik Jepang 85 | Comment[it]=Un tema giapponese classico 86 | Comment[ja]=伝統的な日本の五目並べのテーマ 87 | Comment[ka]=კლასიკური იაპონური თემა 88 | Comment[kk]=Классикалық Жапон нақышы 89 | Comment[km]=ស្បែក​ជប៉ុន​បុរាណ 90 | Comment[ko]=일본 전통 테마 91 | Comment[lt]=Klasikinė japoniška tema 92 | Comment[lv]=Klasisks Japānas motīvs 93 | Comment[mr]=क्लासिक जपानी शैली 94 | Comment[nb]=Et klassisk japansk tema 95 | Comment[nds]=En klass'sch japaansch Muster 96 | Comment[nl]=Een klassiek Japans thema 97 | Comment[nn]=Klassisk japansk tema 98 | Comment[pl]=Klasyczny wystrój japoński 99 | Comment[pt]=Um tema clássico Japonês 100 | Comment[pt_BR]=Um tema japonês clássico 101 | Comment[ro]=Tematică clasică japoneză 102 | Comment[ru]=Классическое японское оформление 103 | Comment[sa]=एकः क्लासिकः जापानी विषयः 104 | Comment[sk]=Klasická japonská téma 105 | Comment[sl]=Klasična japonska tema 106 | Comment[sr]=Класична јапанска игра 107 | Comment[sr@ijekavian]=Класична јапанска игра 108 | Comment[sr@ijekavianlatin]=Klasična japanska igra 109 | Comment[sr@latin]=Klasična japanska igra 110 | Comment[sv]=Ett klassiskt japanskt tema 111 | Comment[tr]=Bir klasik Japon teması 112 | Comment[uk]=Класична японська тема 113 | Comment[wa]=On tinme classike djaponès 114 | Comment[zh_CN]=经典的和风主题 115 | Comment[zh_TW]=傳統的日式主題 116 | 117 | [Config] 118 | Path=gomoku 119 | Fill=1.4 120 | NbrX=1 121 | NbrY=1 122 | BgType=fill #fill,svg,gradient 123 | BgColor=#a52a2a 124 | BackgroundColor=brown 125 | GridType=Intersect #intersect,svg,squares 126 | GridColor=#000000 127 | GridWidth=1 128 | GridFrameWidth=0 129 | Svg=theme.svgz 130 | -------------------------------------------------------------------------------- /src/game/coord.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #ifndef BOVO_COORD_H 23 | #define BOVO_COORD_H 24 | 25 | #include "common.h" 26 | 27 | /** @file file declaring the Coord class */ 28 | 29 | /** namespace for game engine */ 30 | namespace bovo 31 | { 32 | 33 | /** 34 | * A coordinate 35 | * 36 | * This class describes a coordinate on a playing field. It is 37 | * used as a container of an (x, y) coordinate pair that starts to 38 | * count with Origo (0, 0) in upper left corner. No negative coordinates 39 | * are allowed. 40 | * 41 | * If both x and y coordinates are static_cast(-1), 42 | * a special case is applied. Then the coordinate is invalid (all 43 | * coordinates outside of playing area are invalid) but it also means 44 | * that the coordinate refers to a moment before any moved has been played. 45 | * This can be queried with null(). 46 | * 47 | * @code 48 | * Coord move(const Coord& coord) { 49 | * if (coord.null()) { 50 | * return computeAiTurn(); 51 | * } else { 52 | * markCoordAsOpposite(coord); 53 | * return computeAiTurn(); 54 | * } 55 | * } 56 | * @endcode 57 | */ 58 | class Coord 59 | { 60 | public: 61 | /** 62 | * @brief standard constructor 63 | * @description constructs a Coord with given X and Y coordinates 64 | * @param x X coordinate 65 | * @param y Y coordinate 66 | */ 67 | explicit Coord(usi x = -1, usi y = -1); 68 | 69 | /** 70 | * @brief copy constructor 71 | * @description constructs a Coord that is a copy of a given Coord 72 | * @param coord Coord to copy 73 | */ 74 | Coord(const Coord &coord) = default; 75 | Coord &operator=(const Coord &coord) = default; 76 | 77 | /** 78 | * @brief 79 | * @description 80 | * @return 81 | */ 82 | Coord down() const; 83 | 84 | /** 85 | * @brief 86 | * @description 87 | * @return 88 | */ 89 | Coord left() const; 90 | 91 | /** 92 | * @brief is null? 93 | * @description tells if this coord is a null coordinate (-1, -1) 94 | * @return \c true if x == -1 and y == -1, \c false otherwise 95 | */ 96 | bool null() const; 97 | 98 | /** 99 | * @brief 100 | * @description 101 | * @return 102 | */ 103 | Coord right() const; 104 | 105 | /** 106 | * @brief 107 | * @description 108 | * @return 109 | */ 110 | Coord up() const; 111 | 112 | /** 113 | * @brief 114 | * @description 115 | * @return 116 | */ 117 | usi x() const; 118 | 119 | /** 120 | * @brief 121 | * @description 122 | * @return 123 | */ 124 | usi y() const; 125 | 126 | private: 127 | /* X coordinate property */ 128 | usi m_x; 129 | 130 | /* Y coordinate property */ 131 | usi m_y; 132 | }; 133 | 134 | } /* namespace bovo */ 135 | 136 | #endif // BOVO_COORD_H 137 | -------------------------------------------------------------------------------- /po/is/bovo.po: -------------------------------------------------------------------------------- 1 | # translation of bovo.po to icelandic 2 | # Copyright (C) YEAR This_file_is_part_of_KDE 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # 5 | # Sveinn í Felli , 2009, 2016. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: bovo\n" 9 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 10 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 11 | "PO-Revision-Date: 2016-04-08 22:57+0000\n" 12 | "Last-Translator: Sveinn í Felli \n" 13 | "Language-Team: Icelandic \n" 14 | "Language: is\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: Lokalize 1.5\n" 19 | "Plural-Forms: Plural-Forms: nplurals=2; plural=n != 1;\n" 20 | "\n" 21 | "\n" 22 | 23 | #, fuzzy, kde-format 24 | msgctxt "NAME OF TRANSLATORS" 25 | msgid "Your names" 26 | msgstr "Sveinn í Felli" 27 | 28 | #, fuzzy, kde-format 29 | msgctxt "EMAIL OF TRANSLATORS" 30 | msgid "Your emails" 31 | msgstr "sv1@fellsnet.is" 32 | 33 | #. i18n: ectx: label, entry (theme), group (bovo) 34 | #: gui/bovo.kcfg:9 35 | #, fuzzy, kde-format 36 | msgid "Theme" 37 | msgstr "Þema" 38 | 39 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 40 | #: gui/bovo.kcfg:13 41 | #, kde-format 42 | msgid "Speed of demo and replay playback." 43 | msgstr "" 44 | 45 | #. i18n: ectx: label, entry (animation), group (bovo) 46 | #: gui/bovo.kcfg:19 47 | #, kde-format 48 | msgid "Whether moves should be animated or not." 49 | msgstr "" 50 | 51 | #. i18n: ectx: label, entry (ai), group (bovo) 52 | #: gui/bovo.kcfg:23 53 | #, kde-format 54 | msgid "AI engine to use." 55 | msgstr "" 56 | 57 | #: gui/main.cc:58 58 | #, kde-format 59 | msgid "Bovo" 60 | msgstr "" 61 | 62 | #: gui/main.cc:59 63 | #, kde-format 64 | msgid "KDE Five in a Row Board Game" 65 | msgstr "" 66 | 67 | #: gui/main.cc:60 68 | #, kde-format 69 | msgid "(c) 2002-2007, Aron Boström" 70 | msgstr "" 71 | 72 | #: gui/main.cc:63 73 | #, kde-format 74 | msgid "Aron Boström" 75 | msgstr "" 76 | 77 | #: gui/main.cc:63 78 | #, fuzzy, kde-format 79 | msgid "Author" 80 | msgstr "Höfundur" 81 | 82 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 83 | #, kde-format 84 | msgid "Wins: %1" 85 | msgstr "" 86 | 87 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 88 | #, kde-format 89 | msgid "Losses: %1" 90 | msgstr "" 91 | 92 | #: gui/mainwindow.cc:190 93 | #, kde-format 94 | msgctxt "@action" 95 | msgid "&Replay" 96 | msgstr "" 97 | 98 | #: gui/mainwindow.cc:192 99 | #, kde-format 100 | msgctxt "@info:tooltip" 101 | msgid "Replay game" 102 | msgstr "" 103 | 104 | #: gui/mainwindow.cc:193 105 | #, kde-format 106 | msgctxt "@info:whatsthis" 107 | msgid "Replays your last game for you to watch." 108 | msgstr "" 109 | 110 | #: gui/mainwindow.cc:199 111 | #, fuzzy, kde-format 112 | msgctxt "@option:check" 113 | msgid "&Animation" 114 | msgstr "H&reyfimyndir" 115 | 116 | #: gui/mainwindow.cc:204 117 | #, fuzzy, kde-format 118 | msgctxt "@title:menu" 119 | msgid "Theme" 120 | msgstr "Þema" 121 | 122 | #: gui/mainwindow.cc:344 123 | #, kde-format 124 | msgid "Start a new game to play." 125 | msgstr "" 126 | 127 | #: gui/mainwindow.cc:382 128 | #, kde-format 129 | msgid "GAME OVER. Tie!" 130 | msgstr "" 131 | 132 | #: gui/mainwindow.cc:385 133 | #, kde-format 134 | msgid "GAME OVER. You won!" 135 | msgstr "" 136 | 137 | #: gui/mainwindow.cc:388 138 | #, kde-format 139 | msgid "GAME OVER. You lost!" 140 | msgstr "" 141 | 142 | #: gui/mainwindow.cc:400 143 | #, kde-format 144 | msgid "It is your turn." 145 | msgstr "" 146 | 147 | #: gui/mainwindow.cc:404 148 | #, kde-format 149 | msgid "Waiting for computer." 150 | msgstr "" 151 | 152 | #: gui/mainwindow.cc:432 153 | #, kde-format 154 | msgid "Replaying game" 155 | msgstr "" 156 | 157 | #: gui/mainwindow.cc:448 158 | #, kde-format 159 | msgid "Game replayed." 160 | msgstr "" 161 | -------------------------------------------------------------------------------- /po/oc/bovo.po: -------------------------------------------------------------------------------- 1 | # translation of bovo.po to Occitan (lengadocian) 2 | # Copyright (C) YEAR This_file_is_part_of_KDE 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # 5 | # Yannig Marchegay (Kokoyaya) , 2007, 2008. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: bovo\n" 9 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 10 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 11 | "PO-Revision-Date: 2008-08-05 22:27+0200\n" 12 | "Last-Translator: Yannig Marchegay (Kokoyaya) \n" 13 | "Language-Team: Occitan (lengadocian) \n" 14 | "Language: oc\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: KBabel 1.11.4\n" 19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 20 | 21 | #, kde-format 22 | msgctxt "NAME OF TRANSLATORS" 23 | msgid "Your names" 24 | msgstr "Yannig Marchegay (Kokoyaya)" 25 | 26 | #, kde-format 27 | msgctxt "EMAIL OF TRANSLATORS" 28 | msgid "Your emails" 29 | msgstr "yannig@marchegay.org" 30 | 31 | #. i18n: ectx: label, entry (theme), group (bovo) 32 | #: gui/bovo.kcfg:9 33 | #, kde-format 34 | msgid "Theme" 35 | msgstr "Tèma" 36 | 37 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 38 | #: gui/bovo.kcfg:13 39 | #, kde-format 40 | msgid "Speed of demo and replay playback." 41 | msgstr "" 42 | 43 | #. i18n: ectx: label, entry (animation), group (bovo) 44 | #: gui/bovo.kcfg:19 45 | #, kde-format 46 | msgid "Whether moves should be animated or not." 47 | msgstr "" 48 | 49 | #. i18n: ectx: label, entry (ai), group (bovo) 50 | #: gui/bovo.kcfg:23 51 | #, kde-format 52 | msgid "AI engine to use." 53 | msgstr "" 54 | 55 | #: gui/main.cc:58 56 | #, kde-format 57 | msgid "Bovo" 58 | msgstr "" 59 | 60 | #: gui/main.cc:59 61 | #, kde-format 62 | msgid "KDE Five in a Row Board Game" 63 | msgstr "" 64 | 65 | #: gui/main.cc:60 66 | #, kde-format 67 | msgid "(c) 2002-2007, Aron Boström" 68 | msgstr "" 69 | 70 | #: gui/main.cc:63 71 | #, kde-format 72 | msgid "Aron Boström" 73 | msgstr "" 74 | 75 | #: gui/main.cc:63 76 | #, kde-format 77 | msgid "Author" 78 | msgstr "Autor" 79 | 80 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 81 | #, kde-format 82 | msgid "Wins: %1" 83 | msgstr "" 84 | 85 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 86 | #, kde-format 87 | msgid "Losses: %1" 88 | msgstr "" 89 | 90 | #: gui/mainwindow.cc:190 91 | #, kde-format 92 | msgctxt "@action" 93 | msgid "&Replay" 94 | msgstr "" 95 | 96 | #: gui/mainwindow.cc:192 97 | #, kde-format 98 | msgctxt "@info:tooltip" 99 | msgid "Replay game" 100 | msgstr "" 101 | 102 | #: gui/mainwindow.cc:193 103 | #, kde-format 104 | msgctxt "@info:whatsthis" 105 | msgid "Replays your last game for you to watch." 106 | msgstr "" 107 | 108 | #: gui/mainwindow.cc:199 109 | #, kde-format 110 | msgctxt "@option:check" 111 | msgid "&Animation" 112 | msgstr "" 113 | 114 | #: gui/mainwindow.cc:204 115 | #, fuzzy, kde-format 116 | #| msgid "Theme" 117 | msgctxt "@title:menu" 118 | msgid "Theme" 119 | msgstr "Tèma" 120 | 121 | #: gui/mainwindow.cc:344 122 | #, kde-format 123 | msgid "Start a new game to play." 124 | msgstr "" 125 | 126 | #: gui/mainwindow.cc:382 127 | #, kde-format 128 | msgid "GAME OVER. Tie!" 129 | msgstr "" 130 | 131 | #: gui/mainwindow.cc:385 132 | #, kde-format 133 | msgid "GAME OVER. You won!" 134 | msgstr "" 135 | 136 | #: gui/mainwindow.cc:388 137 | #, kde-format 138 | msgid "GAME OVER. You lost!" 139 | msgstr "" 140 | 141 | #: gui/mainwindow.cc:400 142 | #, kde-format 143 | msgid "It is your turn." 144 | msgstr "" 145 | 146 | #: gui/mainwindow.cc:404 147 | #, kde-format 148 | msgid "Waiting for computer." 149 | msgstr "" 150 | 151 | #: gui/mainwindow.cc:432 152 | #, kde-format 153 | msgid "Replaying game" 154 | msgstr "" 155 | 156 | #: gui/mainwindow.cc:448 157 | #, kde-format 158 | msgid "Game replayed." 159 | msgstr "" 160 | -------------------------------------------------------------------------------- /po/mai/bovo.po: -------------------------------------------------------------------------------- 1 | # translation of bovo.po to Maithili 2 | # Copyright (C) YEAR This_file_is_part_of_KDE 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # 5 | # Rajesh Ranjan , 2010. 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: bovo\n" 9 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 10 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 11 | "PO-Revision-Date: 2010-09-24 16:37+0530\n" 12 | "Last-Translator: Rajesh Ranjan \n" 13 | "Language-Team: Maithili \n" 14 | "Language: mai\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: KBabel 1.11.4\n" 19 | "Plural-Forms: nplurals=2; plural=(n!=1);\n" 20 | "\n" 21 | 22 | #, kde-format 23 | msgctxt "NAME OF TRANSLATORS" 24 | msgid "Your names" 25 | msgstr "संगीता कुमारी" 26 | 27 | #, kde-format 28 | msgctxt "EMAIL OF TRANSLATORS" 29 | msgid "Your emails" 30 | msgstr "sangeeta09@gmail.com" 31 | 32 | #. i18n: ectx: label, entry (theme), group (bovo) 33 | #: gui/bovo.kcfg:9 34 | #, kde-format 35 | msgid "Theme" 36 | msgstr "प्रसंग" 37 | 38 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 39 | #: gui/bovo.kcfg:13 40 | #, kde-format 41 | msgid "Speed of demo and replay playback." 42 | msgstr "" 43 | 44 | #. i18n: ectx: label, entry (animation), group (bovo) 45 | #: gui/bovo.kcfg:19 46 | #, kde-format 47 | msgid "Whether moves should be animated or not." 48 | msgstr "" 49 | 50 | #. i18n: ectx: label, entry (ai), group (bovo) 51 | #: gui/bovo.kcfg:23 52 | #, kde-format 53 | msgid "AI engine to use." 54 | msgstr "" 55 | 56 | #: gui/main.cc:58 57 | #, kde-format 58 | msgid "Bovo" 59 | msgstr "Bovo" 60 | 61 | #: gui/main.cc:59 62 | #, kde-format 63 | msgid "KDE Five in a Row Board Game" 64 | msgstr "" 65 | 66 | #: gui/main.cc:60 67 | #, fuzzy, kde-format 68 | #| msgid "(c) 2002,2007 Aron Boström" 69 | msgid "(c) 2002-2007, Aron Boström" 70 | msgstr "(c) 2002,2007 Aron Boström" 71 | 72 | #: gui/main.cc:63 73 | #, kde-format 74 | msgid "Aron Boström" 75 | msgstr "Aron Boström" 76 | 77 | #: gui/main.cc:63 78 | #, kde-format 79 | msgid "Author" 80 | msgstr "लेखक" 81 | 82 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 83 | #, kde-format 84 | msgid "Wins: %1" 85 | msgstr "" 86 | 87 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 88 | #, kde-format 89 | msgid "Losses: %1" 90 | msgstr "" 91 | 92 | #: gui/mainwindow.cc:190 93 | #, kde-format 94 | msgctxt "@action" 95 | msgid "&Replay" 96 | msgstr "" 97 | 98 | #: gui/mainwindow.cc:192 99 | #, kde-format 100 | msgctxt "@info:tooltip" 101 | msgid "Replay game" 102 | msgstr "" 103 | 104 | #: gui/mainwindow.cc:193 105 | #, kde-format 106 | msgctxt "@info:whatsthis" 107 | msgid "Replays your last game for you to watch." 108 | msgstr "" 109 | 110 | #: gui/mainwindow.cc:199 111 | #, kde-format 112 | msgctxt "@option:check" 113 | msgid "&Animation" 114 | msgstr "" 115 | 116 | #: gui/mainwindow.cc:204 117 | #, fuzzy, kde-format 118 | #| msgid "Theme" 119 | msgctxt "@title:menu" 120 | msgid "Theme" 121 | msgstr "प्रसंग" 122 | 123 | #: gui/mainwindow.cc:344 124 | #, kde-format 125 | msgid "Start a new game to play." 126 | msgstr "" 127 | 128 | #: gui/mainwindow.cc:382 129 | #, kde-format 130 | msgid "GAME OVER. Tie!" 131 | msgstr "" 132 | 133 | #: gui/mainwindow.cc:385 134 | #, kde-format 135 | msgid "GAME OVER. You won!" 136 | msgstr "" 137 | 138 | #: gui/mainwindow.cc:388 139 | #, kde-format 140 | msgid "GAME OVER. You lost!" 141 | msgstr "" 142 | 143 | #: gui/mainwindow.cc:400 144 | #, kde-format 145 | msgid "It is your turn." 146 | msgstr "" 147 | 148 | #: gui/mainwindow.cc:404 149 | #, kde-format 150 | msgid "Waiting for computer." 151 | msgstr "" 152 | 153 | #: gui/mainwindow.cc:432 154 | #, kde-format 155 | msgid "Replaying game" 156 | msgstr "" 157 | 158 | #: gui/mainwindow.cc:448 159 | #, kde-format 160 | msgid "Game replayed." 161 | msgstr "" 162 | -------------------------------------------------------------------------------- /src/gui/hintitem.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #include "hintitem.h" 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include "common.h" 30 | #include "coord.h" 31 | #include "move.h" 32 | #include "scene.h" 33 | 34 | using namespace bovo; 35 | 36 | namespace gui { 37 | 38 | HintItem::HintItem(Scene* scene, const Move& hint, bool animate, qreal fill) 39 | : QGraphicsSvgItem(), m_scene(scene), m_row(hint.y()), 40 | m_col(hint.x()), m_fill(fill) { 41 | setElementId(QString(hint.player() == X ? QStringLiteral("x%1") : QStringLiteral("o%1")) 42 | .arg(QString::number(QRandomGenerator::global()->bounded(5) + 1))); 43 | m_tick = 16; 44 | m_tickUp = true; 45 | m_ticker = nullptr; 46 | if (animate) { 47 | m_ticker = new QTimer(this); 48 | m_opacity = 0.0; 49 | connect(m_ticker, &QTimer::timeout, this, &HintItem::tick); 50 | m_ticker->start(30); 51 | } else { 52 | m_opacity = 0.4; 53 | } 54 | 55 | setPos(m_scene->cellCenter(m_col, m_row)); 56 | } 57 | 58 | HintItem::~HintItem() { 59 | if (m_ticker) { 60 | disconnect(m_ticker, nullptr, this, nullptr); 61 | m_ticker->stop(); 62 | m_ticker->deleteLater(); 63 | } 64 | } 65 | 66 | QRectF HintItem::boundingRect() const { 67 | qreal width = m_scene->squareSize(); 68 | qreal height = width; 69 | qreal margin = (1.0-m_fill) * width / 2.0; 70 | return { -width / 2.0 + margin, 71 | -height / 2.0 + margin, 72 | width - 2.0*margin, 73 | height - 2.0*margin}; 74 | } 75 | 76 | 77 | void HintItem::killAnimation() { 78 | if (m_ticker) { 79 | m_ticker->stop(); 80 | disconnect(m_ticker, nullptr, this, nullptr); 81 | m_opacity = 0.4; 82 | update(); 83 | } 84 | } 85 | 86 | void HintItem::kill() { 87 | connect(m_ticker, &QTimer::timeout, this, &HintItem::killTick); 88 | m_ticker->start(); 89 | } 90 | 91 | void HintItem::killTick() { 92 | m_opacity -= 0.05; 93 | update(); 94 | if (m_opacity <= 0.05) { 95 | m_ticker->stop(); 96 | Q_EMIT killed(); 97 | } 98 | } 99 | 100 | void HintItem::tick() { 101 | --m_tick; 102 | if (m_tick == 0) { 103 | killAnimation(); 104 | } else { 105 | if (m_tickUp && m_tick > 5) { 106 | m_opacity += 0.1; 107 | } else if (m_tickUp) { 108 | m_opacity -= 0.1; 109 | m_tickUp = false; 110 | } else { 111 | m_opacity -= 0.1; 112 | } 113 | update(); 114 | } 115 | } 116 | 117 | // HintItem::setEnabled(enabled) { 118 | // m_enabled = enabled; 119 | // } 120 | 121 | void HintItem::paint(QPainter *p, const QStyleOptionGraphicsItem*, QWidget*) { 122 | p->setOpacity(m_opacity); 123 | renderer()->render(p, elementId(), boundingRect()); 124 | } 125 | 126 | void HintItem::setFill(qreal fill) { 127 | m_fill = fill; 128 | } 129 | 130 | } /* namespace gui */ 131 | 132 | #include "moc_hintitem.cpp" 133 | -------------------------------------------------------------------------------- /src/ai/gabor/aigabor.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2009 Pelladi Gabor 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | 23 | #include "aigabor.h" 24 | 25 | #include "coord.h" 26 | #include "dimension.h" 27 | #include "move.h" 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | using namespace bovo; 34 | 35 | /** namespace for AI stuff */ 36 | namespace ai { 37 | 38 | /** 39 | * @file aigabor.cc implementing the AiGabor class 40 | */ 41 | 42 | AiGabor::AiGabor(const Dimension& dimension, KGameDifficultyLevel::StandardLevel skill, 43 | Player player) : m_player(player), m_minThink(200) { 44 | m_ai = new AiInterface(); 45 | m_ai->setTableSizeX(dimension.width()); 46 | m_ai->setTableSizeY(dimension.height()); 47 | m_ai->setPrintInfo(false); 48 | m_ai->setTimeOver(this); 49 | setSkill(skill); 50 | m_ai->newGame(); 51 | qRegisterMetaType("Move"); 52 | } 53 | 54 | AiGabor::~AiGabor() { 55 | cancelAndWait(); 56 | delete m_ai; 57 | } 58 | 59 | void AiGabor::cancelAndWait() { 60 | m_canceling = true; 61 | m_future.waitForFinished(); 62 | } 63 | 64 | bool AiGabor::isTimeOver() { 65 | return m_canceling; 66 | } 67 | 68 | /* public slots */ 69 | 70 | void AiGabor::changeBoard(const Move& move) { 71 | if (move.player() == No) { 72 | m_ai->undo(); 73 | } else { 74 | m_ai->step(move.x(), move.y()); 75 | } 76 | } 77 | 78 | void AiGabor::gameOver() { 79 | } 80 | 81 | void AiGabor::setSkill(KGameDifficultyLevel::StandardLevel skill) { 82 | switch (skill) { 83 | case KGameDifficultyLevel::RidiculouslyEasy: m_ai->setDepth(1); m_ai->setRandomAmount(10000); break; 84 | case KGameDifficultyLevel::VeryEasy: m_ai->setDepth(1); m_ai->setRandomAmount(9000); break; 85 | case KGameDifficultyLevel::Easy: m_ai->setDepth(1); m_ai->setRandomAmount(2000); break; 86 | case KGameDifficultyLevel::Medium: m_ai->setDepth(1); m_ai->setRandomAmount(2); break; 87 | case KGameDifficultyLevel::Hard: m_ai->setDepth(2); m_ai->setRandomAmount(2); break; 88 | case KGameDifficultyLevel::VeryHard: m_ai->setDepth(3); m_ai->setRandomAmount(2); break; 89 | case KGameDifficultyLevel::ExtremelyHard: m_ai->setDepth(6); m_ai->setRandomAmount(2); break; 90 | case KGameDifficultyLevel::Impossible: m_ai->setDepth(10); m_ai->setRandomAmount(2); break; 91 | default: break; 92 | } 93 | } 94 | 95 | void AiGabor::slotMove() { 96 | if (!m_future.isFinished()) { 97 | qFatal("Concurrent AI error"); 98 | } 99 | m_canceling = false; 100 | m_future = QtConcurrent::run([this] { slotMoveImpl(); }); 101 | } 102 | 103 | void AiGabor::slotMoveImpl() { 104 | QElapsedTimer time; 105 | time.start(); 106 | Field f = m_ai->think(); 107 | for (;;) { 108 | int elapsed = time.elapsed(); 109 | if (elapsed >= m_minThink) { 110 | break; 111 | } 112 | QThread::yieldCurrentThread(); 113 | } 114 | if (!m_canceling) { 115 | Q_EMIT move(Move(m_player, Coord(f.x, f.y))); 116 | } 117 | } 118 | 119 | } /* namespace ai */ 120 | 121 | #include "moc_aigabor.cpp" 122 | -------------------------------------------------------------------------------- /po/ko/bovo.po: -------------------------------------------------------------------------------- 1 | # Translation of bovo to Korean. 2 | # Copyright (C) 2007 This_file_is_part_of_KDE 3 | # This file is distributed under the same license as the kdegames package. 4 | # Myong-sung Kim , 2007. 5 | # SPDX-FileCopyrightText: 2011, 2015, 2024 Shinjo Park 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: kdegames\n" 10 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 11 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 12 | "PO-Revision-Date: 2024-08-19 22:09+0200\n" 13 | "Last-Translator: Shinjo Park \n" 14 | "Language-Team: Korean \n" 15 | "Language: ko\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=1; plural=0;\n" 20 | "X-Generator: Lokalize 23.08.5\n" 21 | 22 | #, kde-format 23 | msgctxt "NAME OF TRANSLATORS" 24 | msgid "Your names" 25 | msgstr "김명성" 26 | 27 | #, kde-format 28 | msgctxt "EMAIL OF TRANSLATORS" 29 | msgid "Your emails" 30 | msgstr "xfuncrushx@gmail.com" 31 | 32 | #. i18n: ectx: label, entry (theme), group (bovo) 33 | #: gui/bovo.kcfg:9 34 | #, kde-format 35 | msgid "Theme" 36 | msgstr "테마" 37 | 38 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 39 | #: gui/bovo.kcfg:13 40 | #, kde-format 41 | msgid "Speed of demo and replay playback." 42 | msgstr "데모와 복기 재생 속도입니다." 43 | 44 | #. i18n: ectx: label, entry (animation), group (bovo) 45 | #: gui/bovo.kcfg:19 46 | #, kde-format 47 | msgid "Whether moves should be animated or not." 48 | msgstr "이동 애니메이션 사용 여부입니다." 49 | 50 | #. i18n: ectx: label, entry (ai), group (bovo) 51 | #: gui/bovo.kcfg:23 52 | #, kde-format 53 | msgid "AI engine to use." 54 | msgstr "사용할 인공 지능 엔진입니다." 55 | 56 | #: gui/main.cc:58 57 | #, kde-format 58 | msgid "Bovo" 59 | msgstr "Bovo" 60 | 61 | #: gui/main.cc:59 62 | #, kde-format 63 | msgid "KDE Five in a Row Board Game" 64 | msgstr "KDE 오목 게임" 65 | 66 | #: gui/main.cc:60 67 | #, kde-format 68 | msgid "(c) 2002-2007, Aron Boström" 69 | msgstr "(c) 2002-2007, Aron Boström" 70 | 71 | #: gui/main.cc:63 72 | #, kde-format 73 | msgid "Aron Boström" 74 | msgstr "Aron Boström" 75 | 76 | #: gui/main.cc:63 77 | #, kde-format 78 | msgid "Author" 79 | msgstr "작성자" 80 | 81 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 82 | #, kde-format 83 | msgid "Wins: %1" 84 | msgstr "승리: %1" 85 | 86 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 87 | #, kde-format 88 | msgid "Losses: %1" 89 | msgstr "패배: %1" 90 | 91 | #: gui/mainwindow.cc:190 92 | #, kde-format 93 | msgctxt "@action" 94 | msgid "&Replay" 95 | msgstr "다시 보기(&R)" 96 | 97 | #: gui/mainwindow.cc:192 98 | #, kde-format 99 | msgctxt "@info:tooltip" 100 | msgid "Replay game" 101 | msgstr "게임 다시 보기" 102 | 103 | #: gui/mainwindow.cc:193 104 | #, kde-format 105 | msgctxt "@info:whatsthis" 106 | msgid "Replays your last game for you to watch." 107 | msgstr "마지막 게임을 다시 봅니다." 108 | 109 | #: gui/mainwindow.cc:199 110 | #, kde-format 111 | msgctxt "@option:check" 112 | msgid "&Animation" 113 | msgstr "애니메이션(&A)" 114 | 115 | #: gui/mainwindow.cc:204 116 | #, kde-format 117 | msgctxt "@title:menu" 118 | msgid "Theme" 119 | msgstr "테마" 120 | 121 | #: gui/mainwindow.cc:344 122 | #, kde-format 123 | msgid "Start a new game to play." 124 | msgstr "새 게임을 시작합니다." 125 | 126 | #: gui/mainwindow.cc:382 127 | #, kde-format 128 | msgid "GAME OVER. Tie!" 129 | msgstr "게임 종료. 무승부입니다!" 130 | 131 | #: gui/mainwindow.cc:385 132 | #, kde-format 133 | msgid "GAME OVER. You won!" 134 | msgstr "게임 종료. 이겼습니다!" 135 | 136 | #: gui/mainwindow.cc:388 137 | #, kde-format 138 | msgid "GAME OVER. You lost!" 139 | msgstr "게임 종료. 졌습니다!" 140 | 141 | #: gui/mainwindow.cc:400 142 | #, kde-format 143 | msgid "It is your turn." 144 | msgstr "당신 차례입니다." 145 | 146 | #: gui/mainwindow.cc:404 147 | #, kde-format 148 | msgid "Waiting for computer." 149 | msgstr "컴퓨터가 수를 두고 있습니다." 150 | 151 | #: gui/mainwindow.cc:432 152 | #, kde-format 153 | msgid "Replaying game" 154 | msgstr "게임 다시 보는 중" 155 | 156 | #: gui/mainwindow.cc:448 157 | #, kde-format 158 | msgid "Game replayed." 159 | msgstr "게임 다시 보기 완료." 160 | -------------------------------------------------------------------------------- /src/gui/mark.cc: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #include "mark.h" 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include "common.h" 30 | #include "coord.h" 31 | #include "move.h" 32 | #include "scene.h" 33 | 34 | using namespace bovo; 35 | 36 | namespace gui { 37 | 38 | Mark::Mark(Scene* scene, const Move& move, bool animate, qreal fill) : QGraphicsSvgItem(), 39 | m_scene(scene), m_row(move.y()), m_col(move.x()), m_fill(fill) { 40 | setElementId(QString(move.player() == X ? QStringLiteral("x%1") : QStringLiteral("o%1")) 41 | .arg(QString::number(QRandomGenerator::global()->bounded(5) + 1))); 42 | m_tick = 20; 43 | m_ticker = nullptr; 44 | if (animate) { 45 | m_ticker = new QTimer(this); 46 | m_opacity = 0.0; 47 | connect(m_ticker, &QTimer::timeout, this, &Mark::tick); 48 | m_ticker->start(30); 49 | } else { 50 | m_opacity = 1.0; 51 | } 52 | 53 | setPos(m_scene->cellCenter(m_col, m_row)); 54 | } 55 | 56 | Mark::~Mark() { 57 | if (m_ticker) { 58 | disconnect(m_ticker, &QTimer::timeout, this, &Mark::tick); 59 | m_ticker->stop(); 60 | m_ticker->deleteLater(); 61 | } 62 | } 63 | 64 | QRectF Mark::boundingRect() const { 65 | qreal width = m_scene->squareSize(); 66 | qreal height = width; 67 | qreal margin = (1.0-m_fill) * width / 2.0; 68 | return { -width / 2.0 + margin, 69 | -height / 2.0 + margin, 70 | width - 2.0*margin, 71 | height - 2.0*margin}; 72 | } 73 | 74 | void Mark::killAnimation() { 75 | if (m_ticker != nullptr) { 76 | m_ticker->stop(); 77 | disconnect(m_ticker, nullptr, this, nullptr); 78 | m_ticker->deleteLater(); 79 | m_ticker = nullptr; 80 | m_opacity = 1.0; 81 | update(); 82 | } 83 | } 84 | 85 | void Mark::kill() { 86 | if (m_ticker) { 87 | disconnect(m_ticker, &QTimer::timeout, this, &Mark::tick); 88 | m_ticker->stop(); 89 | } else { 90 | m_ticker = new QTimer(this); 91 | } 92 | connect(m_ticker, &QTimer::timeout, this, &Mark::killTick); 93 | m_ticker->start(30); 94 | } 95 | 96 | void Mark::killTick() { 97 | m_opacity -= 0.1; 98 | update(); 99 | if (m_opacity <= 0.1) { 100 | m_ticker->stop(); 101 | Q_EMIT killed(this); 102 | } 103 | } 104 | 105 | void Mark::tick() { 106 | --m_tick; 107 | if (m_tick == 0) { 108 | killAnimation(); 109 | } else { 110 | m_opacity += 0.1; 111 | update(); 112 | } 113 | } 114 | 115 | void Mark::paint(QPainter *p, const QStyleOptionGraphicsItem*, QWidget*) { 116 | p->setOpacity(m_opacity); 117 | renderer()->render(p, elementId(), boundingRect()); 118 | } 119 | 120 | void Mark::setFill(qreal fill) { 121 | if (m_fill != fill) { 122 | m_fill = fill; 123 | prepareGeometryChange(); 124 | } 125 | } 126 | 127 | usi Mark::col() const { 128 | return m_col; 129 | } 130 | 131 | usi Mark::row() const { 132 | return m_row; 133 | } 134 | 135 | } /* namespace gui */ 136 | 137 | #include "moc_mark.cpp" 138 | -------------------------------------------------------------------------------- /src/ai/aron/aisquare.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2007 Aron Boström 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | /** 23 | * @file Declares the Square class used by the AI internally (AiSquare) 24 | */ 25 | 26 | #ifndef BOVO_AISQUARE_H 27 | #define BOVO_AISQUARE_H 28 | 29 | #include "square.h" 30 | 31 | #include "common.h" 32 | 33 | using namespace bovo; 34 | 35 | /** namespace for AI stuff */ 36 | namespace ai 37 | { 38 | 39 | /** 40 | * AiSquare is used by the AI to represent a square in a playing board. 41 | * 42 | * This class is used internally by the AI to represent a square in a 43 | * playing board. It extends the normal @c Square class with possibilities 44 | * to keep a point attached to the square, as well as a bool marker that 45 | * tells whether this square needs a recalculation of its points. 46 | * 47 | * Examples construction: (create a playing board) 48 | * @code 49 | * AiSquare** board = new AiSquare*[width]; 50 | * for (int x = 0; x < width; ++x) { 51 | * board[x] = new AiSquare[height]; 52 | * } 53 | * @endcode 54 | * 55 | * Example status use: 56 | * @code 57 | * if (board[x][y].status()) { 58 | * unsigned long points = score(board, x, y ); 59 | * board[x][y].setPoints(points); 60 | * board[x][y].setStatus(false); 61 | * } 62 | * @endcode 63 | * 64 | * Example mark needs to be repainted: 65 | * @code 66 | * // a neighbour of (x, y) has been marked as belonging to a player, 67 | * // so (x, y) needs to be recalculated. 68 | * board[x][y].setPoints(0); 69 | * board[x][y].setStatus(true); 70 | * @endcode 71 | * 72 | * @author bostrom (Aron Boström) 73 | */ 74 | class AiSquare : public Square 75 | { 76 | public: 77 | /** 78 | * @brief constructor of this AiSquare 79 | * @description this constructor creates an AiSquare 80 | */ 81 | AiSquare(); 82 | 83 | /** 84 | * @brief square points 85 | * @description AI points of this square 86 | * @return points of this square 87 | * @see setPoints 88 | */ 89 | uli points() const; 90 | 91 | /** 92 | * @brief sets points 93 | * @description sets the AI points of this square 94 | * @param points the points to set 95 | * @see points 96 | */ 97 | void setPoints(unsigned long int points); 98 | 99 | /** 100 | * @brief square status 101 | * @description status represents whether this square is in neef of a 102 | * recalculation of its points or not. 103 | * @return @c true if this square needs a recalculation, @c false otherwise 104 | * @see @c setStatus 105 | */ 106 | bool status() const; 107 | 108 | /** 109 | * @brief set status of this square 110 | * @description sets this square's need to get its score recalculated. 111 | * @param status the status to set. $c true means square is in need of a 112 | * recalculation, $c false means it doesn't need to be recalculated. 113 | * @see @c status 114 | */ 115 | void setStatus(bool status); 116 | 117 | private: 118 | uli m_points; /* unsigned long int points property */ 119 | bool m_status; /* bool status property */ 120 | }; 121 | 122 | } /* namespace ai */ 123 | 124 | #endif // BOVO_AISQUARE_H 125 | -------------------------------------------------------------------------------- /po/sq/bovo.po: -------------------------------------------------------------------------------- 1 | # Albanian translation for kdegames 2 | # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 3 | # This file is distributed under the same license as the kdegames package. 4 | # FIRST AUTHOR , 2009. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: kdegames\n" 9 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 10 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 11 | "PO-Revision-Date: 2009-08-03 03:18+0000\n" 12 | "Last-Translator: Vilson Gjeci \n" 13 | "Language-Team: Albanian \n" 14 | "Language: sq\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Launchpad-Export-Date: 2011-04-22 09:11+0000\n" 19 | "X-Generator: Launchpad (build 12883)\n" 20 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 21 | 22 | #, kde-format 23 | msgctxt "NAME OF TRANSLATORS" 24 | msgid "Your names" 25 | msgstr "KDE Shqip, Launchpad Contributions: Vilson Gjeci" 26 | 27 | #, kde-format 28 | msgctxt "EMAIL OF TRANSLATORS" 29 | msgid "Your emails" 30 | msgstr "kde-shqip@yahoogroups.com,vilsongjeci@gmail.com" 31 | 32 | #. i18n: ectx: label, entry (theme), group (bovo) 33 | #: gui/bovo.kcfg:9 34 | #, kde-format 35 | msgid "Theme" 36 | msgstr "Tema" 37 | 38 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 39 | #: gui/bovo.kcfg:13 40 | #, kde-format 41 | msgid "Speed of demo and replay playback." 42 | msgstr "" 43 | 44 | #. i18n: ectx: label, entry (animation), group (bovo) 45 | #: gui/bovo.kcfg:19 46 | #, kde-format 47 | msgid "Whether moves should be animated or not." 48 | msgstr "" 49 | 50 | #. i18n: ectx: label, entry (ai), group (bovo) 51 | #: gui/bovo.kcfg:23 52 | #, kde-format 53 | msgid "AI engine to use." 54 | msgstr "" 55 | 56 | #: gui/main.cc:58 57 | #, kde-format 58 | msgid "Bovo" 59 | msgstr "Bovo" 60 | 61 | #: gui/main.cc:59 62 | #, kde-format 63 | msgid "KDE Five in a Row Board Game" 64 | msgstr "" 65 | 66 | #: gui/main.cc:60 67 | #, fuzzy, kde-format 68 | #| msgid "(c) 2002,2007 Aron Boström" 69 | msgid "(c) 2002-2007, Aron Boström" 70 | msgstr "(c) 2002,2007 Aron Boström" 71 | 72 | #: gui/main.cc:63 73 | #, kde-format 74 | msgid "Aron Boström" 75 | msgstr "Aron Boström" 76 | 77 | #: gui/main.cc:63 78 | #, kde-format 79 | msgid "Author" 80 | msgstr "Autori" 81 | 82 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 83 | #, kde-format 84 | msgid "Wins: %1" 85 | msgstr "Fitoret: %1" 86 | 87 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 88 | #, kde-format 89 | msgid "Losses: %1" 90 | msgstr "Humbjet: %1" 91 | 92 | #: gui/mainwindow.cc:190 93 | #, kde-format 94 | msgctxt "@action" 95 | msgid "&Replay" 96 | msgstr "" 97 | 98 | #: gui/mainwindow.cc:192 99 | #, kde-format 100 | msgctxt "@info:tooltip" 101 | msgid "Replay game" 102 | msgstr "" 103 | 104 | #: gui/mainwindow.cc:193 105 | #, kde-format 106 | msgctxt "@info:whatsthis" 107 | msgid "Replays your last game for you to watch." 108 | msgstr "" 109 | 110 | #: gui/mainwindow.cc:199 111 | #, fuzzy, kde-format 112 | #| msgid "&Animation" 113 | msgctxt "@option:check" 114 | msgid "&Animation" 115 | msgstr "&Animacion" 116 | 117 | #: gui/mainwindow.cc:204 118 | #, fuzzy, kde-format 119 | #| msgid "Theme" 120 | msgctxt "@title:menu" 121 | msgid "Theme" 122 | msgstr "Tema" 123 | 124 | #: gui/mainwindow.cc:344 125 | #, kde-format 126 | msgid "Start a new game to play." 127 | msgstr "" 128 | 129 | #: gui/mainwindow.cc:382 130 | #, kde-format 131 | msgid "GAME OVER. Tie!" 132 | msgstr "" 133 | 134 | #: gui/mainwindow.cc:385 135 | #, kde-format 136 | msgid "GAME OVER. You won!" 137 | msgstr "" 138 | 139 | #: gui/mainwindow.cc:388 140 | #, kde-format 141 | msgid "GAME OVER. You lost!" 142 | msgstr "" 143 | 144 | #: gui/mainwindow.cc:400 145 | #, kde-format 146 | msgid "It is your turn." 147 | msgstr "" 148 | 149 | #: gui/mainwindow.cc:404 150 | #, kde-format 151 | msgid "Waiting for computer." 152 | msgstr "" 153 | 154 | #: gui/mainwindow.cc:432 155 | #, kde-format 156 | msgid "Replaying game" 157 | msgstr "" 158 | 159 | #: gui/mainwindow.cc:448 160 | #, kde-format 161 | msgid "Game replayed." 162 | msgstr "" 163 | -------------------------------------------------------------------------------- /po/nn/bovo.po: -------------------------------------------------------------------------------- 1 | # Translation of bovo to Norwegian Nynorsk 2 | # 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: bovo\n" 6 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 7 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 8 | "PO-Revision-Date: 2024-07-28 00:25+0200\n" 9 | "Last-Translator: Karl Ove Hufthammer \n" 10 | "Language-Team: Norwegian Nynorsk \n" 11 | "Language: nn\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "X-Generator: Lokalize 24.05.2\n" 16 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 17 | "X-Environment: kde\n" 18 | "X-Accelerator-Marker: &\n" 19 | "X-Text-Markup: kde4\n" 20 | 21 | #, kde-format 22 | msgctxt "NAME OF TRANSLATORS" 23 | msgid "Your names" 24 | msgstr "Karl Ove Hufthammer" 25 | 26 | #, kde-format 27 | msgctxt "EMAIL OF TRANSLATORS" 28 | msgid "Your emails" 29 | msgstr "karl@huftis.org" 30 | 31 | #. i18n: ectx: label, entry (theme), group (bovo) 32 | #: gui/bovo.kcfg:9 33 | #, kde-format 34 | msgid "Theme" 35 | msgstr "Tema" 36 | 37 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 38 | #: gui/bovo.kcfg:13 39 | #, kde-format 40 | msgid "Speed of demo and replay playback." 41 | msgstr "Farten til demoen og vising av opptak." 42 | 43 | #. i18n: ectx: label, entry (animation), group (bovo) 44 | #: gui/bovo.kcfg:19 45 | #, kde-format 46 | msgid "Whether moves should be animated or not." 47 | msgstr "Om trekka skal animerast." 48 | 49 | #. i18n: ectx: label, entry (ai), group (bovo) 50 | #: gui/bovo.kcfg:23 51 | #, kde-format 52 | msgid "AI engine to use." 53 | msgstr "Datamotstandaren som skal brukast." 54 | 55 | #: gui/main.cc:58 56 | #, kde-format 57 | msgid "Bovo" 58 | msgstr "Bovo" 59 | 60 | #: gui/main.cc:59 61 | #, kde-format 62 | msgid "KDE Five in a Row Board Game" 63 | msgstr "Brettspelet fem på rad" 64 | 65 | #: gui/main.cc:60 66 | #, kde-format 67 | msgid "(c) 2002-2007, Aron Boström" 68 | msgstr "© 2002–2007 Aron Boström" 69 | 70 | #: gui/main.cc:63 71 | #, kde-format 72 | msgid "Aron Boström" 73 | msgstr "Aron Boström" 74 | 75 | #: gui/main.cc:63 76 | #, kde-format 77 | msgid "Author" 78 | msgstr "Opphavsperson" 79 | 80 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 81 | #, kde-format 82 | msgid "Wins: %1" 83 | msgstr "Sigrar: %1" 84 | 85 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 86 | #, kde-format 87 | msgid "Losses: %1" 88 | msgstr "Tap: %1" 89 | 90 | #: gui/mainwindow.cc:190 91 | #, kde-format 92 | msgctxt "@action" 93 | msgid "&Replay" 94 | msgstr "&Vis omgang på nytt" 95 | 96 | #: gui/mainwindow.cc:192 97 | #, kde-format 98 | msgctxt "@info:tooltip" 99 | msgid "Replay game" 100 | msgstr "Vis omgang på nytt" 101 | 102 | #: gui/mainwindow.cc:193 103 | #, kde-format 104 | msgctxt "@info:whatsthis" 105 | msgid "Replays your last game for you to watch." 106 | msgstr "Vis den siste omgangen du spelte." 107 | 108 | #: gui/mainwindow.cc:199 109 | #, kde-format 110 | msgctxt "@option:check" 111 | msgid "&Animation" 112 | msgstr "&Animasjon" 113 | 114 | #: gui/mainwindow.cc:204 115 | #, kde-format 116 | msgctxt "@title:menu" 117 | msgid "Theme" 118 | msgstr "Tema" 119 | 120 | #: gui/mainwindow.cc:344 121 | #, kde-format 122 | msgid "Start a new game to play." 123 | msgstr "Start eit nytt spel." 124 | 125 | #: gui/mainwindow.cc:382 126 | #, kde-format 127 | msgid "GAME OVER. Tie!" 128 | msgstr "SPELET ER SLUTT. Uavgjort!" 129 | 130 | #: gui/mainwindow.cc:385 131 | #, kde-format 132 | msgid "GAME OVER. You won!" 133 | msgstr "Spelet er slutt. Du vann!" 134 | 135 | #: gui/mainwindow.cc:388 136 | #, kde-format 137 | msgid "GAME OVER. You lost!" 138 | msgstr "Spelet er slutt. Du tapte!" 139 | 140 | #: gui/mainwindow.cc:400 141 | #, kde-format 142 | msgid "It is your turn." 143 | msgstr "Det er din tur." 144 | 145 | #: gui/mainwindow.cc:404 146 | #, kde-format 147 | msgid "Waiting for computer." 148 | msgstr "Ventar på datamaskina." 149 | 150 | #: gui/mainwindow.cc:432 151 | #, kde-format 152 | msgid "Replaying game" 153 | msgstr "Viser omgang på nytt" 154 | 155 | #: gui/mainwindow.cc:448 156 | #, kde-format 157 | msgid "Game replayed." 158 | msgstr "Omgang vist på nytt." 159 | -------------------------------------------------------------------------------- /src/org.kde.bovo.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Exec=bovo -qwindowtitle %c 4 | Icon=bovo 5 | StartupNotify=true 6 | X-DocPath=bovo/index.html 7 | Categories=Qt;KDE;Game;BoardGame; 8 | Name=Bovo 9 | Name[ar]=بوفو 10 | Name[ast]=Bovo 11 | Name[bg]=Bovo 12 | Name[bs]=Bovo 13 | Name[ca]=Bovo 14 | Name[ca@valencia]=Bovo 15 | Name[cs]=Bovo 16 | Name[da]=Bovo 17 | Name[de]=Bovo 18 | Name[el]=Bovo 19 | Name[en_GB]=Bovo 20 | Name[eo]=Bovo 21 | Name[es]=Bovo 22 | Name[et]=Bovo 23 | Name[eu]=Bovo 24 | Name[fa]=بُوُ 25 | Name[fi]=Bovo 26 | Name[fr]=Bovo 27 | Name[ga]=Bovo 28 | Name[gl]=Bovo 29 | Name[he]=Bovo 30 | Name[hi]=बोवो 31 | Name[hne]=बोवो 32 | Name[hr]=Bovo 33 | Name[hu]=Bovo 34 | Name[ia]=Bovo 35 | Name[id]=Bovo 36 | Name[it]=Bovo 37 | Name[ja]=Bovo 38 | Name[ka]=Bovo 39 | Name[kk]=Бово 40 | Name[km]=Bovo 41 | Name[ko]=Bovo 42 | Name[lt]=Bovo 43 | Name[lv]=Bovo 44 | Name[mai]=Bovo 45 | Name[mr]=बोव्हो 46 | Name[ms]=Bovo 47 | Name[nb]=Bovo 48 | Name[nds]=Bovo 49 | Name[ne]=बोभो 50 | Name[nl]=Bovo 51 | Name[nn]=Bovo 52 | Name[pa]=ਬੋਵੋ 53 | Name[pl]=Bovo 54 | Name[pt]=Bovo 55 | Name[pt_BR]=Bovo 56 | Name[ro]=Bovo 57 | Name[ru]=Bovo 58 | Name[sa]=एक वृषभः 59 | Name[sk]=Bovo 60 | Name[sl]=Bovo 61 | Name[sq]=Bovo 62 | Name[sr]=Бово 63 | Name[sr@ijekavian]=Бово 64 | Name[sr@ijekavianlatin]=Bovo 65 | Name[sr@latin]=Bovo 66 | Name[sv]=Bovo 67 | Name[te]=బొవొ 68 | Name[tr]=Bovo 69 | Name[ug]=Bovo 70 | Name[uk]=Бово 71 | Name[wa]=Bovo 72 | Name[zh_CN]=Bovo 73 | Name[zh_TW]=Bovo 74 | GenericName=Five-in-a-row Board Game 75 | GenericName[ar]=لعبة خمسة في صفّ 76 | GenericName[bg]=Игра на пет поредни 77 | GenericName[bs]=Pet-u-redu Igra na ploči 78 | GenericName[ca]=Joc de cinc en fila 79 | GenericName[ca@valencia]=Joc de cinc en fila 80 | GenericName[cs]=Desková hra "pět v řadě" 81 | GenericName[da]=Fem-på-række-brætspil 82 | GenericName[de]=Fünf-Gewinnt-Brettspiel 83 | GenericName[el]=Επιτραπέζιο παιχνίδι Πέντε στη σειρά 84 | GenericName[en_GB]=Five-in-a-row Board Game 85 | GenericName[eo]=Gobanga bretludo 86 | GenericName[es]=Juego de mesa de cinco en línea 87 | GenericName[et]=Viis ritta lauamäng 88 | GenericName[eu]=Bosteko artzain-jokoa 89 | GenericName[fa]=بازی تخته پنج در یک سطر 90 | GenericName[fi]=Viiden suora 91 | GenericName[fr]=Jeu de plateau « Cinq-en-ligne » 92 | GenericName[ga]=Cluiche cláir cúig-cinn-as-a-chéile 93 | GenericName[gl]=Xogo de taboleiro «pai, fillo e nai» 94 | GenericName[he]=משחק לוח חמש בשורה 95 | GenericName[hne]=बोर्ड मं एक लकीर मं पांच वाले खेल 96 | GenericName[hu]=Ötöt egy sorba táblajáték 97 | GenericName[ia]=Joco de tabula Five-in-a-row (Cinque in un rango) 98 | GenericName[id]=Permainan Papan lima dalam sebaris 99 | GenericName[is]=Fimm-í-röð borðleikur 100 | GenericName[it]=Forza 5, gioco da tavolo 101 | GenericName[ja]=五目並べ 102 | GenericName[ka]="ხუთი ზედიზედ" სამაგიდო თამაში 103 | GenericName[kk]="Бесеуін - қатарға" ойны 104 | GenericName[km]=ល្បែង​ក្ដារ ប្រាំ​ក្នុង​មួយ​ជួរ 105 | GenericName[ko]=오목 게임 106 | GenericName[lt]=Penki-vienoje-eilutėje stalo žaidimas 107 | GenericName[lv]=Galda spēle — pieci rindā 108 | GenericName[mr]=एका-ओळीत-पाच बोर्ड खेळ 109 | GenericName[nb]=Brettspill fem på rad 110 | GenericName[nds]="Fief op de Reeg"-Speel 111 | GenericName[ne]=एक पङ्क्तिमा पाँच बोर्ड खेल 112 | GenericName[nl]=Vijf-op-een-rij bordspel 113 | GenericName[nn]=Fem på rad 114 | GenericName[pl]=Gra planszowa "Pięć w rzędzie" 115 | GenericName[pt]=Jogo de Tabuleiro Cinco-em-Linha 116 | GenericName[pt_BR]=Jogo de tabuleiro como Reversi 117 | GenericName[ro]=Joc de table Cinci-în-linie 118 | GenericName[ru]=Японские крестики-нолики 119 | GenericName[sa]=पञ्च-पङ्क्ति-फलक-क्रीडा 120 | GenericName[sk]=Stolová hra Piškvorky 121 | GenericName[sl]=Namizna igra Pet v vrsto 122 | GenericName[sr]=Игра на табли „пет у низу“ 123 | GenericName[sr@ijekavian]=Игра на табли „пет у низу“ 124 | GenericName[sr@ijekavianlatin]=Igra na tabli „pet u nizu“ 125 | GenericName[sr@latin]=Igra na tabli „pet u nizu“ 126 | GenericName[sv]=Fem-i-rad brädspel 127 | GenericName[tr]=Beşi Art Arda Tahta Oyunu 128 | GenericName[ug]=بىر-قۇردا-بەش تاختا ئويۇنى 129 | GenericName[uk]=Гра на дошці (п'ять-в-рядку) 130 | GenericName[wa]=Djeu «cénk e roye» 131 | GenericName[zh_CN]=五子棋游戏 132 | GenericName[zh_TW]=五子棋棋盤遊戲 133 | -------------------------------------------------------------------------------- /po/zh_TW/bovo.po: -------------------------------------------------------------------------------- 1 | # translation of bovo.po to Chinese Traditional 2 | # Copyright (C) YEAR This_file_is_part_of_KDE 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # 5 | # Franklin Weng , 2007. 6 | # Frank Weng (a.k.a. Franklin) , 2009, 2015. 7 | # SPDX-FileCopyrightText: 2024 Kisaragi Hiu 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: bovo\n" 11 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 12 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 13 | "PO-Revision-Date: 2024-05-05 17:16+0900\n" 14 | "Last-Translator: Kisaragi Hiu \n" 15 | "Language-Team: Traditional Chinese \n" 16 | "Language: zh_TW\n" 17 | "MIME-Version: 1.0\n" 18 | "Content-Type: text/plain; charset=UTF-8\n" 19 | "Content-Transfer-Encoding: 8bit\n" 20 | "dot tw>\n" 21 | "X-Generator: Lokalize 24.04.70\n" 22 | "Plural-Forms: nplurals=1; plural=0;\n" 23 | 24 | #, kde-format 25 | msgctxt "NAME OF TRANSLATORS" 26 | msgid "Your names" 27 | msgstr "Frank Weng (a.k.a. Franklin)" 28 | 29 | #, kde-format 30 | msgctxt "EMAIL OF TRANSLATORS" 31 | msgid "Your emails" 32 | msgstr "franklin@goodhorse.idv.tw" 33 | 34 | #. i18n: ectx: label, entry (theme), group (bovo) 35 | #: gui/bovo.kcfg:9 36 | #, kde-format 37 | msgid "Theme" 38 | msgstr "外觀主題" 39 | 40 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 41 | #: gui/bovo.kcfg:13 42 | #, kde-format 43 | msgid "Speed of demo and replay playback." 44 | msgstr "示範與重播的速度。" 45 | 46 | #. i18n: ectx: label, entry (animation), group (bovo) 47 | #: gui/bovo.kcfg:19 48 | #, kde-format 49 | msgid "Whether moves should be animated or not." 50 | msgstr "移動是否要使用動化。" 51 | 52 | #. i18n: ectx: label, entry (ai), group (bovo) 53 | #: gui/bovo.kcfg:23 54 | #, kde-format 55 | msgid "AI engine to use." 56 | msgstr "使用的人工智慧引擎。" 57 | 58 | #: gui/main.cc:58 59 | #, kde-format 60 | msgid "Bovo" 61 | msgstr "Bovo" 62 | 63 | #: gui/main.cc:59 64 | #, kde-format 65 | msgid "KDE Five in a Row Board Game" 66 | msgstr "KDE 五子棋遊戲" 67 | 68 | #: gui/main.cc:60 69 | #, kde-format 70 | msgid "(c) 2002-2007, Aron Boström" 71 | msgstr "(c) 2002-2007, Aron Boström" 72 | 73 | #: gui/main.cc:63 74 | #, kde-format 75 | msgid "Aron Boström" 76 | msgstr "Aron Boström" 77 | 78 | #: gui/main.cc:63 79 | #, kde-format 80 | msgid "Author" 81 | msgstr "作者" 82 | 83 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 84 | #, kde-format 85 | msgid "Wins: %1" 86 | msgstr "勝場:%1" 87 | 88 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 89 | #, kde-format 90 | msgid "Losses: %1" 91 | msgstr "敗場:%1" 92 | 93 | #: gui/mainwindow.cc:190 94 | #, kde-format 95 | msgctxt "@action" 96 | msgid "&Replay" 97 | msgstr "重播(&R)" 98 | 99 | #: gui/mainwindow.cc:192 100 | #, kde-format 101 | msgctxt "@info:tooltip" 102 | msgid "Replay game" 103 | msgstr "重播遊戲" 104 | 105 | #: gui/mainwindow.cc:193 106 | #, kde-format 107 | msgctxt "@info:whatsthis" 108 | msgid "Replays your last game for you to watch." 109 | msgstr "重播您上次玩的遊戲讓您觀看。" 110 | 111 | #: gui/mainwindow.cc:199 112 | #, kde-format 113 | msgctxt "@option:check" 114 | msgid "&Animation" 115 | msgstr "動畫(&A)" 116 | 117 | #: gui/mainwindow.cc:204 118 | #, kde-format 119 | msgctxt "@title:menu" 120 | msgid "Theme" 121 | msgstr "外觀主題" 122 | 123 | #: gui/mainwindow.cc:344 124 | #, kde-format 125 | msgid "Start a new game to play." 126 | msgstr "開始玩新遊戲。" 127 | 128 | #: gui/mainwindow.cc:382 129 | #, kde-format 130 | msgid "GAME OVER. Tie!" 131 | msgstr "遊戲結束,平手。" 132 | 133 | #: gui/mainwindow.cc:385 134 | #, kde-format 135 | msgid "GAME OVER. You won!" 136 | msgstr "遊戲結束,您贏了。" 137 | 138 | #: gui/mainwindow.cc:388 139 | #, kde-format 140 | msgid "GAME OVER. You lost!" 141 | msgstr "遊戲結束,您輸了。" 142 | 143 | #: gui/mainwindow.cc:400 144 | #, kde-format 145 | msgid "It is your turn." 146 | msgstr "現在該您下" 147 | 148 | #: gui/mainwindow.cc:404 149 | #, kde-format 150 | msgid "Waiting for computer." 151 | msgstr "等待電腦下棋中。" 152 | 153 | #: gui/mainwindow.cc:432 154 | #, kde-format 155 | msgid "Replaying game" 156 | msgstr "重播遊戲中" 157 | 158 | #: gui/mainwindow.cc:448 159 | #, kde-format 160 | msgid "Game replayed." 161 | msgstr "遊戲已重播完畢。" 162 | -------------------------------------------------------------------------------- /po/ia/bovo.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 This file is copyright: 2 | # This file is distributed under the same license as the bovo package. 3 | # 4 | # SPDX-FileCopyrightText: 2023, 2024 giovanni 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: bovo\n" 8 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 9 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 10 | "PO-Revision-Date: 2024-11-12 17:26+0100\n" 11 | "Last-Translator: giovanni \n" 12 | "Language-Team: Interlingua \n" 13 | "Language: ia\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 18 | "X-Generator: Lokalize 23.08.5\n" 19 | 20 | #, kde-format 21 | msgctxt "NAME OF TRANSLATORS" 22 | msgid "Your names" 23 | msgstr "Giovanni Sora" 24 | 25 | #, kde-format 26 | msgctxt "EMAIL OF TRANSLATORS" 27 | msgid "Your emails" 28 | msgstr "g.sora@tiscali.it" 29 | 30 | #. i18n: ectx: label, entry (theme), group (bovo) 31 | #: gui/bovo.kcfg:9 32 | #, kde-format 33 | msgid "Theme" 34 | msgstr "Thema" 35 | 36 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 37 | #: gui/bovo.kcfg:13 38 | #, kde-format 39 | msgid "Speed of demo and replay playback." 40 | msgstr "Velocitate de Demo e reproduce a repetition." 41 | 42 | #. i18n: ectx: label, entry (animation), group (bovo) 43 | #: gui/bovo.kcfg:19 44 | #, kde-format 45 | msgid "Whether moves should be animated or not." 46 | msgstr "Si motion deberea esser animate o non." 47 | 48 | #. i18n: ectx: label, entry (ai), group (bovo) 49 | #: gui/bovo.kcfg:23 50 | #, kde-format 51 | msgid "AI engine to use." 52 | msgstr "Motor de IA a usar." 53 | 54 | #: gui/main.cc:58 55 | #, kde-format 56 | msgid "Bovo" 57 | msgstr "Bovo" 58 | 59 | #: gui/main.cc:59 60 | #, kde-format 61 | msgid "KDE Five in a Row Board Game" 62 | msgstr "KDE Five a Row Joco de Tabula (Cinque in un rango)" 63 | 64 | #: gui/main.cc:60 65 | #, kde-format 66 | msgid "(c) 2002-2007, Aron Boström" 67 | msgstr "(c) 2002-2007, Aron Boström" 68 | 69 | #: gui/main.cc:63 70 | #, kde-format 71 | msgid "Aron Boström" 72 | msgstr "Aron Boström" 73 | 74 | #: gui/main.cc:63 75 | #, kde-format 76 | msgid "Author" 77 | msgstr "Autor" 78 | 79 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 80 | #, kde-format 81 | msgid "Wins: %1" 82 | msgstr "Victorias: %1" 83 | 84 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 85 | #, kde-format 86 | msgid "Losses: %1" 87 | msgstr "Perditas: %1" 88 | 89 | #: gui/mainwindow.cc:190 90 | #, kde-format 91 | msgctxt "@action" 92 | msgid "&Replay" 93 | msgstr "&Replica" 94 | 95 | #: gui/mainwindow.cc:192 96 | #, kde-format 97 | msgctxt "@info:tooltip" 98 | msgid "Replay game" 99 | msgstr "Rejoca Joco" 100 | 101 | #: gui/mainwindow.cc:193 102 | #, kde-format 103 | msgctxt "@info:whatsthis" 104 | msgid "Replays your last game for you to watch." 105 | msgstr "Repite tu ultime joco per te a guardar" 106 | 107 | #: gui/mainwindow.cc:199 108 | #, kde-format 109 | msgctxt "@option:check" 110 | msgid "&Animation" 111 | msgstr "&Animation" 112 | 113 | #: gui/mainwindow.cc:204 114 | #, kde-format 115 | msgctxt "@title:menu" 116 | msgid "Theme" 117 | msgstr "Thema" 118 | 119 | #: gui/mainwindow.cc:344 120 | #, kde-format 121 | msgid "Start a new game to play." 122 | msgstr "Starta un nove joco a jocar" 123 | 124 | #: gui/mainwindow.cc:382 125 | #, kde-format 126 | msgid "GAME OVER. Tie!" 127 | msgstr "JOCO TERMINATE. Ligate (tie)!" 128 | 129 | #: gui/mainwindow.cc:385 130 | #, kde-format 131 | msgid "GAME OVER. You won!" 132 | msgstr "JOCO TERMKINATE. Tu ganiava!" 133 | 134 | #: gui/mainwindow.cc:388 135 | #, kde-format 136 | msgid "GAME OVER. You lost!" 137 | msgstr "JOCO TERMINATE. Tu Perdeva!" 138 | 139 | #: gui/mainwindow.cc:400 140 | #, kde-format 141 | msgid "It is your turn." 142 | msgstr "Il es tu torno." 143 | 144 | #: gui/mainwindow.cc:404 145 | #, kde-format 146 | msgid "Waiting for computer." 147 | msgstr "Expectante computator." 148 | 149 | #: gui/mainwindow.cc:432 150 | #, kde-format 151 | msgid "Replaying game" 152 | msgstr "Rejocar Joco" 153 | 154 | #: gui/mainwindow.cc:448 155 | #, kde-format 156 | msgid "Game replayed." 157 | msgstr "Joco rejocate." 158 | -------------------------------------------------------------------------------- /themes/highcontrast/theme.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /src/ai/gabor/node.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | * 3 | * Copyright 2009 Pelladi Gabor 4 | * 5 | * Bovo is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * Bovo is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with Bovo; see the file COPYING. If not, write to 17 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | * 20 | ********************************************************************/ 21 | 22 | #include "node.h" 23 | #include "ai_impl.h" 24 | 25 | #include 26 | 27 | Node::Node(Standing *_standing, AiImpl *ai) 28 | : standing(_standing) 29 | , parent(nullptr) 30 | , child(nullptr) 31 | , depth(0) 32 | , signum(_standing->current == 0 ? 1 : -1) 33 | , alpha(MinHeur - 1) 34 | , beta(MaxHeur + 1) 35 | , is_exact(false) 36 | , evaluated(false) 37 | , depth_limit(ai->depth_limit) 38 | , max_branch(ai->max_branch) 39 | { 40 | generateSteps(); 41 | } 42 | 43 | Node::Node(Standing *_standing, Node *_parent) 44 | : standing(_standing) 45 | , parent(_parent) 46 | , child(nullptr) 47 | , depth(_parent->depth + 1) 48 | , signum(-(_parent->signum)) 49 | , alpha(_parent->alpha) 50 | , beta(_parent->beta) 51 | , is_exact(false) 52 | , evaluated(false) 53 | , depth_limit(_parent->depth_limit) 54 | , max_branch(_parent->max_branch) 55 | { 56 | generateSteps(); 57 | } 58 | 59 | Node::~Node() 60 | { 61 | delete child; 62 | delete standing; 63 | qDeleteAll(steps); 64 | } 65 | 66 | void Node::generateSteps() 67 | { 68 | steps.clear(); 69 | if (depth >= depth_limit || standing->target) { 70 | heur_T hv = standing->hval; 71 | heur_T decay = depth_decay * depth; 72 | if (hv > 0) 73 | hv -= decay; 74 | else if (hv < 0) 75 | hv += decay; 76 | if (-decay <= hv && hv <= decay) 77 | hv = 0; 78 | alpha = beta = hv; 79 | evaluated = true; 80 | return; 81 | } 82 | 83 | suggestions_T suggestions; 84 | standing->getSuggestions(suggestions); 85 | 86 | for (suggestions_T::iterator s = suggestions.begin(); s != suggestions.end(); ++s) { 87 | pos_T x = s->x; 88 | pos_T y = s->y; 89 | assert(!standing->table[x][y]); 90 | auto p = new Standing(*this->standing); 91 | p->step(x, y); 92 | 93 | heur_T pv = p->hval * signum; 94 | steps_T::iterator i; 95 | for (i = steps.begin(); i != steps.end() && signum * (*i)->hval > pv; ++i) 96 | ; 97 | steps.insert(i, p); 98 | 99 | // we only keep the best looking positions 100 | if ((unsigned int)steps.size() > max_branch) { 101 | delete steps.back(); 102 | steps.pop_back(); 103 | } 104 | } 105 | assert(steps.size() > 0); 106 | } 107 | 108 | void Node::calcHash(hash_T *hash, NodeHashData *data) 109 | { 110 | data->remaining_depth = depth_limit - depth; 111 | assert(data->remaining_depth > 0); 112 | 113 | hash_T c_hash = 0; 114 | for (int i = 0; i < standing->table_size_x; i++) { 115 | for (int j = 0; j < standing->table_size_y; j++) { 116 | c_hash = c_hash * 3145 + standing->table[i][j]; 117 | } 118 | } 119 | c_hash += standing->current; 120 | data->checksum = c_hash; 121 | 122 | c_hash = 0; 123 | for (int i = 0; i < standing->table_size_x; i++) { 124 | for (int j = 0; j < standing->table_size_y; j++) { 125 | c_hash = (c_hash * 5313 + standing->table[i][j]) % nodeHashSize; 126 | } 127 | } 128 | c_hash += standing->current; 129 | *hash = c_hash; 130 | } 131 | -------------------------------------------------------------------------------- /po/ka/bovo.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR This file is copyright: 3 | # This file is distributed under the same license as the bovo package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: bovo\n" 9 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 10 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 11 | "PO-Revision-Date: 2024-05-05 05:27+0200\n" 12 | "Last-Translator: Temuri Doghonadze \n" 13 | "Language-Team: Georgian \n" 14 | "Language: ka\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | "X-Generator: Poedit 3.3.2\n" 20 | 21 | #, kde-format 22 | msgctxt "NAME OF TRANSLATORS" 23 | msgid "Your names" 24 | msgstr "Temuri Doghonadze" 25 | 26 | #, kde-format 27 | msgctxt "EMAIL OF TRANSLATORS" 28 | msgid "Your emails" 29 | msgstr "Temuri.doghonadze@gmail.com" 30 | 31 | #. i18n: ectx: label, entry (theme), group (bovo) 32 | #: gui/bovo.kcfg:9 33 | #, kde-format 34 | msgid "Theme" 35 | msgstr "თემა" 36 | 37 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 38 | #: gui/bovo.kcfg:13 39 | #, kde-format 40 | msgid "Speed of demo and replay playback." 41 | msgstr "დემოს სიჩქარე და განმეორებითი დაკვრა." 42 | 43 | #. i18n: ectx: label, entry (animation), group (bovo) 44 | #: gui/bovo.kcfg:19 45 | #, kde-format 46 | msgid "Whether moves should be animated or not." 47 | msgstr "უნდა იყოს თუ არა ნაბიჯები ანიმაციური თუ არა." 48 | 49 | #. i18n: ectx: label, entry (ai), group (bovo) 50 | #: gui/bovo.kcfg:23 51 | #, kde-format 52 | msgid "AI engine to use." 53 | msgstr "AI ძრავის გამოყენება." 54 | 55 | #: gui/main.cc:58 56 | #, kde-format 57 | msgid "Bovo" 58 | msgstr "Bovo" 59 | 60 | #: gui/main.cc:59 61 | #, kde-format 62 | msgid "KDE Five in a Row Board Game" 63 | msgstr "KDE ხუთი ზედიზედ სამაგიდო თამაშში" 64 | 65 | #: gui/main.cc:60 66 | #, kde-format 67 | msgid "(c) 2002-2007, Aron Boström" 68 | msgstr "(გ) 2002-2007, Aron Boström" 69 | 70 | #: gui/main.cc:63 71 | #, kde-format 72 | msgid "Aron Boström" 73 | msgstr "Aron Boström" 74 | 75 | #: gui/main.cc:63 76 | #, kde-format 77 | msgid "Author" 78 | msgstr "ავტორი" 79 | 80 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 81 | #, kde-format 82 | msgid "Wins: %1" 83 | msgstr "მოგება: %1" 84 | 85 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 86 | #, kde-format 87 | msgid "Losses: %1" 88 | msgstr "წაგებები: %1" 89 | 90 | #: gui/mainwindow.cc:190 91 | #, kde-format 92 | msgctxt "@action" 93 | msgid "&Replay" 94 | msgstr "გამეო&რება" 95 | 96 | #: gui/mainwindow.cc:192 97 | #, kde-format 98 | msgctxt "@info:tooltip" 99 | msgid "Replay game" 100 | msgstr "თამაშის გამეორება" 101 | 102 | #: gui/mainwindow.cc:193 103 | #, kde-format 104 | msgctxt "@info:whatsthis" 105 | msgid "Replays your last game for you to watch." 106 | msgstr "საყურებლად ბოლო თამაშის გამეორება." 107 | 108 | #: gui/mainwindow.cc:199 109 | #, kde-format 110 | msgctxt "@option:check" 111 | msgid "&Animation" 112 | msgstr "&ანიმაცია" 113 | 114 | #: gui/mainwindow.cc:204 115 | #, kde-format 116 | msgctxt "@title:menu" 117 | msgid "Theme" 118 | msgstr "თემა" 119 | 120 | #: gui/mainwindow.cc:344 121 | #, kde-format 122 | msgid "Start a new game to play." 123 | msgstr "სათამაშოდ დაიწყეთ ახალი თამაში." 124 | 125 | #: gui/mainwindow.cc:382 126 | #, kde-format 127 | msgid "GAME OVER. Tie!" 128 | msgstr "თამაში დასრულდა. ფრე!" 129 | 130 | #: gui/mainwindow.cc:385 131 | #, kde-format 132 | msgid "GAME OVER. You won!" 133 | msgstr "თამაში დასრულდა. თქვენ მოიგეთ!" 134 | 135 | #: gui/mainwindow.cc:388 136 | #, kde-format 137 | msgid "GAME OVER. You lost!" 138 | msgstr "თამაში დასრულდა. თქვენ წააგეთ!" 139 | 140 | #: gui/mainwindow.cc:400 141 | #, kde-format 142 | msgid "It is your turn." 143 | msgstr "თქვენი ჯერია." 144 | 145 | #: gui/mainwindow.cc:404 146 | #, kde-format 147 | msgid "Waiting for computer." 148 | msgstr "კომპიუტერის მოლოდინი." 149 | 150 | #: gui/mainwindow.cc:432 151 | #, kde-format 152 | msgid "Replaying game" 153 | msgstr "თამაშის გამეორება" 154 | 155 | #: gui/mainwindow.cc:448 156 | #, kde-format 157 | msgid "Game replayed." 158 | msgstr "თამაში გამეორდა." 159 | -------------------------------------------------------------------------------- /po/he/bovo.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2024 This file is copyright: 2 | # This file is distributed under the same license as the bovo package. 3 | # 4 | # SPDX-FileCopyrightText: 2024 Yaron Shahrabani 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: bovo\n" 8 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 9 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 10 | "PO-Revision-Date: 2024-05-05 09:57+0300\n" 11 | "Last-Translator: Yaron Shahrabani \n" 12 | "Language-Team: צוות התרגום של KDE ישראל\n" 13 | "Language: he\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=4; plural=(n == 1) ? 0 : ((n == 2) ? 1 : ((n > 10 && " 18 | "n % 10 == 0) ? 2 : 3));\n" 19 | "X-Generator: Lokalize 23.08.5\n" 20 | 21 | #, kde-format 22 | msgctxt "NAME OF TRANSLATORS" 23 | msgid "Your names" 24 | msgstr "צוות התרגום של KDE ישראל" 25 | 26 | #, kde-format 27 | msgctxt "EMAIL OF TRANSLATORS" 28 | msgid "Your emails" 29 | msgstr "kde-l10n-he@kde.org" 30 | 31 | #. i18n: ectx: label, entry (theme), group (bovo) 32 | #: gui/bovo.kcfg:9 33 | #, kde-format 34 | msgid "Theme" 35 | msgstr "ערכת עיצוב" 36 | 37 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 38 | #: gui/bovo.kcfg:13 39 | #, kde-format 40 | msgid "Speed of demo and replay playback." 41 | msgstr "מהירות ההדגמה ונגינת השידור החוזר." 42 | 43 | #. i18n: ectx: label, entry (animation), group (bovo) 44 | #: gui/bovo.kcfg:19 45 | #, kde-format 46 | msgid "Whether moves should be animated or not." 47 | msgstr "האם מהלכים יונפשו או לא." 48 | 49 | #. i18n: ectx: label, entry (ai), group (bovo) 50 | #: gui/bovo.kcfg:23 51 | #, kde-format 52 | msgid "AI engine to use." 53 | msgstr "מנוע בינה מלאכותית לשימוש." 54 | 55 | #: gui/main.cc:58 56 | #, kde-format 57 | msgid "Bovo" 58 | msgstr "Bovo" 59 | 60 | #: gui/main.cc:59 61 | #, kde-format 62 | msgid "KDE Five in a Row Board Game" 63 | msgstr "משחק לוח חמישה בשורה מבית KDE" 64 | 65 | #: gui/main.cc:60 66 | #, kde-format 67 | msgid "(c) 2002-2007, Aron Boström" 68 | msgstr "(c) 2002-‏2007, ארון בוסטרום" 69 | 70 | #: gui/main.cc:63 71 | #, kde-format 72 | msgid "Aron Boström" 73 | msgstr "ארון בוסטרום" 74 | 75 | #: gui/main.cc:63 76 | #, kde-format 77 | msgid "Author" 78 | msgstr "יוצר" 79 | 80 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 81 | #, kde-format 82 | msgid "Wins: %1" 83 | msgstr "ניצחונות: %1" 84 | 85 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 86 | #, kde-format 87 | msgid "Losses: %1" 88 | msgstr "הפסדים: %1" 89 | 90 | #: gui/mainwindow.cc:190 91 | #, kde-format 92 | msgctxt "@action" 93 | msgid "&Replay" 94 | msgstr "שידור &חוזר של המשחק" 95 | 96 | #: gui/mainwindow.cc:192 97 | #, kde-format 98 | msgctxt "@info:tooltip" 99 | msgid "Replay game" 100 | msgstr "שידור חוזר של המשחק" 101 | 102 | #: gui/mainwindow.cc:193 103 | #, kde-format 104 | msgctxt "@info:whatsthis" 105 | msgid "Replays your last game for you to watch." 106 | msgstr "משחק את המשחק האחרון שלך מחדש כדי לאפשר לך לצפות בו." 107 | 108 | #: gui/mainwindow.cc:199 109 | #, kde-format 110 | msgctxt "@option:check" 111 | msgid "&Animation" 112 | msgstr "ה&נפשה" 113 | 114 | #: gui/mainwindow.cc:204 115 | #, kde-format 116 | msgctxt "@title:menu" 117 | msgid "Theme" 118 | msgstr "ערכת עיצוב" 119 | 120 | #: gui/mainwindow.cc:344 121 | #, kde-format 122 | msgid "Start a new game to play." 123 | msgstr "התחלת משחק חדש." 124 | 125 | #: gui/mainwindow.cc:382 126 | #, kde-format 127 | msgid "GAME OVER. Tie!" 128 | msgstr "המשחק הסתיים. תיקו!" 129 | 130 | #: gui/mainwindow.cc:385 131 | #, kde-format 132 | msgid "GAME OVER. You won!" 133 | msgstr "המשחק הסתיים. ניצחת!" 134 | 135 | #: gui/mainwindow.cc:388 136 | #, kde-format 137 | msgid "GAME OVER. You lost!" 138 | msgstr "המשחק הסתיים. הפסדת!" 139 | 140 | #: gui/mainwindow.cc:400 141 | #, kde-format 142 | msgid "It is your turn." 143 | msgstr "תורך." 144 | 145 | #: gui/mainwindow.cc:404 146 | #, kde-format 147 | msgid "Waiting for computer." 148 | msgstr "ממתינים למחשב." 149 | 150 | #: gui/mainwindow.cc:432 151 | #, kde-format 152 | msgid "Replaying game" 153 | msgstr "שידור חוזר של המשחק" 154 | 155 | #: gui/mainwindow.cc:448 156 | #, kde-format 157 | msgid "Game replayed." 158 | msgstr "המשחק שודר שוב." 159 | -------------------------------------------------------------------------------- /po/cs/bovo.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 2 | # This file is distributed under the same license as the PACKAGE package. 3 | # Vít Pelčák , 2011, 2015. 4 | # SPDX-FileCopyrightText: 2024 Vit Pelcak 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: bovo\n" 9 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 10 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 11 | "PO-Revision-Date: 2024-05-29 11:32+0200\n" 12 | "Last-Translator: Vit Pelcak \n" 13 | "Language-Team: Czech \n" 14 | "Language: cs\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" 19 | "X-Generator: Lokalize 24.02.2\n" 20 | 21 | #, kde-format 22 | msgctxt "NAME OF TRANSLATORS" 23 | msgid "Your names" 24 | msgstr "Lukáš Tinkl,David Kolibáč" 25 | 26 | #, kde-format 27 | msgctxt "EMAIL OF TRANSLATORS" 28 | msgid "Your emails" 29 | msgstr "lukas@kde.org,david@kolibac.cz" 30 | 31 | #. i18n: ectx: label, entry (theme), group (bovo) 32 | #: gui/bovo.kcfg:9 33 | #, kde-format 34 | msgid "Theme" 35 | msgstr "Motiv" 36 | 37 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 38 | #: gui/bovo.kcfg:13 39 | #, kde-format 40 | msgid "Speed of demo and replay playback." 41 | msgstr "Rychlost ukázky a přehrání záznamu." 42 | 43 | #. i18n: ectx: label, entry (animation), group (bovo) 44 | #: gui/bovo.kcfg:19 45 | #, kde-format 46 | msgid "Whether moves should be animated or not." 47 | msgstr "Zda mají být pohyby animovány nebo ne." 48 | 49 | #. i18n: ectx: label, entry (ai), group (bovo) 50 | #: gui/bovo.kcfg:23 51 | #, kde-format 52 | msgid "AI engine to use." 53 | msgstr "Umělá inteligence, která se má použít." 54 | 55 | #: gui/main.cc:58 56 | #, kde-format 57 | msgid "Bovo" 58 | msgstr "Bovo" 59 | 60 | #: gui/main.cc:59 61 | #, kde-format 62 | msgid "KDE Five in a Row Board Game" 63 | msgstr "Desková hra \"pět v řadě\"" 64 | 65 | #: gui/main.cc:60 66 | #, kde-format 67 | msgid "(c) 2002-2007, Aron Boström" 68 | msgstr "(c) 2002-2007, Aron Boström" 69 | 70 | #: gui/main.cc:63 71 | #, kde-format 72 | msgid "Aron Boström" 73 | msgstr "Aron Boström" 74 | 75 | #: gui/main.cc:63 76 | #, kde-format 77 | msgid "Author" 78 | msgstr "Autor" 79 | 80 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 81 | #, kde-format 82 | msgid "Wins: %1" 83 | msgstr "Vítězství: %1" 84 | 85 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 86 | #, kde-format 87 | msgid "Losses: %1" 88 | msgstr "Prohry: %1" 89 | 90 | #: gui/mainwindow.cc:190 91 | #, kde-format 92 | msgctxt "@action" 93 | msgid "&Replay" 94 | msgstr "Přeh&rát" 95 | 96 | #: gui/mainwindow.cc:192 97 | #, kde-format 98 | msgctxt "@info:tooltip" 99 | msgid "Replay game" 100 | msgstr "Přehrát hru" 101 | 102 | #: gui/mainwindow.cc:193 103 | #, kde-format 104 | msgctxt "@info:whatsthis" 105 | msgid "Replays your last game for you to watch." 106 | msgstr "Přehraje záznam poslední hry." 107 | 108 | #: gui/mainwindow.cc:199 109 | #, kde-format 110 | msgctxt "@option:check" 111 | msgid "&Animation" 112 | msgstr "&Animace" 113 | 114 | #: gui/mainwindow.cc:204 115 | #, kde-format 116 | msgctxt "@title:menu" 117 | msgid "Theme" 118 | msgstr "Motiv" 119 | 120 | #: gui/mainwindow.cc:344 121 | #, kde-format 122 | msgid "Start a new game to play." 123 | msgstr "Spusťte novou hru." 124 | 125 | #: gui/mainwindow.cc:382 126 | #, kde-format 127 | msgid "GAME OVER. Tie!" 128 | msgstr "KONEC HRY. Remíza!" 129 | 130 | #: gui/mainwindow.cc:385 131 | #, kde-format 132 | msgid "GAME OVER. You won!" 133 | msgstr "KONEC HRY. Vyhráli jste!" 134 | 135 | #: gui/mainwindow.cc:388 136 | #, kde-format 137 | msgid "GAME OVER. You lost!" 138 | msgstr "KONEC HRY. Prohráli jste!" 139 | 140 | #: gui/mainwindow.cc:400 141 | #, kde-format 142 | msgid "It is your turn." 143 | msgstr "Jste na tahu." 144 | 145 | #: gui/mainwindow.cc:404 146 | #, kde-format 147 | msgid "Waiting for computer." 148 | msgstr "Čeká se na počítač." 149 | 150 | #: gui/mainwindow.cc:432 151 | #, kde-format 152 | msgid "Replaying game" 153 | msgstr "Hra se přehrává" 154 | 155 | #: gui/mainwindow.cc:448 156 | #, kde-format 157 | msgid "Game replayed." 158 | msgstr "Hra přehrána." 159 | -------------------------------------------------------------------------------- /po/hr/bovo.po: -------------------------------------------------------------------------------- 1 | # Translation of bovo to Croatian 2 | # 3 | # Andrej Dundović , 2010. 4 | msgid "" 5 | msgstr "" 6 | "Project-Id-Version: \n" 7 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 8 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 9 | "PO-Revision-Date: 2025-11-02 09:42+0100\n" 10 | "Last-Translator: Andrej Dundović \n" 11 | "Language-Team: Croatian \n" 12 | "Language: hr\n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: 8bit\n" 16 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 17 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 18 | "X-Generator: Poedit 3.8\n" 19 | "X-Environment: kde\n" 20 | "X-Accelerator-Marker: &\n" 21 | "X-Text-Markup: kde4\n" 22 | 23 | #, kde-format 24 | msgctxt "NAME OF TRANSLATORS" 25 | msgid "Your names" 26 | msgstr "Igor Dobrača" 27 | 28 | #, kde-format 29 | msgctxt "EMAIL OF TRANSLATORS" 30 | msgid "Your emails" 31 | msgstr "igor.dobraca@skole.hr" 32 | 33 | #. i18n: ectx: label, entry (theme), group (bovo) 34 | #: gui/bovo.kcfg:9 35 | #, kde-format 36 | msgid "Theme" 37 | msgstr "Tema" 38 | 39 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 40 | #: gui/bovo.kcfg:13 41 | #, kde-format 42 | msgid "Speed of demo and replay playback." 43 | msgstr "Brzina reprodukcije demo i ponavljanja." 44 | 45 | #. i18n: ectx: label, entry (animation), group (bovo) 46 | #: gui/bovo.kcfg:19 47 | #, kde-format 48 | msgid "Whether moves should be animated or not." 49 | msgstr "Trebaju li potezi biti animirani ili ne." 50 | 51 | #. i18n: ectx: label, entry (ai), group (bovo) 52 | #: gui/bovo.kcfg:23 53 | #, kde-format 54 | msgid "AI engine to use." 55 | msgstr "Koristi AI." 56 | 57 | #: gui/main.cc:58 58 | #, kde-format 59 | msgid "Bovo" 60 | msgstr "Bovo" 61 | 62 | #: gui/main.cc:59 63 | #, kde-format 64 | msgid "KDE Five in a Row Board Game" 65 | msgstr "KDE Pet u nizu društvena igra" 66 | 67 | #: gui/main.cc:60 68 | #, kde-format 69 | msgid "(c) 2002-2007, Aron Boström" 70 | msgstr "(c) 2002-2007, Aron Boström" 71 | 72 | #: gui/main.cc:63 73 | #, kde-format 74 | msgid "Aron Boström" 75 | msgstr "Aron Boström" 76 | 77 | #: gui/main.cc:63 78 | #, kde-format 79 | msgid "Author" 80 | msgstr "Autor" 81 | 82 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 83 | #, kde-format 84 | msgid "Wins: %1" 85 | msgstr "Pobjeda: %1" 86 | 87 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 88 | #, kde-format 89 | msgid "Losses: %1" 90 | msgstr "Gubitaka: %1" 91 | 92 | #: gui/mainwindow.cc:190 93 | #, kde-format 94 | msgctxt "@action" 95 | msgid "&Replay" 96 | msgstr "&Ponovi" 97 | 98 | #: gui/mainwindow.cc:192 99 | #, kde-format 100 | msgctxt "@info:tooltip" 101 | msgid "Replay game" 102 | msgstr "Ponovite igru" 103 | 104 | #: gui/mainwindow.cc:193 105 | #, kde-format 106 | msgctxt "@info:whatsthis" 107 | msgid "Replays your last game for you to watch." 108 | msgstr "Ponavlja vašu posljednju igru koju možete pogledati." 109 | 110 | #: gui/mainwindow.cc:199 111 | #, kde-format 112 | msgctxt "@option:check" 113 | msgid "&Animation" 114 | msgstr "&Animacija" 115 | 116 | #: gui/mainwindow.cc:204 117 | #, kde-format 118 | msgctxt "@title:menu" 119 | msgid "Theme" 120 | msgstr "Tema" 121 | 122 | #: gui/mainwindow.cc:344 123 | #, kde-format 124 | msgid "Start a new game to play." 125 | msgstr "Započnite novu igru." 126 | 127 | #: gui/mainwindow.cc:382 128 | #, kde-format 129 | msgid "GAME OVER. Tie!" 130 | msgstr "KRAJ IGRE. Neriješeno!" 131 | 132 | #: gui/mainwindow.cc:385 133 | #, kde-format 134 | msgid "GAME OVER. You won!" 135 | msgstr "KRAJ IGRE. Pobijedili ste!" 136 | 137 | #: gui/mainwindow.cc:388 138 | #, kde-format 139 | msgid "GAME OVER. You lost!" 140 | msgstr "KRAJ IGRE. Izgubili ste!" 141 | 142 | #: gui/mainwindow.cc:400 143 | #, kde-format 144 | msgid "It is your turn." 145 | msgstr "Ti si na redu." 146 | 147 | #: gui/mainwindow.cc:404 148 | #, kde-format 149 | msgid "Waiting for computer." 150 | msgstr "Čekanje računala." 151 | 152 | #: gui/mainwindow.cc:432 153 | #, kde-format 154 | msgid "Replaying game" 155 | msgstr "Ponovno igranje igre" 156 | 157 | #: gui/mainwindow.cc:448 158 | #, kde-format 159 | msgid "Game replayed." 160 | msgstr "Igra je ponovljena." 161 | -------------------------------------------------------------------------------- /po/pt/bovo.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: bovo\n" 4 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 5 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 6 | "PO-Revision-Date: 2022-07-06 12:33+0100\n" 7 | "Last-Translator: José Nuno Coelho Pires \n" 8 | "Language-Team: pt \n" 9 | "Language: pt\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 14 | "X-POFile-SpellExtra: Boström Bovo Aron\n" 15 | 16 | #, kde-format 17 | msgctxt "NAME OF TRANSLATORS" 18 | msgid "Your names" 19 | msgstr "José Nuno Pires" 20 | 21 | #, kde-format 22 | msgctxt "EMAIL OF TRANSLATORS" 23 | msgid "Your emails" 24 | msgstr "zepires@gmail.com" 25 | 26 | #. i18n: ectx: label, entry (theme), group (bovo) 27 | #: gui/bovo.kcfg:9 28 | #, kde-format 29 | msgid "Theme" 30 | msgstr "Tema" 31 | 32 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 33 | #: gui/bovo.kcfg:13 34 | #, kde-format 35 | msgid "Speed of demo and replay playback." 36 | msgstr "Velocidade da demonstração e da repetição do jogo." 37 | 38 | #. i18n: ectx: label, entry (animation), group (bovo) 39 | #: gui/bovo.kcfg:19 40 | #, kde-format 41 | msgid "Whether moves should be animated or not." 42 | msgstr "Se as jogadas deverão ser animadas ou não." 43 | 44 | #. i18n: ectx: label, entry (ai), group (bovo) 45 | #: gui/bovo.kcfg:23 46 | #, kde-format 47 | msgid "AI engine to use." 48 | msgstr "O motor de IA a usar." 49 | 50 | #: gui/main.cc:58 51 | #, kde-format 52 | msgid "Bovo" 53 | msgstr "Bovo" 54 | 55 | #: gui/main.cc:59 56 | #, kde-format 57 | msgid "KDE Five in a Row Board Game" 58 | msgstr "Jogo de Tabuleiro de Cinco-em-Linha para o KDE" 59 | 60 | #: gui/main.cc:60 61 | #, kde-format 62 | msgid "(c) 2002-2007, Aron Boström" 63 | msgstr "(c) 2002-2007 Aron Boström" 64 | 65 | #: gui/main.cc:63 66 | #, kde-format 67 | msgid "Aron Boström" 68 | msgstr "Aron Boström" 69 | 70 | #: gui/main.cc:63 71 | #, kde-format 72 | msgid "Author" 73 | msgstr "Autoria" 74 | 75 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 76 | #, kde-format 77 | msgid "Wins: %1" 78 | msgstr "Vitórias: %1" 79 | 80 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 81 | #, kde-format 82 | msgid "Losses: %1" 83 | msgstr "Derrotas: %1" 84 | 85 | #: gui/mainwindow.cc:190 86 | #, fuzzy, kde-format 87 | #| msgid "&Replay" 88 | msgctxt "@action" 89 | msgid "&Replay" 90 | msgstr "&Repetir" 91 | 92 | #: gui/mainwindow.cc:192 93 | #, fuzzy, kde-format 94 | #| msgid "Replay game" 95 | msgctxt "@info:tooltip" 96 | msgid "Replay game" 97 | msgstr "Jogar de novo" 98 | 99 | #: gui/mainwindow.cc:193 100 | #, fuzzy, kde-format 101 | #| msgid "Replays your last game for you to watch." 102 | msgctxt "@info:whatsthis" 103 | msgid "Replays your last game for you to watch." 104 | msgstr "Repete o seu último jogo para podê-lo observar." 105 | 106 | #: gui/mainwindow.cc:199 107 | #, fuzzy, kde-format 108 | #| msgid "&Animation" 109 | msgctxt "@option:check" 110 | msgid "&Animation" 111 | msgstr "&Animação" 112 | 113 | #: gui/mainwindow.cc:204 114 | #, fuzzy, kde-format 115 | #| msgid "Theme" 116 | msgctxt "@title:menu" 117 | msgid "Theme" 118 | msgstr "Tema" 119 | 120 | #: gui/mainwindow.cc:344 121 | #, fuzzy, kde-format 122 | #| msgid "Start a new Game to play" 123 | msgid "Start a new game to play." 124 | msgstr "Iniciar um novo jogo" 125 | 126 | #: gui/mainwindow.cc:382 127 | #, kde-format 128 | msgid "GAME OVER. Tie!" 129 | msgstr "FIM DO JOGO. Você empatou!" 130 | 131 | #: gui/mainwindow.cc:385 132 | #, kde-format 133 | msgid "GAME OVER. You won!" 134 | msgstr "FIM DO JOGO. Você ganhou!" 135 | 136 | #: gui/mainwindow.cc:388 137 | #, kde-format 138 | msgid "GAME OVER. You lost!" 139 | msgstr "FIM DO JOGO. Você perdeu!" 140 | 141 | #: gui/mainwindow.cc:400 142 | #, kde-format 143 | msgid "It is your turn." 144 | msgstr "É a sua vez." 145 | 146 | #: gui/mainwindow.cc:404 147 | #, kde-format 148 | msgid "Waiting for computer." 149 | msgstr "À espera do computador." 150 | 151 | #: gui/mainwindow.cc:432 152 | #, kde-format 153 | msgid "Replaying game" 154 | msgstr "A repetir de novo o jogo" 155 | 156 | #: gui/mainwindow.cc:448 157 | #, kde-format 158 | msgid "Game replayed." 159 | msgstr "Jogo repetido." 160 | -------------------------------------------------------------------------------- /po/nb/bovo.po: -------------------------------------------------------------------------------- 1 | # Translation of bovo to Norwegian Bokmål 2 | # 3 | # Rune Nakim , 2008. 4 | # Bjørn Steensrud , 2010. 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: bovo\n" 8 | "Report-Msgid-Bugs-To: https://bugs.kde.org\n" 9 | "POT-Creation-Date: 2025-11-17 11:49+0000\n" 10 | "PO-Revision-Date: 2010-01-27 20:16+0100\n" 11 | "Last-Translator: Bjørn Steensrud \n" 12 | "Language-Team: Norwegian Bokmål \n" 13 | "Language: nb\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "X-Generator: Lokalize 0.3\n" 18 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 19 | "X-Environment: kde\n" 20 | "X-Accelerator-Marker: &\n" 21 | "X-Text-Markup: kde4\n" 22 | 23 | #, kde-format 24 | msgctxt "NAME OF TRANSLATORS" 25 | msgid "Your names" 26 | msgstr "Rune Nakim" 27 | 28 | #, kde-format 29 | msgctxt "EMAIL OF TRANSLATORS" 30 | msgid "Your emails" 31 | msgstr "nakim@online.no" 32 | 33 | #. i18n: ectx: label, entry (theme), group (bovo) 34 | #: gui/bovo.kcfg:9 35 | #, kde-format 36 | msgid "Theme" 37 | msgstr "Tema" 38 | 39 | #. i18n: ectx: label, entry (playbackSpeed), group (bovo) 40 | #: gui/bovo.kcfg:13 41 | #, kde-format 42 | msgid "Speed of demo and replay playback." 43 | msgstr "Fart på demonstrasjon og avspilling av opptak" 44 | 45 | #. i18n: ectx: label, entry (animation), group (bovo) 46 | #: gui/bovo.kcfg:19 47 | #, kde-format 48 | msgid "Whether moves should be animated or not." 49 | msgstr "Om trekk skal animeres eller ikke." 50 | 51 | #. i18n: ectx: label, entry (ai), group (bovo) 52 | #: gui/bovo.kcfg:23 53 | #, kde-format 54 | msgid "AI engine to use." 55 | msgstr "AI-motor som skal brukes." 56 | 57 | #: gui/main.cc:58 58 | #, kde-format 59 | msgid "Bovo" 60 | msgstr "Bovo" 61 | 62 | #: gui/main.cc:59 63 | #, kde-format 64 | msgid "KDE Five in a Row Board Game" 65 | msgstr "Brettspillet fem på rad" 66 | 67 | #: gui/main.cc:60 68 | #, kde-format 69 | msgid "(c) 2002-2007, Aron Boström" 70 | msgstr "" 71 | 72 | #: gui/main.cc:63 73 | #, kde-format 74 | msgid "Aron Boström" 75 | msgstr "Aron Boström" 76 | 77 | #: gui/main.cc:63 78 | #, kde-format 79 | msgid "Author" 80 | msgstr "Utvikler" 81 | 82 | #: gui/mainwindow.cc:67 gui/mainwindow.cc:364 83 | #, kde-format 84 | msgid "Wins: %1" 85 | msgstr "Vunnet: %1" 86 | 87 | #: gui/mainwindow.cc:68 gui/mainwindow.cc:258 gui/mainwindow.cc:377 88 | #, kde-format 89 | msgid "Losses: %1" 90 | msgstr "Tapt: %1" 91 | 92 | #: gui/mainwindow.cc:190 93 | #, fuzzy, kde-format 94 | msgctxt "@action" 95 | msgid "&Replay" 96 | msgstr "&Vis omgang på nytt" 97 | 98 | #: gui/mainwindow.cc:192 99 | #, fuzzy, kde-format 100 | msgctxt "@info:tooltip" 101 | msgid "Replay game" 102 | msgstr "Vis omgang på nytt" 103 | 104 | #: gui/mainwindow.cc:193 105 | #, fuzzy, kde-format 106 | msgctxt "@info:whatsthis" 107 | msgid "Replays your last game for you to watch." 108 | msgstr "Viser den siste omgangen du spilte." 109 | 110 | #: gui/mainwindow.cc:199 111 | #, fuzzy, kde-format 112 | msgctxt "@option:check" 113 | msgid "&Animation" 114 | msgstr "&Animasjon" 115 | 116 | #: gui/mainwindow.cc:204 117 | #, fuzzy, kde-format 118 | msgctxt "@title:menu" 119 | msgid "Theme" 120 | msgstr "Tema" 121 | 122 | #: gui/mainwindow.cc:344 123 | #, fuzzy, kde-format 124 | msgid "Start a new game to play." 125 | msgstr "Start et nytt spill" 126 | 127 | #: gui/mainwindow.cc:382 128 | #, kde-format 129 | msgid "GAME OVER. Tie!" 130 | msgstr "Spilet er ute, uavgjort!" 131 | 132 | #: gui/mainwindow.cc:385 133 | #, kde-format 134 | msgid "GAME OVER. You won!" 135 | msgstr "Spillet er slutt. Du vant!" 136 | 137 | #: gui/mainwindow.cc:388 138 | #, kde-format 139 | msgid "GAME OVER. You lost!" 140 | msgstr "Spillet er slutt. Du tapte!" 141 | 142 | #: gui/mainwindow.cc:400 143 | #, kde-format 144 | msgid "It is your turn." 145 | msgstr "Det er din tur." 146 | 147 | #: gui/mainwindow.cc:404 148 | #, kde-format 149 | msgid "Waiting for computer." 150 | msgstr "Venter på datamaskinen." 151 | 152 | #: gui/mainwindow.cc:432 153 | #, kde-format 154 | msgid "Replaying game" 155 | msgstr "Viser omgang på nytt" 156 | 157 | #: gui/mainwindow.cc:448 158 | #, kde-format 159 | msgid "Game replayed." 160 | msgstr "Omgangen er ferdig vist på nytt." 161 | --------------------------------------------------------------------------------