How to operate the poker game by Java?

前端 未结 4 1867
Happy的楠姐
Happy的楠姐 2021-01-16 17:44

I’ve learned Java for 1 month. This time, I’d like to create a poker game. There are two questions about my program. I hope somebody can help me to fix it.

4条回答
  •  忘掉有多难
    2021-01-16 18:19

    I don't think you want a String array for cards, what you really need is an enum. Here's a nice tutorial on enum types: http://docs.oracle.com/javase/tutorial/java/javaOO/enum.html

    Also, here's how you generate random numbers in Java: http://javamex.com/tutorials/random_numbers/

提交回复
热议问题