-
Couldn't load subscription status.
- Fork 22
Add files via upload #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pwindas
wants to merge
2
commits into
CPRO-Session1:master
Choose a base branch
from
pwindas:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| For my final project, I wish to create the game of 2048. 2048 is a simple game played on phones tablets and computers. It is composed of a 4x4 grid that has numbers filling in the spaces. The game begins by creating two random blocks- either a two or a four- anywhere on the board. After that, you simply combine the same blocks to create a bigger block. Ex: a 2 and a 2 would create a 4, a 4 and a 4 would create an eight and etc. Also, every time you swipe the board (left, right, up or down) a new block spawns in. In terms of the program itself, here's what I have planned: | ||
| variables/data types - I will use these throughout the program to create a lot of things. Examples include math equations such as (x*2) and etc. | ||
|
|
||
| input/output - the user will have to input a move (right, left, up, down) and the output will be a completely new board with the new numbers assembled. | ||
|
|
||
| conditional statements - similar to variables, I will be using a lot of conditional statements tthroughout the program. An example could be if (space == 0) { | ||
| return 0; | ||
| This would tell the program that if there is a block on an edge, and a move is called to move it in the directions of the edge, it won't do anything. | ||
|
|
||
| loops - Loops are going to be really helpful especially when dealing with the movement of the blocks themselves. I will use conditional statements along with loops to assign each block in the grid a variable name and write lines that will give them parameters. I think the hardest part of this program will be to have all the numbers on the board to correctly move. | ||
|
|
||
| functions - As someone with OCD, I'm going to try and make this code really neat and clean. By using functions to organize all parts of program, I hope to keep it easily readable. | ||
|
|
||
| Arrays/Strings - If I dont create an equation to mae the blocks properly multiple, I plan to just make an array or string of the numbers so I can just have them called during the game. | ||
|
|
||
| Advanced data types - In terms of structures and enumerated lists, I don't really know where I'll use them. As I progress in my code, I think I'll reach a point where I'll simply need to use one. If you have any ideas right off the bat though I'm all ears. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe by incorporating a scoreboard of some sort? You do need to include advanced data types, so think about this can happen!