• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • 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

ksquares

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

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal