How your bucket should look like after you finished the step

Assignment Help Data Structure & Algorithms
Reference no: EM131373804

Continuation of Assignment

For beginners, programming is often hard and frustrating. If a programmer can visualize what they are creating, it makes programming little less difficult. That is what you will do in this module.

You have already submitted the detailed design and game loop with all the dummy functions. During this module, implement one of the very first steps of Tetris, "Display the Bucket". You need to call the function inside the game loop so that it is always displayed. But, you might need to initialize it once before the game loop. Below you will find some detailed instruction on the bucket implementation.

1. Bucket will be a 2-D array of char of 25 x 12 dimension.

2. Fill the left border (column 1), right border (column 12), and bottom border (row 25) of the bucket with any char that you like to create the border with. Remember, the array index is '1' lower than the actual # of columns. This can be your "initializeBucket()" function. Fill the other cells with empty string ' '. You know that, to go over a 2-D array you need two nested for loops. Right? You also need conditional statements.

3. Display the bucket in a game loop. How do you do that? You use two for loops and use a "cout....". You can name the function "displayBucket()".

4. For Windows, use the "Windows.h" library. Use the function below to put your cursor, where you want to display something. Remember the top and left most location of the console is (0,0). So, if you want to draw from the top-left most, you call the function this way, "setCursorTo(0, 0);". Then do your 'cout << "etc etc ..."<<endl;' (see below). If you want to display at some other location, call "setCursorTo" for that location and do a cout again. You can do this "setCursorTo" and "cout<<...." combination as many times as you want. To give bucket a bucket shape, you need to use this "setCursorTo" function appropriately.
void setCursorTo(int x, int y)

{

HANDLE handle;

COORD position;

handle = GetStdHandle(STD_OUTPUT_HANDLE);

position.X = x;

position.Y = y;

SetConsoleCursorPosition(handle, position);

}
Void main(){

setCursorTo(0, 0);

cout <<"etc etc ..."<<endl;

}

5. Here is how your bucket should look like after you finished the step. Notice, you have left border, right border, and bottom border, and everything inside is empty string.

Attachment:- tetris.rar

Reference no: EM131373804

Questions Cloud

List the factors to consider when choosing a supply register : Using Figure 71-25 , select a floor register that will provide an 8-10 ft throw for 150 CFM with a face velocity less than 700 fpm.
Evaluate lenscrafters operations strategy : Evaluate LensCrafters' operations strategy and explain how the organization seeks to gain a competitive advantage in terms of sustainability
What other technical advances do you see cares incorporating : What other technical advances do you see cares incorporating? Do you think that any of these current or potential advancements could result in unexpected negative consequences? If so, what?
Explain what manufacturers mean by a register’s throw : What is the maximum static pressure difference that most residential blowers are designed for?
How your bucket should look like after you finished the step : Here is how your bucket should look like after you finished the step. Notice, you have left border, right border, and bottom border, and everything inside is empty string.
What is the total available static pressure for the ductwork : Blower: 0.55 in wc total external static at design airfl ow Evaporator coil: 0.25 in wc static pressure drop at design airfl ow Filter: 0.1 in wc static pressure drop at design airfl ow Registers and grilles: 0.05 in wc static pressure drop at des..
Determine how a decision will be made : 2. When groups convene to make decisions, one of their first acts typically is to determine how a decision will be made. What type of decision rule is likely to encourage the greatest amount of information exchange?
What are the advantages and disadvantages of brainstorming : What are some reasons managers choose autocratic decision making over group decision making, regardless of the quality of the outcome?
How has wireless technology changed your quality of life : Write a 700-word summary of your selected article on wireless technology. Be sure to also address the following: How has wireless technology changed your quality of life or your work environment

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

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