1nature / Sloth-Machine-Project

0 stars 0 forks source link

Duplicated code in case of userChoice "A" #28

Closed mayisa87 closed 1 year ago

mayisa87 commented 1 year ago

https://github.com/1nature/Sloth-Machine-Project/blob/cf84227067d6da74c291a417d8a94123a327f33f/Sloth%20Machine%20Project/Program.cs#L80-L143

You should avoid to just copy code, in this section, in case the user wants to bet all lines, you use the same code as in H and V choice.

You could change your if statements accordingly. For example, use if not if/else-if

if ("H" or "A") { //do horizontal checks }

if("V" or "A") { //do vertical checks }

1nature commented 1 year ago

Wouldn't this mess up my thinking?