The game of Pig is a simple two-player dice game in which thefirst player to reach 100 or more points wins. How to play: Playerstake turns rolling one six-sided dice and following these rules: Ifthe player rolls 2 through 6, then he/she can either a. “RollAgain†or b. “Hold†At this point, the sum of all rolls is added tothe player’s score, and it becomes the other player’s turn. If theplayer rolls 1 before he/she decides to stop rolling, the playerscores 0 for that round and it's the other player's turn. Write aprogram that plays the game of Pig, where one player is a human andthe other is the computer. Your program should have a GUIinterface. At the beginning or after each game, the player shouldbe able choose either “start a new game†or “look up historyrecordsâ€. If the user selects “Look up History Recordsâ€, he/shewill see a list of all games played on that machine so far, withfour columns: Game result: win or lose Date and time Total pointsWho is the player: computer or human The user should be able tosort the list in different ways by clicking on each of the columntitle. in Java