• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

ksquares

KSquares

Introduction

KSquares is a KDE implementation of the game "squares"

Overview

The overall game is masterminded from KSquaresWindow. That class creates a KSquaresGame object which handles the game logic such as moving from player to player and tracking when points are scored. The information for each player is stored in KSquaresPlayer of which KSquaresGame has an array. When a KSquaresGame event occurs it emits a signal which is picked up by the KSquaresWindow and passed onto the GameBoardScene which is responsible for holding the information about the game board. The GameBoardScene emits signal when a line is drawn which passes via the KSquaresWindow back to KSquaresGame.

Layout of indices

In KSquaresGame, GameBoardScene and aiController there is a consistent indexing rule for accesing the tables.

For the list of squares and their owners, the indices simply count from left to right along the top row of the board, then along the second row etc.

For the list of lines and whether they're drawn, the indices count from left to right along the top row of horizontal lines, then (left to right) along the first row of vertical lines etc.

ksquaresindex.png

TODO

Todo:
A more obvious sign of where the computer player has moved
Todo:
Logo/initials/colour/etc. for players squares
Todo:
Themeable game board. Subclass all the QGraphicsItems and handle the theming there :D QGraphicsLineItem (feint lines, completed lines), QGraphicsEllipseItem (dots), QGraphicsRectItem(completed squares)
Todo:
foreach for QLists in AI class
Todo:
valgrind
Todo:
Not yet Hints
Todo:
Not yet Network play
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ksquares

Skip menu "ksquares"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal