一个21点的扑克牌游戏,作业提供了框架以及游戏引擎,不过UI库是学校内部的,需要学习成本。刨除UI部分,整体不难,无非就是deal, hit, stand三个按钮,然后label显示得分。
We have written several classes that set up the application, the cards and the game board. You will need to write a class named Game and other classes of your choice that will make the game functional. The game should follow the above rules and you should display a control panel that displays scores and control buttons to run the game.
Start by downloading the files posted on the public 8P directory.
You will be writing the Game class and other classes as required by your design. Do not change and do not submit Board.java, Card.java, BlackJackApp.java or any images. Submit only Game.java and other java files that you write.
This is the primary class that you will write, as it is now it is just a skeleton that sends a few test messages to the Board. You will need to add the code that plays the game and displays the information. You will need to create a display text box to show the following information:
Don’t try to do everything in one method or one class, it will become much too complicated. Write multiple classes and many “helper” methods that handle some small part of the problem. Breaking a problem up into these smaller pieces is sometimes called “chunking”. Poorly chunked code may lose points. As usual, think carefully about the class design, for example you probably want a separate class to represent the display and another class to represent the buttons, etc..
Develop your program in small steps; the following suggests some useful steps and how we will evaluate your assignment. If, when you develop your program you cannot finish one of the following steps and it breaks the program, be sure to backup to where the program was working. A program that doesn’t compile or crashes is worth a lot less than a program that does just the first step below.
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。