180 likes | 396 Views
Chess ++. Capricorn Adrian Hoekman Daniel Potvin Ali El- Shakankiry Fiona Sinclair Alex Wisman Boyeong Woo. Goals. Create a functional version of chess Adding bonus features Attack and defense Bonus cards Health bars Save functionality/New Game options Testing framework.
E N D
Chess ++ Capricorn Adrian Hoekman Daniel Potvin Ali El-Shakankiry Fiona Sinclair Alex Wisman Boyeong Woo
Goals • Create a functional version of chess • Adding bonus features • Attack and defense • Bonus cards • Health bars • Save functionality/New Game options • Testing framework
Working Chess • Back End structure • Global variables • Chesspiece object • ChessSquare object • ChessBoard object
Global variables • The turn (which colour pieces can be moved) • Active vectors (which colour pieces are on the board) • Eliminated vectors (which pieces have been eliminated) • King vectors (for check and checkmate) • The board (a multidimensional array of chess squares)
ChessPiece Object • Object storing piece information • Can be any one of pawn, knight, bishop, rook, queen or king • Stores position, attack, defense, health • Movement capabilities dependent on piece (inheritance)
ChessSquare Object • For displaying information about the chessboard • Can contain a piece or not (and display this accordingly) • Responds to mouse click events
ChessBoard Object • Contains information on the chess game • Functions in ChessBoard affect the global variable board • Passed to the Mainwindow (class which displays chess information) • Used to set up a chess board
Promotion • The option to change a pawn to a knight, bishop, rook, or queen if the pawn advances to the last square • A Qlabel appears when the pawn is about to reach the last square • The user choice is then recorded, the pawn is removed and the piece the user chose appears on the last square
Bonus Features • Health Bars • Attack and defense • Bonus Cards
Health Bars • Pieces have a certain amount of health • Health is reduced when one piece attacks another • Amount of health also displayed above pieces
Attack and Defense • A player has the option of attacking another piece in their turn • The amount of damage done to a piece when another piece attacks • Attack, defense, and health saved as attributes in pieces
Bonus Cards • Happen after a certain number of pieces have been taken • Offers the option to place a piece back on the board
Game options • New Game • Save Game • Load Game
Testing • Sikuli • Automated GUI testing software • We used this to ensure our changes did not impact piece behavior when undesired