Posts

Showing posts with the label Game

[SOLVED] Trivia Game using Linked List, Polymorphism and Inheritance in Java

You will need to first create an object class encapsulating a Trivia Game which INHERITS from Game. The game is the parent class with the following attributes: description - which is a string write the constructor, accessor, mutator and toString methods.  Trivia is the subclass of Game with the additional attributes: trivia game id - integer ultimate prize money - double number of questions that must be answered to win-integer. write the accessor, mutator, constructor, and toString methods. Write a client class to test creating Trivia objects. Once you have successfully created Trivia objects, you will continue by creating a linked list of trivia objects. Your linked list code should include the following: a TriviaNode class with the attributes: trivia game - Trivia object next- TriviaNode write the constructor, accessor, mutator and toString methods. A TriviaLinkedList Class which should include the following attributes: head - TriviaNode number of items - ...

[SOLVED] The Sky-blue and the gnomes project in Java | Java Assignment | Java Homework

Once upon a time, there was a princess named Sky-blue. The princess’s stepmother, the Queen was very mean and vain. She was jealous because she wanted to be known as "the fairest in the land," and Sky-blue’s beauty surpassed her own. One day, Sky-blue couldn’t take it anymore and run away to a fairy garden. In the garden, she found a small cabin. In the cabin, there were num_gnomes little beds, one table of table_size size, one love seat, one recliner and a big 50” flat screen TV. However, the cabin was very dirty and failed to provide a pleasant environment to relax and watch a good movie. Sky-blue decided to start cleaning and cooking. Soon she got exhausted and fell asleep (use wait) In the evening, the gnomes arrived home from the diamond mine. They computed in different ways (sleep of random time) but they always waited for each other, so that all of them should be at the door before entering the cabin. The last gnome to arrive opened the door ((use monitors and opera...

[SOLVED] The Towers of Hanoi Puzzle in Java | Resit Programming Project

The Towers of Hanoi Puzzle The description of this problem is taken from the book by Douglas Baldwin and Greg W Scragg (2004), Algorithms and Data Structures: The Science of Computing. Hingham MA: Charles River Media. Legend tells of an ageless temple in the city of Hanoi. Within this temple are three poles of diamond piercing 64 golden disks of varying sizes. At the moment of creation, the disks were stacked smaller-on-top-of-larger on the leftmost pole. Since then, the monks of the temple have been moving the disks from the left pole to the right pole, subject to the following rules: The monks only move one disk at a time. Every disk taken off a pole has to be put back on some pole before moving another disk. The monks never put a disk on top of a smaller one. When all the disks have been moved to the right-hand pole, the purpose of creation will have been fulfilled and the universe will end. It’s not immediately obvious how (or even if) the monks can move the disks to the ri...

[SOLVED] Interactive Fiction Game in Java | Adventure Game | Java Assignments Help | Algorithm

Introduction: Once upon a time, before the dawn of the Internet, as we know it, there lived a forgotten type of computer game called interactive fiction. First written in the late '70s, these games were sort of a choose-your-own-adventure book, but for geeks. These games contain no graphics, just a 2nd person (everybody remembers English class right?) description of your character, and a box for entering commands. With the birth of the Kindle and other Internet-enabled e-readers, these games are experiencing something of a rebirth, as their screens are a perfect match for these games. To play one for yourself, go to http://www.portablequest.com Your project is to create an interactive fiction. In this game, you will navigate a map (moving east, west, north, south when possible). In each “room” of the map, the game will print a description of the room to the screen. As you navigate through the map, you will be looking for a light to light up the dark rooms, a key to open a tre...

[SOLVED] 2D Puzzle Game in Java full source code

Class Template public class Puzzle {  public static final int N = 4;  public static final int NUMBER_OF_ROTATIONS = 5;  public static void main(String[] args) {   int[][] puzzle = new int[N][N];   reset(puzzle);   test(puzzle);   reset(puzzle);   scramble(puzzle);   System.out.println("### Testing puzzle game play\n");   play(puzzle);  }  public static void print(int[][] puzzle) {   for (int[] row: puzzle) {    for (int elem: row) {     System.out.printf("%4d", elem);    }    System.out.println();   }   System.out.println();  }  public static void test(int[][] puzzle) {   System.out.println("### Testing reset method\n");   print(puzzle);   System.out.println("### Testing rotate methods\n");   print(puzzle);   for (int i = 0; i < N; i++) {    System.out.println("### rota...

Pocker Game in C Programming - 300698 Operating Systems Programming (Advanced) – 300943

1 Introduction Operating Systems have a need for extremely compact data structures, as often these need to be stored wholly in memory. Examples of this are free memory lists, page tables and disk space bitmaps. This  practical Case Study will refresh your knowledge of bit operations, necessary to manipulate such compact data structures. We will use a simple variant of the card game poker as the inspiration for our compact data structure. In this exercise, you will model a deck of playing cards as a bit 1eld. Only six bits arerequired to fully describe a card, two for the suit and four for the value. An extra bit as been added to the structure to encode the colour of the card. A second bit 1eld will be used to store the number of pairs contained in a hand. Read this section fully before attempting any of the exercises. These instructions contain some background information, the task to perform, sample code and some system documentation extract. 2 Structure of the bit 1elds ...

C++ - Game of Dungeons and Dragons complete implementation with header files

1.0 Overview In the popular role-playing, the game of Dungeons and Dragons players move from room to room in a dungeon where they encounter creatures, treasure, and various obstacles. The underlying functionality of such a computer game lies in the gaming engine. This Statement of Work presents the requirements for a "Scenario Mapping and Player Movement" class for a gaming engine. 2.0 Requirements The student shall define, develop, document, prototype, test, and modify as required the software system.  2.1 Functional Requirements 2.1.1 The software shall be capable of representing the layout for a role-playing game scenario as a graph implemented as an adjacency matrix. The scenario will typically be an inside location such as a dungeon or castle divided into some rooms. For this implementation, it will be assumed that the number of rooms will be 20.  2.1.2 The scenario graph shall be implemented as a class called GameGraph (defined in files GameGraph.h andGameGraph.cp...

CS222 Project 1 The Game of Korona és Horgony - Dice Rolling Game

Project Description: For this project, you will be creating a program to play a dice game known in Hungary as Korona és Horgony. The rules are fairly simple. Three dice, each containing six different symbols on each face are used. A mat, also containing the same six symbols is on the table. The player makes bets by placing wagers on one or more of the six symbols. The dice are then thrown. If any of the dice show the symbol on which a bet has been placed, the banker pays the player the amount of his stake for each die  showing that symbol. In other words, if only one of the dice shows the symbol, the player is paid even money (1:1). The player is paid 2:1 if two dice show the symbol, and 3:1 if all three dice show the symbol. If the symbol does not show up, the player loses any bets placed on that symbol. Although the symbols on the dice can be figures such as a bear, a cat, a gypsy wagon and so on, you will use the numbers 1-6, found on a typical die, for your program. Your ...

2015 Fall Computer Science I Program #3: Mastermind

In the popular game Mastermind, one player creates a secret code of four pegs, each of which can be chosen from one of six colors. (The number of pegs and colors may be different than this in different versions, but your implementation will use these values, but be extendible to other values. Also, a color can be reused, thus there really are six choices for each of the four pegs.) The other player then has to guess the color of each peg, with the order mattering.The player who made the secret code then has to give feed back to the player guessing. This feedback is in the form of white and black pegs. A black peg means that the guesser has chosen the correct color in the correct slot. These are first “calculated” and awarded. Once these are counted, these pegs are ignored. Then the white pegs are awarded. These are for pegs that are the correct color but are in the incorrect slot. There is no “double dipping” of pegs in the response, so the sum total of white and black pegs the guesser...