Student Project

CHECKERS GAME
Ability Level: Advanced
Estimated Time: 6-8 hours
Objectives:
  • Visual Basic Software
  • Textbook
  • Checker board and pieces to demonstrate the game and its rules
Materials and Resources:
  • Visual Basic Software
  • Textbook
  • Checker board and pieces to demonstrate the game and its rules
Overview:
  • Create a program that allows two players to play a simple form of checkers. Draw a 64-square board with alternating color squares. Place different colored discs on the dark squares in the top and bottom three rows. Allow the user to select a disc and move it to diagonally adjacent squares or to jump opponents discs on diagonally adjacent squares. Discs may only move to empty squares. Jumps may only be made over opponents discs. A piece (disc) that is jumped must be removed from the board. The program should refresh its display if the board is resized or temporarily hidden and unhidden.
  • Allow the user to reset the board. Resetting the board puts all pieces back on their original squares.
  • Allow the user to quit the game and exit the program.
Instructions:
  1. Write out a list of rules the program will enforce on piece movement.
  2. Create an 8 by 8 board consisting of squares of different background colors.
  3. Create a subroutine to populate the board with different color pieces as with a game of checkers.
  4. Create code behind the object array representing the board squares to allow the user to select a playing piece.
  5. Create code to allow the user to indicate a location to move a selected piece.
  6. Create code to verify that a target square is a valid move according to the rules of the game.
  7. If an opponents piece is jumped by a players move, remove that piece from the board and identify that pieces square as empty.
  8. Create an option for the game to be reset to its initial set-up.
  9. Write program code to redraw pieces on the board if a paint event occurs.
  10. Allow the user to exit the program.
Hints: A completed program might look something like this:



PROJECT EXTRAS
  • Allow the users to select the colors of:
    • The discs used
    • The squares on the board
    • The form background
  • Determine the end of the game when there are no remaining moves.
  • Keep a running count of how many discs each player has on the board.
  • Make a more complete game of checkers by allowing pieces that reach the end of the board to become kings and move backwards. Provide an identification of kings on discs as appropriate.