Odd clusters using c programming

Assignment Help C/C++ Programming
Reference no: EM13765721

ODD CLUSTERS Using C++ programming

The objective of this project is to write an interactive Odd Clusters game, using the programming knowledge you have gained this semester. Your task is to write a programthat allows one player to play a game of Odd Clusters against the computer or for twoindividuals to play against each other.

BASIC RULES OF ODD CLUSTERS

Odd Clusters is a board game played between two players, who alternatepiece placement on a square board, with sixty-four smaller squares, arrangedin an 8x8 grid. The players take turns. A turn consists of placing one piece onthe board in an unoccupied square.
A cluster is a grouping of one player's pieces connected by adjacency. Thesmallest cluster is a single piece. An Odd Cluster is one composed of an oddnumber of pieces. If a piece placement creates a cluster of an even numberof pieces (an even cluster), the entire even cluster is cleared (the boardlocations are emptied). A player may have any number of Odd Clusters on theboard. Play ends when the board is completely full of pieces or the playersagree to end the game. The winner is the player with the most pieces on theboard at the end of the game.

Specifications

• User interface - the player shall be able to:
o Place a pieceo Resign from the game (quit)
• allow valid placement only (can't place a piece on an occupied location)

• clear even clusters after notifying the participants that one has beenconstructed
• redisplay the game board after each move

• handle computer's turn

• determine that game is over if board is completely full

• determine the winner at game's conclusion and congratulate the winner

• allow user to select who makes first move of game (user or computer)

• allow user to save current game for future continuation

• allow user to reload an existing game to continue playing

• allow for two player mode (computer only checks for validity and removeseven clusters) in addition to one player/ computer mode
• computer piece placement should be done using randomization

• you must employ functions (minimally 8) in both your design and code. Yourmain function should be looked upon as a driver function - mainly makingfunction calls to specific modules.

• The program must contain comments and

• Each function and the program need to have comment headers
• NO GLOBAL VARIABLES SHOULD BE USED

• You may have two global constants - for board rows, cols.
The remainder of the semester will be spent on this project. Time will be devoted todiscussing the mandatory components of the project. Some time will also be allocatedfor general program design discussion and/or examples. The final project will consist ofdesign, algorithm, code and testing components.

Reference no: EM13765721

Questions Cloud

Explain methods currently being used to encourage economic : Briefly explain methods currently being used to encourage economic growth for the typical firm in Hong Kong and for the typical firm in Singapore.
Find case involving construction litigation : 5 minute power point presentation: Find case involving construction litigation, Explain contractual relationships, Explain complaint or reason for suit
Issue related to alternate grains : What nutritional concerns might you have if a friend stopped eating wheat products and substituted white rice and soy flour products for wheat
Explanation and cite information of swot : Existing mission, objectives, and strategies at least  - SWOT(TOWS) Analysis
Odd clusters using c programming : The objective of this project is to write an interactive Odd Clusters game, using the programming knowledge you have gained this semester. Your task is to write a programthat allows one player to play a game of Odd Clusters against the computer o..
What community resources and programs will you draw on : What community resources and programs will you draw on for this offender? Is his home plan appropriate to ensure a successful re-entry? Identify any changes that you would require before approving it.
Are we too litigious : Are We Too Litigious-We are starting our study of Torts. These are not pastries! They are "civil wrongs," for which the legal society believes payment or punishment (monetary) ought to occur
What should business managers do to protect organizations : What are some special issues that arise in Internet transactions involving contracts as compared to traditional transactions involving contracts? What should business managers do to protect their organizations in Internet transactions
Equipment is depreciated straight-line to a zero book value : Thornley Machines is considering a 3-year project with an initial cost of $1,080,000. The project will not directly produce any sales but will reduce operating costs by $640,000 a year. The equipment is depreciated straight-line to a zero book value ..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Declare an array of integers

Declare an array of 10 integers and initialize its elements to the following values: -10; -8; -6; -4; -2; 0; 2; 4; 6;8;10

  Temperature conversions

Temperature Conversions. The following problems generate temperature- conversion tables. Use following equations that give relationships between temperatures in degrees Fahrenheit(Tf), degree Celsius(Tc), degrees Kelvin(Tk), and degrees Rankin(Tr);

  Correct code so that it finds the sum of 20 numbers

Correct the following code so that it finds the sum of 20 numbers.

  How a base version of this assignment works

For this assignment you are to create an interactive moving sign in the context of a cityscape street scene. Click the link below to see how a base version of this assignment works. Type a message in the long blank slot at the top left, and then clic..

  Calculate the trajectory of a soccer ball

Write a program to calculate the trajectory (flight path) of a soccer ball

  Program that generates 50 random numbers of type

Write a program that generates 50 random numbers of type integer ranges from 1 to 1000 and load all the numbers into a C++ vector. The program should then display the largest, the smallest, the sum, and the average values stored in the vector.

  Calculates the average of three test scores

Write a program that calculates the average of three test scores. The program should contain three value-returning functions: main, getTestScore, and calcAverage

  Problem 1 integrationcreate a program to integrate an

problem 1. integrationcreate a program to integrate an arbitrary time-domain signal with variable limits of integration

  Variables(x,y) be represented by any linked list forms types

How can a polynomial in two variables(x,y) be represented by any linked list forms(types)? Each node should represent a term and should contain the powers of x, and y as well as the coefficient of that term, write C++ functions to do the following

  Allows the user to enter the coefficients for a system

Create a graphical (not text-based) Visual C++ program that allows the user to enter the coefficients for a system of four equations with four unknowns. Include a button that when clicked, will solve the system of equations and display the results in..

  Write a c program that reads in five numbers

Q1. (Bar Chart /Histogram printing) Write a C program that reads in five numbers (each between 1 and 30). For each number read, your program should print a line containing that number of adjacent asterisks. For example, if your program reads the numb..

  Define a class for file that is derived from document

Similarly, define a class for File that is derived from Document and includes a instance variable for the pathname. The textual contents of the file should be stored in the inherited variable text. Redefine the toString method to concatenate all t..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd