C# Small Project #1 - Rock, Paper, Scissors

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2024

Комментарии • 73

  • @Majkirsche
    @Majkirsche 5 лет назад +31

    Very nice, thanks a lot! Please make more small projects like this. This is a great opportunity to make something funny and gain the C# skills at the same time

  • @brianbarton5103
    @brianbarton5103 5 лет назад +125

    can you code your video to be louder

    • @bruhology6437
      @bruhology6437 4 года назад +9

      Worst comment I've ever read so far

    • @radiantgamer216
      @radiantgamer216 4 года назад +3

      Bruhology agreed. Let’s just hope that that was a joke comment XD.

    • @bx6p166
      @bx6p166 4 года назад

      @Bruhology not that bad actually

    • @gnamp
      @gnamp 4 года назад +7

      @@bruhology6437 I dunno- yours is a definite contender.

    • @gogbordpro765
      @gogbordpro765 4 года назад +3

      @@bruhology6437 r/woosh

  • @kuntahouen3835
    @kuntahouen3835 6 лет назад +11

    Really nice for learning simple if and switch statements, bool and while loops. awesome for a beginner like me.

  • @fox__gun6420
    @fox__gun6420 3 года назад +2

    just for you, fuys, knew: in my school we`re sometimes watching programming videos, and we watched right this wideo!
    I`m learning in middle Russian school by the way.

  • @gargoyled_drake
    @gargoyled_drake 4 года назад +7

    start of an RPG text game right there too :O

  • @gerardoochoa5860
    @gerardoochoa5860 10 месяцев назад

    Good tutorial. A suggestion would be to fix the audio, really soft.

  • @Coco_Comics
    @Coco_Comics 6 лет назад +12

    Thanks my guy!! This was helpful as HECK

  • @renatzkigab2616
    @renatzkigab2616 5 лет назад +5

    Nice color of the editor's theme is this manually configured or just ready-made theme?

  • @natalijajanz8918
    @natalijajanz8918 3 года назад +1

    Thanks for this small project! Great to practice with simple explanations.

  • @calebtulpan8062
    @calebtulpan8062 4 года назад +1

    Bummer you only have one video posted this was really good =)))

  • @Ritik-2309
    @Ritik-2309 7 лет назад +2

    very good video you explain things really well. You helped me with my summer computing work

  • @deficrypto1234
    @deficrypto1234 3 года назад +1

    Thanks a lot for the video. A few constructive criticisms 1. You need to speak slower. 2. Take your time to move in between lines of code. 3. The code isnt clear on the screens.
    Keep up the good work. Always try to imagine an absolute beginner is watching the video. If its not for beginners , say so at the beginning of the video.

  • @Withheart71
    @Withheart71 5 лет назад +4

    2 things i cant figure out what im doing wrong: 1) The scores arent popping up, and 2) the only time the loops work for y/n is when i switch the places of the while statements. if anyone knows id appreciate it!

  • @casualcouch9459
    @casualcouch9459 4 года назад +2

    do you have a video for doing this exact thing but in javascript?

  • @oiver55
    @oiver55 5 лет назад +8

    I notice on my code I don't have "Using System.Math" like you do, is that ok?

    • @dagi_magna6446
      @dagi_magna6446 5 лет назад +1

      if you had 'Using System", it should work. In fact, it will give you an error if you also try to use "System.Math" while you already have System by itself

  • @robsonrobkido767
    @robsonrobkido767 Год назад

    What does the "\t" does when around "Player"?

  • @jollyjawdantv24
    @jollyjawdantv24 2 года назад

    I loved your project. Can you make some object-oriented projects please?

  • @leomonk974
    @leomonk974 3 года назад

    This was awesome my guy

  • @resantosp
    @resantosp 2 года назад

    Thank you so much for this! Great way of exercising!! You've explained it very well.

  • @lvlGhostlylvl
    @lvlGhostlylvl 3 года назад +2

    If anyone is watching this now an easier way to add a variable to a string is the following
    Console.WriteLine($"My name is {name}");

  • @eonshade6297
    @eonshade6297 3 года назад

    Very good and nicely explained

  • @catharperfect7036
    @catharperfect7036 Год назад

    Great but the sound is very low.

  • @skywoker123456
    @skywoker123456 5 лет назад +3

    THANK YOU!

  • @muhammadhamad7813
    @muhammadhamad7813 6 лет назад +10

    Programming is fun

  • @reubenusher2
    @reubenusher2 5 лет назад +2

    The Console closes whenever i press enter to submit the answer???

    • @Kaan_Koska
      @Kaan_Koska 4 года назад +1

      you need to use console.readkey(); end of your code bro if you wanna see you program until you tab any button

    • @useless337
      @useless337 4 года назад

      after you type Console.WriteLine(someing);
      // your next line needs to be
      Console.ReadLine();

  • @timmylol6
    @timmylol6 4 года назад

    Awesome! Big thanks for sharing. Very useful for a beginner to start a simple project and make own changes to it.
    Though, when I try to run this game it will lead to a CS0168 error which says that inputCPU is declared but never used.
    Looking at your video I also don't see that you assigned this before going into the loop.

    • @dhenr188100
      @dhenr188100 4 года назад

      How was this corrected? Or what do I need to do to correct this?

    • @timmylol6
      @timmylol6 4 года назад +1

      @@dhenr188100 in the end could not fix it ;S But somehow it did let the program run, even with the error

  • @neo_lowfade3618
    @neo_lowfade3618 3 года назад

    Weee want more videoos!!! 🤌🏾✨✅

  • @gogbordpro765
    @gogbordpro765 4 года назад

    Do you use C#?

  • @saarthi9115
    @saarthi9115 3 года назад

    Is there a reason the computer wouldn't choose 0 or 4?

    • @1TheSnail
      @1TheSnail 3 года назад

      The CPU won't choose 0 because it is below the lower limit set in the rnd.Next() method.
      As for the CPU not choosing 4, that's because the upper limit is exclusive, meaning that it will never choose 4, only the numbers before it. However the lower limit is inclusive which means it can also choose 1 and the numbers that come after it.

  • @twinzmultitasking8849
    @twinzmultitasking8849 2 года назад

    sir i want souce code please

  • @danielmaric3059
    @danielmaric3059 3 года назад

    Are you coding on C# cuz
    using System.Math; - doesn't exist, do I need to download something

  • @gdtyui8635
    @gdtyui8635 4 года назад

    this is so cool

  • @AnimeLover-gy4jg
    @AnimeLover-gy4jg 2 года назад

    Thank you

  • @nicorichter8754
    @nicorichter8754 4 года назад

    How can I run/try the Programm

  • @musannafaiyaz6316
    @musannafaiyaz6316 3 года назад

    beta or videos kiu nhi baniy

  • @illegalbilgiler
    @illegalbilgiler Год назад

    thx

  • @myouri5022
    @myouri5022 4 года назад

    sorry I have a question..
    what does this code actually does
    Console.WriteLine("

    SCORES:\tPLAYER:\t{0}\tCPU:\t{1}", scorePlayer,scoreCPU);
    Like what's with the

    and the t{0}
    I really don't know because I just got started coding

    • @juceviciusramunas
      @juceviciusramunas 3 года назад +8


      - new line
      \t - tab (more space between text)
      Imagine you're writing something in console:
      Console.WriteLine("Hello Sir");
      it will output:
      Hello Sir
      But, if you write: Console.Write("H\tello
      Sir);
      it will output:
      H ello
      Sir
      as for t{0} , you're inserting parameters.
      For example:
      int a =1;
      int b=2;
      int c=3;
      Console.Write("First number is {0} , Second is {1} , third is {2}",a,b,c)
      in {0} you're inserting a which is 1
      in {1} you're inserting b which is 2
      in {2} you're inserting c which is 3
      output:
      First number is 1, Second is 2, third is 3
      Also, there is another way of inserting parameters:
      Console.Write("First number is"+a+" Second is"+b+" Third is"+c);

  • @ItamarD
    @ItamarD 4 года назад

    TY

  • @DAATChannel
    @DAATChannel 3 года назад

    I got 27 bugs, I get lost with all the copy and pasting

  • @shyamjha8572
    @shyamjha8572 3 года назад

    nice video
    @/programmingstories​

  • @Lucy050
    @Lucy050 5 лет назад +3

    For some reason it wont work for me. It says “ Value assigned to ‘inputCPU’ is never used” and wont work

    • @butterdog29
      @butterdog29 5 лет назад

      Right? And in CMD if you press enter itll just close down again.

    • @ronin1767
      @ronin1767 3 года назад

      you need to give it a value
      inputCPU = Console.ReadLine();
      inputCPU = inputCPU.ToUpper();

  • @Eeeeeeeeeeeeeeeeeee33
    @Eeeeeeeeeeeeeeeeeee33 4 года назад

    dude i cant hear anything

  • @salemfateh5093
    @salemfateh5093 6 лет назад +1

    cool

  • @reidswan9601
    @reidswan9601 4 года назад

    None of this works

  • @MURATAVAN23
    @MURATAVAN23 4 года назад

    This ability is gift, I mean writing code, It is like drawing ability, Person absolutely has to be talented otherwise impossible to write a code like this.

    • @unecht3604
      @unecht3604 3 года назад

      no you just have to study much xD

  • @stricklybisnez3296
    @stricklybisnez3296 4 года назад +1

    Great Video, Horrible Voice Volume

  • @fachri17
    @fachri17 4 года назад

    This is to advance to me

  • @JorgePicco
    @JorgePicco 4 года назад +2

    For anyone watching this please don't write code like the one on this video.

    • @Irishhellhound
      @Irishhellhound 4 года назад

      Why?

    • @JorgePicco
      @JorgePicco 4 года назад +2

      @@Irishhellhound Programming is about managing complexity. In order to do that one must identify with a name (a method) every action (among many other best practices). Such methods preferably will contain a single statement. "If" statements should be avoided and any nested if is certainty too complex. Literals, like text and numbers, should always be injected. Any call to infrastructure frameworks like the class console should be done indirectly, Core code should be free from this kind of dependencies. Good code declares no method variables. Yes, whenever you see "var x" that is wrong, the x should be an class variable and preferably injected. About the concrete example on this video, rock, paper, scissors should be value types, the random generator should be a class or at least a method. The code determining a winner should also be a class. Once you start coding anything a bit more complex you will see code like the one showed here creates problems.

    • @Irishhellhound
      @Irishhellhound 4 года назад +3

      @@JorgePicco Oh wow i didn't expect such an in-depth response, thank you, i think i understand now

  • @kinggemini696
    @kinggemini696 Год назад

    so after i followed the video i get this error variable input CPU is never used