1 / 7

Computer Science Final Project “Pig”

Computer Science Final Project “Pig”. Daniel Faught. The Game. Uses two dice Gain points per round based on rolls Lose all points in round if a one is rolled Lose all points if a snake eyes is rolled Can end round at will First to 100 points wins. Goals. Create Pig Game

dillon
Download Presentation

Computer Science Final Project “Pig”

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Science Final Project“Pig” Daniel Faught

  2. The Game • Uses two dice • Gain points per round based on rolls • Lose all points in round if a one is rolled • Lose all points if a snake eyes is rolled • Can end round at will • First to 100 points wins

  3. Goals • Create Pig Game • Person vs Computer • Person vs Person • Create GUI • Dice GUI • Buttons

  4. Implementation • Used several imported classes • JButtons, JLabels • Used three supporting classes • Die class • PlayerTurn class • CPURunner class • Main class/applet had many similar methods • playerTurn, player1Turn, player2Turn

  5. Implementation • Methods for: • Die • Drawing • Rolling • PvC • Player turn • Player pass/CPU turn • PvP • Player 1 turn • Player 2 turn • Used a private class ActionListener

  6. Initial Program • Initially began with simple dice rolling program • Had to rewrite code from original Pig class • Changed every method in the dice rolling program

  7. Final Product • Works • Capable of playing Pig • Graphic issues • Buttons don’t disappear when they should • Buttons don’t appear in an ideal location • Runs best in full screen

More Related