Documente online.
Zona de administrare documente. Fisierele tale
Am uitat parola x Creaza cont nou
 HomeExploreaza
upload
Upload




The Egg Carton Game

software


The Egg Carton Game

Version 1.0

Programmed by

Paul Talbot

Background

The Egg Carton Game is based on a game I learned from a friend back



in junior high. We played the game with 36 marbles and an empty egg

carton. Now that I'm an adult and don't have any marbles (I must have 11411s1823l

lost them <g>), I decided to write this program to simulate playing The

Egg Carton game.

Rules of the Game

Initial Board Position

The initial board position consists of three marbles in each of the

twelve slots of the egg carton. (Having no artistic talent whatsoever,

in Version 1.0 I have indicated the presence of marbles numerically

rather than pictorially.)

Objective

The object of the game is to clear all marbles from your side of

the egg carton. The first of the two players to do so is the winner.

Moving Rules

The first player selects a slot on his side of the egg carton from

which to move. All the marbles from that slot are removed, then

distributed one at a time to each subsequent slot (moving in a counter-

clockwise direction). One marble must be dropped into each slot (as far

as they will go), whether or not there are already marbles in the slot,

and regardless of whether the slot is your own or your opponent's.

However, when making the turn from one side of the board to the other,

one marble must also be dropped "off the board" (out of the egg carton).

On screen, the two slots that look like end zones of a football field

are "off the board." (Note: the number of marbles accumulated in each

"end zone" is absolutely irrelevant in determining the winner. The only

thing that matters is clearing all marbles from your side of the board.)

The point at which the marbles from the selected slot "run out" is

critical to determining what happens next.

A) If the last marble from the initial slot is dropped off the board

(either end), the player must again select a slot on his side of the

board from which to move.

B) If the last marble is dropped into a slot that already had one or

more marbles in it, all the marbles from that slot (including the one

just dropped there) are removed and distributed counter-clockwise from

that point.

C) If the last slot into which a marble is dropped was EMPTY when

reached, the player's turn is over and the opponent's turn begins.

Example:

(N) (M) (L) (K) (J) (I)

| 4 | 2 | 1 | | 6 | 1 |

|-------- ----- ------ --|

| 7 | 3 | 4 | 1 | | 1 |

(A) (B) (C) (D) (E) (F)

If Player 1 choses to move from slot B, the 3 marbles in slot B are

distributed one each to slots C, D, and E, leaving them with 5, 2 and 1

marble(s), respectively. Because the last marble was dropped in an

empty slot, Player 1's turn would be over.

If Player 1 instead chose to move from slot C, 3 marbles would be

distributed to slots D, E, F and the final marble would be dropped off

the board. Player 1 must then select another slot from which to move.

If Player 1 chooses to move from slot A, the seven marbles are

distributed one each to slots B through F (5 slots), the sixth marble is

dropped off the board, and the seventh is dropped in the first slot on

Player 2's side of the board, slot I. Player 1 would then pick up the 2

marbles in slot I, drop one in slot J and the other in slot K, at which

point his turn ends (because slot K was empty).

In the computerized version of The Egg Carton Game, the program

takes care of making all the marble moves for you. You just have to

pick the slot from which you want to make your move. Several features

built into the program help you follow the action. Speed delays (see

Speed Options, below) allow you to watch each marble "drop" into its

designated slot. When the all-important last marble drops, the slot it

landed in momentarily flashes on screen. The program will then continue

the move from that point, or display an instruction as to what happens

next according to the rules described above.

How to Make your Move

Mouse: Click on the slot from which you wish to move.

Keyboard: Use the Alt-Key combination just outside the slot from which

you wish to move.

Game Options

Select 1 Player mode to play against the computer. (Version 1.0 of

The Egg Carton Game only offers a Novice computer opponent.)

Select 2 Player mode to play against another person.

Speed Options

Use the speed options to adjust the speed at which the game plays

on your computer. If you are not already familiar with the Egg Carton

Game, a slow speed setting will make it easier for you to follow what is

happening as the computer moves the marbles. As you grow more familiar

with how the moves are made, adjust the game to play faster. (In

Version 1.0 you will have to reset your custom speed settings each time

you exit and reload the game.)

Requirements

The Egg Carton Game was written in Visual Basic*. Therefore, it

will only run under Windows* 3.0 or later, and you must have VBRUN100.DLL

(available on most major bulletin boards) installed either in a

directory on your PATH, in your Windows directory (usually C:\WINDOWS),

or in your Windows system directory (usually C:\WINDOWS\SYSTEM).

To be able to read this file online, set the "Directory at Startup"

(in Win 3.0) or the "Working Directory" (in Win 3.1) to the directory in

which you install this program and this file.

*Visual Basic and Windows are trademarks of Microsoft Corporation.


Document Info


Accesari: 886
Apreciat: hand-up

Comenteaza documentul:

Nu esti inregistrat
Trebuie sa fii utilizator inregistrat pentru a putea comenta


Creaza cont nou

A fost util?

Daca documentul a fost util si crezi ca merita
sa adaugi un link catre el la tine in site


in pagina web a site-ului tau.




eCoduri.com - coduri postale, contabile, CAEN sau bancare

Politica de confidentialitate | Termenii si conditii de utilizare




Copyright © Contact (SCRIGROUP Int. 2024 )