Skip to content Skip to navigation

OpenStax_CNX

You are here: Home » Content » Objective Report

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

Objective Report

Module by: Matthew Blair. E-mail the author

Summary: This report is basically a tentative long term plan for project completition.

Checkers

Description:

We will be making a scaled down version of the game Checkers using the Java programming language. The first phase of the project includes the setup of the application, game logic and the first game mode, Player vs. Player. The second phase of the project will be dedicated to the Player vs. Computer game mode and creating the logic for the computer to play.

Implementation (Phase 1)

We are using a series of 2-dimensional arrays to display the game board as a grid. Once the game pieces (discs) are designed, we will set the game pieces into place over the board and display them together. Next, we will design the game logic according to the rule of Checkers and define the criterion for winning the game.

Game play:

  1. 1) Player 1 chooses a color
  2. 2) Player 1 is allowed to make the first move by dragging and dropping a piece to a diagonal square.
  3. 3) The program will decide whether or not the move is valid. If it is not valid the piece is returned to its initial place.
  4. 4) The program will then switch gameplay to Player 2 and evaluate their move until a valid play is made
  5. 5) According to the rules of Checkers jumps cannot be skipped and the program will have to force the player to make a jump if the opportunity arises.

6) A player wins the game when the opponent cannot make a move. In most cases, this is because all of the opponent's pieces have been captured, but it could also be because all of his pieces are blocked in.

7) The program should then display which player has won the game.

The Big Plan (Tentative)

First Phase: Display the board and pieces, Code the game logic and Player vs. Player

  1. 1) Create the menu and game options for the application.
  2. 2) Design a GUI that will allow for game piece movement and board refreshing.
  3. 3) Display the board with pieces.
  4. 4) Game Logic:
    1. Each disc may only be moved one space at a time.
    2. A King may move forwards or backwards.
    3. The program should switch between player1 and player2 to allow gameplay.
    4. Before the game is ended, the program should ensure that all of the criterion for winning are met and display the game winner.

Second Phase: Player vs. Computer

  1. 1) Allow player1 to make the first move by default.
  2. 2) Create the program code for the Computer to make valid plays only.
  3. 3) Do not allow the Computer to make the same move twice

Game Rules:

  1. Checkers is played by two players. Each player begins the game with 12 colored discs. (Typically, one set of pieces is black and the other red.)
  2. The board consists of 64 squares, alternating between 32 dark and 32 light squares. It is positioned so that each player has a light square on the right side corner closest to him or her.
  3. Each player places his or her pieces on the 12 dark squares closest to him or her.
  4. Black moves first. Players then alternate moves.
  5. Moves are allowed only on the dark squares, so pieces always move diagonally. Single pieces are always limited to forward moves (toward the opponent).
  6. A piece making a non-capturing move (not involving a jump) may move only one square.
  7. A piece making a capturing move (a jump) leaps over one of the opponent's pieces, landing in a straight diagonal line on the other side. Only one piece may be captured in a single jump; however, multiple jumps are allowed on a single turn.
  8. When a piece is captured, it is removed from the board.
  9. If a player is able to make a capture, there is no option -- the jump must be made. If more than one capture is available, the player is free to choose whichever he or she prefers.
  10. When a piece reaches the furthest row from the player who controls that piece, it is crowned and becomes a king. One of the pieces which had been captured is placed on top of the king so that it is twice as high as a single piece.
  11. Kings are limited to moving diagonally, but may move both forward and backward. (Remember that single pieces, i.e. non-kings, are always limited to forward moves.)
  12. Kings may combine jumps in several directions -- forward and backward -- on the same turn. Single pieces may shift direction diagonally during a multiple capture turn, but must always jump forward (toward the opponent).
  13. A player wins the game when the opponent cannot make a move. In most cases, this is because all of the opponent's pieces have been captured, but it could also be because all of his pieces are blocked in.

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks