岩石剪刀纸比赛java gradel [英] Rock scissors paper game java gradel

查看:65
本文介绍了岩石剪刀纸比赛java gradel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编程新手,所以我找到了一个练习Rock剪刀纸游戏的练习如下:



Build Tool Maven或Gradel。



玩家A总是选择纸张玩家B随机选择



游戏应该让两个玩家互相玩100倍。该程序的输出应该是以下格式(可能还有其他数字):



玩家A赢得100场比赛中的31场



玩家B在100场比赛中赢得37场比赛



(领带:100场比赛中的32场)



代码应该用JUnit(+可能是Mockito)进行彻底测试。



任何人都可以帮我构建它的代码?我真的迷路了(oop并不容易,但我想学习它。)



谢谢。



我的尝试:



我必须从这个程序开始

I am new into programming, so I found an exercise to build Rock scissors paper game as follow:

Build Tool Maven or Gradel.

Player A always chooses paper Player B makes a random choice

The game should let both players play 100x against each other. The output of the program should be the following Format (with possibly other numbers):

"Player A wins 31 out of 100 games"

"Player B wins 37 out of 100 games"

("Tie: 32 of 100 games")

The code should be thoroughly tested with JUnit (+ possibly Mockito).

Could anyone help me building the code of it? I'm really lost (oop is NOT easy but I want to learn it).

Thanks.

What I have tried:

where I have to start with this program

推荐答案

我们不做你的作业:这是有原因的。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。



亲自尝试,你可能会发现它不是像你想的那么难!说真的 - 试一试。即使你没有把它弄好,(特别是如果你没有把它弄好!)你会在下一次迭代中学到一些东西。从长远来看,我们只是告诉你该做什么对你没有帮助,对你试图自己做的同学是不公平的。



如果您遇到特定问题,请询问相关问题,我们会尽力提供帮助。但是我们不打算为你做这一切!
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think! Seriously - give it a try. Even if you don't get it right, (especially if you don't get it right!) you will learn something for the next iteration. Us just telling you what to do both doesn't help you in the long run, and is unfair on your classmates who have tried to do it themselves.

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!


引用:

我是新手编程,所以我找到了一个锻炼Rock剪刀纸游戏的练习如下:

I am new into programming, so I found an exercise to build Rock scissors paper game as follow:



这是错误的方法,没有人学会通过赢得一级方程式比赛来开车,因为它没有工作。这是知识,因为只有数百万人在你之前学习编程。

要学习编程,你需要通过以下课程或教程来正确学习,至少是为了让你开始。

练习在这里应用你学到的东西。


It is the wrong method, nobody learn to drive by winning a Formula 1 race, because it don't work. And this is knowledge because only millions of people learned programming before you.
To learn programming, you need to learn properly by following courses or tutorials, at least to get you started.
Exercises are here to apply what you have learned.

引用:

任何人都可以帮我构建代码它?

Could anyone help me building the code of it?



唯一的帮助就是我们为你做这个练习,而且,我们没有这样做,我们只帮你修复你的代码,但你需要展示你的工作并解释你遇到的问题。


The only help possible is us doing the exercise for you, and this, we are not doing, we only help you to fix your code, but you need to show your work and explain the problem you have.


参见 Java™教程 [ ^ ]。


这篇关于岩石剪刀纸比赛java gradel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆