general refactoring of rock paper scissors game#1
Open
oskarz1234 wants to merge 4 commits intojohnneijzen:masterfrom
oskarz1234:patch-1
Open
general refactoring of rock paper scissors game#1oskarz1234 wants to merge 4 commits intojohnneijzen:masterfrom oskarz1234:patch-1
oskarz1234 wants to merge 4 commits intojohnneijzen:masterfrom
oskarz1234:patch-1
Conversation
sorta tried to make it a bit more neater
Owner
|
Hmm I can't compile using C99 Standard Compilers I tried using TCC and GCC and TDM-GCC MinGW what compiler are you using? |
johnneijzen
requested changes
Jul 27, 2018
| for (int i =0;i<3;i++) | ||
| { | ||
| if(key == keys1[i]) | ||
| playerTwoMoves = i+1; |
Owner
There was a problem hiding this comment.
where are playerOneMoves store since now the while loop forever since playerOneMoves are never stored
| void playerKeyEvent() | ||
| { | ||
| { | ||
| char keys1[] = ['q','w','e','a','s','d','x','\0']; |
| { | ||
| { | ||
| char keys1[] = ['q','w','e','a','s','d','x','\0']; | ||
| char keys2[] = ['u','i','o','j','k','l','m','\0']; |
| printf("Player Two Pick Gun\n"); | ||
| else if (playerTwoMoves == 7) | ||
| printf("Player Two Pick Dog\n"); | ||
| char* choices [] = ["Rock\n","Paper\n","Scissors\n","Lisard\n","Spock\n","Gun\n","Dog\n"]; |
johnneijzen
approved these changes
Jul 28, 2018
johnneijzen
requested changes
Jul 28, 2018
| // Player 2 Win | ||
| for (int i=0;i<21;i++) { | ||
| if((playerTwoMoves == posiblePlayerMoves[i]) && (playerOneMoves==loseConditions[i])){ | ||
| printf("Player 1 Win"); |
Owner
There was a problem hiding this comment.
This is i think is typo this is when player 2 win not player 1 win
Owner
|
i not sure what is causing this but move display is a bit broken it display every move but the code now compiles |
Owner
johnneijzen
requested changes
Jul 28, 2018
| } | ||
| for (int i=1;i<=7;i++){ | ||
| if (playerTwoMoves == i) | ||
| printf("Player One Pick "); |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

sorta tried to make it a bit more neater