QuestionQuestion

Sum Swamp Game Rules

Each player chooses a game piece and places it on start. Players roll a number die and the player with the highest number goes first.
The first player rolls all 3 dice and creates a number sentence by placing the highest number die first, the operation die second, and the smallest number die last.
The player then adds or subtracts the numbers, and moves ahead the sum or difference. For example, if a player rolls 3 + 2, he/she moves ahead 5 spaces.
If a player rolls a combination that equals 0 (5 – 5 = 0), he/she does not move.
Then it is the next player’s turn.
The first player to reach the finish space is the winner!
(Note: players do NEED to roll the exact number to reach the finish space.)
“Evens”or “Odds”:
If a player lands on one of these spaces, he/she rolls one die.
If a player rolls an “even” or “odd” number as indicated on the game board, he/she moves ahead that number of spaces. If an even/odd number is not rolled, the player must wait until his/her next turn and try again!
Number Space:
If a player lands on a number space, he/she rolls the operation die. If the player rolls a +, he/she moves ahead the number indicated on the space. If the player rolls a –, he/she moves back that number.
“Short Cut”:
If a player lands on one of these spaces, he/she follows the arrow as indicated on the board.
“Endless Loop”: All players enter the loop as the arrow on the board indicates.
Players continue moving counterclockwise around the loop. If a player lands on the space marked “exit,” he/she can exit the loop on his/her next turn.
The game will only have two players at this point, a human and a computer.
You can create your own interface.

Extra: use
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(.5));

To show the movement of the game piece
Try this out
for (int i = 0; i < 10; i++)
{               
Application.DoEvents();
Update();
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(.5));
}


Sum Swamp Game Specification

GAME BOARD: The game board background is a graphic.

SPACES: Labels (label1, label2, …, label42) are arranged over the spaces on the game board. The text and transparency of these labels change to indicate where players are located on the game board.

DICE: The three dice are labels whose text changes to indicate the roll of each die. The two number dice (labelDieLargeNum, labelDieSmallNum) can have values 1 through 6. The operator die (labelDieOperator) can have the value “-“ or “+”. The ROLL button (buttonRoll) is used to generate the random value of the dice.

GAME STATUS: A label (labelStatus) indicates the current player. A label (labelResult) indicates the result of the current roll which is the number of spaces the player should move.

GAME PLAY: The game consists of two players, one human (P1) and one computer (P2). Both players begin on Start (label1). Players roll a number die (labelDieLargeNum) and the player with the highest number goes first. The first player rolls all three dice (labelDieLargeNum, labelDieOperator, labelDieSmallNum) and creates a number sentence by placing the highest number die first (labelDieLargeNum), the operation die second (labelDieOperator), and the smallest number die last (labelDieSmallNum). The player then adds or subtracts the numbers and moves ahead the sum or difference which is indicated in labelMove. If a player rolls a combination that equals 0, the player does not move. Then it is the next player’s turn. The first player to reach Finish (label42) wins. Players must roll the exact number to reach the Finish.

EVENS/ODDS: If a player lands on Evens (label3, label17, label38) one die (labelDieLargeNum) is rolled and a random number (1-6) is generated. If the random number is even, the player advances that number of spaces. Otherwise, the player’s turn is over. If a player lands on Odds (label9, label 34) one die (labelDieLargeNum) is rolled and a random number (1-6) is generated. If the random number is odd, the player advanced that number of spaces. Otherwise, the player’s turn is over.

SHORTCUT: If a player lands on Shortcut (label7 or label16) they are advanced to the appropriate space (label15 or label22).

ENDLESS LOOP: If a player lands on Enter (label23) the player enters the endless loop (label23 through label30, and label32) until they land on Exit (label31).

NUMBERS: If a player lands on a number space (label4, label12, label14, label19, label26, label28, label35, label39) the player rolls the operation die (labelDieOperator) and either “-“ or “+” is displayed. If “-“ is displayed, the player moves backward the number of spaces. If “+” is displayed, the player moves forward the number of spaces.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SumSwamp
{
    public partial class Form1 : Form
    {
       // random seed
       private Random rand;
       // current postion of human and computer
       private int humanPosition;
       private int computerPosition;

       // this control let us access label
       private Control ct;

       // finished line of this game
       private int endPosition;
       // the condition of game
       private bool onPlay;
    /*   private bool [] evens;
       private bool [] odds;*/

       private int human;
       private int computer;...
$75.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available C-Family Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats